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

feat: add functionality to create honor course modes through studio #28114

Closed

Conversation

mariajgrimaldi
Copy link
Member

@mariajgrimaldi mariajgrimaldi commented Jul 7, 2021

Description

This PR implements a different mechanism that allows the course team users to create honor course modes through the studio certificate view, which empowers them, among other steps, to generate certificates.

Some implementation details:

  • Consists of a frontend application implemented using backbone that shows a button that, when clicked, makes a POST request to the course modes API
    To call the API, we had to add the course modes URLs to Studio. We did this after failing in communicating Studio with the LMS due to CORS errors:
    2021-06-23_13-45
    We tried to solve them by modifying some Nginx and site configurations, but we decided to drop them after some failed attempts.

Do you have any suggestions?

Supporting information

The overall idea was mentioned in this jira ticket and discussed in this Discuss Post.

Testing instructions

  1. Activate certificate generation.
  2. After checking out to this branch, enable the ENABLE_COURSE_MODE_CREATION feature flag.
  3. Remove any existing course mode and then go to /certificates/course_key.

Video explanation:

Deadline

None

Other information

  • Concerns about course modes API accessible from studio

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Jul 7, 2021
@openedx-webhooks
Copy link

openedx-webhooks commented Jul 7, 2021

Thanks for the pull request, @mariajgrimaldi! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@mariajgrimaldi mariajgrimaldi force-pushed the MJG/course_modes_creation branch 3 times, most recently from 80ccba0 to 650f176 Compare July 7, 2021 22:13
@natabene
Copy link
Contributor

@mariajgrimaldi Thank you for your contribution. Please let me know once it is ready for our review.

@mariajgrimaldi mariajgrimaldi marked this pull request as ready for review July 23, 2021 15:04
@openedx-webhooks openedx-webhooks added needs triage and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Jul 23, 2021
@mariajgrimaldi
Copy link
Member Author

Hey @natabene! This is ready for review :)

@marcotuts
Copy link
Contributor

Do you mind including a screenshot for what this looks like? My initial reaction is that I dont think we want to configure enrollment tracks in the same UI as certificate configuration but instead a separate area to review / edit enrollment tracks but I'm happy to look at what the existing experience is first if possible via screenshots. Thanks @mariajgrimaldi

@mariajgrimaldi mariajgrimaldi requested a review from a team August 3, 2021 17:45
@mariajgrimaldi
Copy link
Member Author

Thank you for the reminder, @marcotuts!

I'll describe in detail the testing process while illustrating the functionality:

  1. Assuming our configuration is:

'ENABLE_COURSE_MODE_CREATION': False,

  1. Let's enable certificates HTML/Web view for our course:

Go to your course advanced settings and then show deprecated settings:
2021-08-03_14-05

  1. Right now, our course has at least one course mode, so our functionality won't appear. -even the course mode audit is considered-
    course_modes_admin
    Course modes associated with the course
    2021-08-03_14-07
    Certificates web page

  2. After removing all course modes, our feature will appear allowing the user to create the Honor course mode
    2021-08-03_14-15

@mariajgrimaldi
Copy link
Member Author

Hi @marcotuts, what if we add an Edit Enrollment tracks into the Settings tab and include this functionality there? What do you think? We're open to suggestions!

@edx-status-bot
Copy link

Your PR has finished running tests. The following contexts failed:

  • jenkins/python

@natabene
Copy link
Contributor

natabene commented Jan 6, 2022

Hi @marcotuts, what if we add an Edit Enrollment tracks into the Settings tab and include this functionality there? What do you think? We're open to suggestions!

@marcotuts When you have a chance, can you reply?

@jmakowski1123
Copy link

Hi @marcotuts, what if we add an Edit Enrollment tracks into the Settings tab and include this functionality there? What do you think? We're open to suggestions!

Hi @mariajgrimaldi ! Thanks so much for your patience, and sorry for the delay. We're working out the best workflow for getting PRs through product review.

Yes, I think your proposal to add an "Edit Enrollment Tracks" into the Main Settings tab in Studio is a viable option. I have two suggestions to move this PR forward, if you are still interested in pursuing :)

First, I think we should expand the scope to allow course teams to add/change a more comprehensive list of course modes, and not limit it to just the Honor course mode. If we are going to add a new setting in Studio for this, I think it makes sense to review the entire course mode selection listing, rather than just implementing it for one mode type.

Second, this will need a UI design in alignment with the most current Paragon Design System.

Since this new proposed scope of work is slightly larger than this PR, I've created a Product feature ticket for this on the Open edX Community Roadmap. We can use that Product ticket to communicate and nail down the full Product Spec in order to get it approved. I'm happy to work with you to land the decision about which course modes to include, and to facilitate review of UI. Let's shift the conversation over to that ticket for now. Cc @mphilbrick211

@mariajgrimaldi
Copy link
Member Author

@jmakowski1123: I agree with both of your suggestions.

  1. Enabling just the honor course mode ultimately limits the functionality and makes it less valuable for the community. So as you said, it makes sense to include other course modes.
  2. I'm unfamiliar with the Paragon Design System, so I'll look into that as soon as I can. Either way, following the newer standards is the most reasonable thing to do.

I'm guessing the next step is nailing down the course modes to include, so I'll move to the product ticket so we can discuss it :)

@jmakowski1123
Copy link

@jmakowski1123: I agree with both of your suggestions.

  1. Enabling just the honor course mode ultimately limits the functionality and makes it less valuable for the community. So as you said, it makes sense to include other course modes.
  2. I'm unfamiliar with the Paragon Design System, so I'll look into that as soon as I can. Either way, following the newer standards is the most reasonable thing to do.

I'm guessing the next step is nailing down the course modes to include, so I'll move to the product ticket so we can discuss it :)

Great! I've got a start on the product feature ticket here: openedx/platform-roadmap#228
I'd be curious to learn more about which modes are most important for your users, besides the Honor mode. Let's start with those user stories!

});
var username = $('.account-username')[0].innerText;
$.ajax({
url: this.courseModeCreationUrl + '?username=' + username,
Copy link
Member Author

Choose a reason for hiding this comment

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

note to author: how can we update the course mode API so we don't necessarily have to send the username

Comment on lines +44 to +45
mode_slug: 'honor',
mode_display_name: 'Honor',
Copy link
Member Author

@mariajgrimaldi mariajgrimaldi Feb 27, 2023

Choose a reason for hiding this comment

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

note to author: here we need a dictionary or list[tuple] of course modes

course_id: this.courseId,
mode_slug: 'honor',
mode_display_name: 'Honor',
currency: 'usd'
Copy link
Member Author

Choose a reason for hiding this comment

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

note to author: is there a setting for this? Search.

@@ -0,0 +1,6 @@
<div class="no-content">
<label for="add-course-mode"><%- gettext("Enable the honor mode for the course.") %></label>
<a href="#" class="button new-button add-course-mode">
Copy link
Member Author

Choose a reason for hiding this comment

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

note to author: does this class use the new design system?

Comment on lines +190 to +196
path(
'api/course_modes/',
include(
('common.djangoapps.course_modes.rest_api.urls', 'common.djangoapps.course_mods'),
namespace='course_modes_api',
)
),
Copy link
Member Author

Choose a reason for hiding this comment

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

note to self: why is this the best way of doing it?

Comment on lines 412 to 413
# Check whether the audit mode associated with the course exists in database
has_audit_mode = CourseMode.objects.filter(course_id=course.id, mode_slug='audit')
Copy link
Member Author

Choose a reason for hiding this comment

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

note to author: modify this so it doesn't matter if audit mode exists

@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented Mar 2, 2023

I've been considering Jenna's suggestion about using the new Paragon Design System. Does that mean this new page must be included in the course authoring MFE, right? Like the new Pages & Resources. I'm thinking this since the current solution uses a backbone application, I'm not sure how that's compatible with the new design system.

Someone on my team suggested checking out student_account which uses some Paragon components. But still, I'm not sure how to proceed. 🤔

I'm not sure who can answer this question, though. Would you @arbrandes or @jmakowski1123 point me in the right direction? Thanks!

@mariajgrimaldi
Copy link
Member Author

cc @dcoa

@arbrandes
Copy link
Contributor

@mariajgrimaldi, I haven't reviewed the code here, or tested it, but to answer your question:

Does that mean this new page must be included in the course authoring MFE, right? Like the new Pages & Resources.

If the feature implemented in this PR can be implemented instead in an MFE and you have the knowledge and resources, please do so! This will save us the work of having to do it later: because we'll definitely have to do it later. :)

Technically, you could do it with Paragon in edx-platform, but I don't recommend it. It would be much harder to maintain. It's why we have MFEs, after all.

As for where: the course-authoring MFE seems like a reasonable choice, since this is supposed to be author-facing. Which is to say, I would support an implementation in there. Since it's a new page, it would likely not affect anything else, which makes it more likely to be merged faster.

Finally, it's totally fine to add endpoints to Studio that are meant to be used by authors!

@mphilbrick211
Copy link

Hi @mariajgrimaldi and @arbrandes! Just checking to see if there's an update here?

@mphilbrick211
Copy link

Hi @mariajgrimaldi and @arbrandes! Just checking to see if there's an update here?

Apologies - forgot this was in product review! Left a comment on the Roadmap ticket :)

@mphilbrick211
Copy link

hi @mariajgrimaldi! Per Jenna's comment here, would you mind switching this to a draft? Thanks!

@mariajgrimaldi mariajgrimaldi marked this pull request as draft August 29, 2023 15:30
@openedx-webhooks
Copy link

Thanks for the pull request, @mariajgrimaldi! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented Jan 30, 2024

FYI: this is not our priority now (or in the foreseeable future), if that changes, I'll leave a comment here. Either way, I'll leave the PR in draft if someone wants to pick up the work. Thanks!

@mariajgrimaldi
Copy link
Member Author

I'll close this PR for now since all these changes are related to the Studio Legacy FE, and we'd prefer the new Studio MFE to support this instead.

@openedx-webhooks
Copy link

@mariajgrimaldi Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core committer open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants