Skip to content

Adding dropdown menu for choosing Edx endpoint #965

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

annagav
Copy link
Contributor

@annagav annagav commented Oct 12, 2021

Pre-Flight checklist

  • Screenshots and design review for any changes that affect layout or styling
    • Desktop screenshots
    • Mobile width screenshots
  • Testing
    • Code is tested
    • Changes have been manually tested

What are the relevant tickets?

none

What's this PR do?

Adding a dropdown menu in the collection edit form dialog for choosing an edx installation for posting uploaded videos.

How should this be manually tested?

Create a collection, set up couple of EdxEndpoint instances, and a corresponding CollectionEdxEnpoints. When you go to edit the collection you should see a menu for selecting available edx installations for your collection.

Screen Shot 2021-10-20 at 8 34 02 PM

Screen Shot 2021-10-20 at 8 36 12 PM

@rhysyngsun rhysyngsun self-assigned this Oct 18, 2021
@@ -67,6 +69,7 @@ export function makeInitializedForm(
adminChoice: adminChoice,
adminLists: _.join(collection.admin_lists, ","),
edxCourseId: collection.edx_course_id,
edxEndpoint: collection.edx_endpoints[0],
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for edx_endpoints to be empty?

@Ferdi
Copy link

Ferdi commented Oct 18, 2021

What would be the possible values in the dropdown and what users they will be shown for ? If I'm a member from XPro team, would I see the MITx Online option ?

@annagav
Copy link
Contributor Author

annagav commented Oct 19, 2021

@Ferdi In django admin you can add CollectionEdxEndpoint instances to make the endpoint an available choice to pick from. Only edx endpoints that are linked to a collection through CollectionEdxEndpoint will be available to the user in the collection form ui.

@annagav
Copy link
Contributor Author

annagav commented Oct 19, 2021

The dropdown menu appears for anyone in this group EDX_ADMIN_GROUP(edX Course Admin). This is the same condition as for setting the edx course id for the collection.

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2021

Codecov Report

Merging #965 (7cf8cc3) into master (9a292c8) will decrease coverage by 0.04%.
The diff coverage is 91.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #965      +/-   ##
==========================================
- Coverage   95.91%   95.87%   -0.05%     
==========================================
  Files         182      184       +2     
  Lines        7269     7339      +70     
  Branches      253      254       +1     
==========================================
+ Hits         6972     7036      +64     
- Misses        262      268       +6     
  Partials       35       35              
Impacted Files Coverage Δ
static/js/factories/collection.js 100.00% <ø> (ø)
static/js/lib/collection.js 100.00% <ø> (ø)
static/js/lib/collection_test.js 100.00% <ø> (ø)
...atic/js/components/dialogs/CollectionFormDialog.js 94.20% <71.42%> (-2.63%) ⬇️
static/js/components/material/Select.js 80.00% <80.00%> (ø)
static/js/actions/collectionUi.js 100.00% <100.00%> (ø)
...js/components/dialogs/CollectionFormDialog_test.js 100.00% <100.00%> (ø)
static/js/components/material/Select_test.js 100.00% <100.00%> (ø)
static/js/reducers/collectionUi.js 100.00% <100.00%> (ø)
ui/serializers.py 99.38% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a292c8...7cf8cc3. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants