Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config(course): add title update license fields #292

Merged

Conversation

HussainTaj-arbisoft
Copy link
Contributor

@HussainTaj-arbisoft HussainTaj-arbisoft commented Apr 23, 2024

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/4065

Description (What does it do?)

This PR adds a help text to the title. The title is a required field and is not required to be defined, but it has to be defined to add the help text.

This PR also adds a new license option BY CC-SA and changes default for external resources as requested in https://github.com/mitodl/hq/issues/4065.

Screenshots (if appropriate):

Screenshot 2024-04-24 at 3 29 48 PM

How can this be tested?

  1. Checkout branch hussaintaj/external-resource-title-help-text in your local clone of ocw-hugo-projects.
  2. Navigate to your local ocw-studio project.
  3. Replace the contents of ocw-studio/localdev/configs/default-course-config.yml with the content of ocw-hugo-projects/ocw-course-v2/ocw-studio.yaml.
  4. Run
    docker compose exec web ./manage.py override_site_config -c localdev/configs/default-course-config.yml -s ocw-course-v2
  5. Open Studio.
  6. Open a course.
  7. Open the External Resources tab.
  8. Add a new external resource.
  9. Expect to see the help text for the title field.
  10. Expect to see a new license option BY CC-SA.
  11. Except the default value to be All Rights Reserved.
  12. Fill in the form and save the external resource.
  13. Open/Create a page.
  14. Add a link to the external resource via the Add Link button in the CKEditor UI.
  15. Save the page.
  16. Expect the previous step to succeed.

@HussainTaj-arbisoft HussainTaj-arbisoft changed the title config(course): add title field config(course): add title field help text Apr 23, 2024
@pdpinch
Copy link
Member

pdpinch commented Apr 23, 2024

This looks good to me. Note that there is another request for changes to these field though: https://github.com/mitodl/hq/issues/4065

I don't know if one PR is easier than two, but I expect that putting them into the same release would be simpler.

Copy link
Contributor

@pt2302 pt2302 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this PR should be modifying RELEASE.rst and VERSION; that's probably an unintentional change.

@HussainTaj-arbisoft
Copy link
Contributor Author

HussainTaj-arbisoft commented Apr 24, 2024

I don't know if one PR is easier than two, but I expect that putting them into the same release would be simpler.

Should be simple enough to add it to this PR, seems okay since we need it by tomorrow.

I don't think that this PR should be modifying RELEASE.rst and VERSION; that's probably an unintentional change.

pre-commit ci bot added those changes. RELEASE.rst seems to be a one-time change (adds a line break at the end). We might need to exclude VERSION in the pre-commit config.

@HussainTaj-arbisoft HussainTaj-arbisoft force-pushed the hussaintaj/external-resource-title-help-text branch from 60a275f to 00cf3d2 Compare April 24, 2024 10:52
@HussainTaj-arbisoft
Copy link
Contributor Author

@pdpinch, I've added the license options as requested in https://github.com/mitodl/hq/issues/4065. I've also added CC BY-SA to the resource's license field, let me know if that wasn't desired.

@pt2302, I've excluded the files you mentioned from pre-commit. The pre-commit check is failing, probably because of an unrelated reason. I'll ask DevOps to look at it.

@HussainTaj-arbisoft HussainTaj-arbisoft changed the title config(course): add title field help text config(course): add title update license fields Apr 24, 2024
Copy link
Contributor

@pt2302 pt2302 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@HussainTaj-arbisoft
Copy link
Contributor Author

@pdpinch, do the changes seem okay to you too?

Copy link
Member

@pdpinch pdpinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

you can take or leave my comment

@@ -214,6 +214,8 @@ collections:
value: https://creativecommons.org/licenses/by/4.0/
- label: CC BY-NC
value: https://creativecommons.org/licenses/by-nc/4.0/
- label: CC BY-SA
value: https://creativecommons.org/licenses/by-sa/4.0/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Please sort the CC variants alphabetically:

CC BY
CC BY-NC
CC BY-NC-SA
CC BY-SA

@HussainTaj-arbisoft HussainTaj-arbisoft merged commit 56798f3 into main Apr 29, 2024
3 checks passed
@odlbot odlbot mentioned this pull request Apr 29, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants