Skip to content

Comments

Fix #2797 incorrect order of options in the Exercise > Edit Details page > Assessment options#4039

Merged
rtibbles merged 6 commits intolearningequality:unstablefrom
Pursottam6003:fixorder
May 4, 2023
Merged

Fix #2797 incorrect order of options in the Exercise > Edit Details page > Assessment options#4039
rtibbles merged 6 commits intolearningequality:unstablefrom
Pursottam6003:fixorder

Conversation

@Pursottam6003
Copy link
Contributor

Summary

From issue #2797

Description of the change(s) you made

Made Changes in the ordering of dropdown elements in contentcuration/contentcuration/frontend/shared/leUtils/MasteryModels.js

Screenshots (if applicable)

Before applying changes

Screenshot from 2023-04-26 14-49-41

After applying changes

Screenshot from 2023-04-26 16-02-47

Does this introduce any tech-debt items?

No


Reviewer guidance

How can a reviewer test these changes?

Screencast.from.26-04-23.04.51.13.PM.IST.webm

References

Comments

I have made minor changes kindly let me know if it needs futhur changes


Contributor's Checklist

PR process:

  • If this is an important user-facing change, PR or related issue the CHANGELOG label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later time
  • If this includes an internal dependency change, a link to the diff is provided
  • The docs label has been added if this introduces a change that needs to be updated in the user docs?
  • If any Python requirements have changed, the updated requirements.txt files also included in this PR
  • Opportunities for using Google Analytics here are noted
  • Migrations are safe for a large db

Studio-specifc:

  • All user-facing strings are translated properly
  • The notranslate class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)
  • All UI components are LTR and RTL compliant
  • Views are organized into pages, components, and layouts directories as described in the docs
  • Users' storage used is recalculated properly on any changes to main tree files
  • If there new ways this uses user data that needs to be factored into our Privacy Policy, it has been noted.

Testing:

  • Code is clean and well-commented
  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Any new interactions have been added to the QA Sheet
  • Critical and brittle code paths are covered by unit tests

Reviewer's Checklist

This section is for reviewers to fill out.

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@ozer550 ozer550 self-requested a review April 29, 2023 06:59
@ozer550
Copy link
Member

ozer550 commented Apr 29, 2023

Hi @Pursottam6003, Thanks for your contribution! I have manually checked the changes and it seems that they have fixed the order, Just wanted to have a thought on what if we change the order from ascending to descending. Does it make sense to change the order to descending in accordance with 100% correct criteria first in the UI? cc @MisRob

@MisRob
Copy link
Member

MisRob commented May 1, 2023

what if we change the order from ascending to descending. Does it make sense to change the order to descending in accordance with 100% correct criteria first in the UI?

@ozer550 This would be best to discuss with @jtamiace first. I'd suggest doing that separately from this pull request as it solves the issue reported.

@Pursottam6003
Copy link
Contributor Author

Hi @Pursottam6003, Thanks for your contribution! I have manually checked the changes and it seems that they have fixed the order, Just wanted to have a thought on what if we change the order from ascending to descending. Does it make sense to change the order to descending in accordance with 100% correct criteria first in the UI? cc @MisRob

Hii @ozer550 I have worked on the issue based on the expected outcome.

Let's see wheather the reviewer is agree to merge or it needs certain changes

@jtamiace
Copy link
Member

jtamiace commented May 1, 2023

I am not convinced on whether either an ascending or descending order of those options would make an impactful difference to the end user, and also not aware of any feedback to motivate making a change, so I would suggest leaving it as-is for now.

Some ideas that can help inform a decision in the future:
Looking at how teachers are thinking while using this feature. I'm speculating here, but one reason to keep the ascending order could be if a teacher is thinking through the lens of "difficulty" - getting 2 in a row might be easier than 5 in a row, in which case 100% correct might make more sense to actually be placed at the end of the list, followed by M of N since it has a bit more complexity in functionality and requirements.

Another data-informed way to decide on the order of items here could be seeing how often each of these options are used and ordering by most frequent to least - which would be a helpful data point if it's possible to calculate that, although I'm not sure if we have the means to currently.

@Pursottam6003
Copy link
Contributor Author

Hii @ozer550 @MisRob So will this PR be able to merge? or will I have to make certain changes ...

@MisRob
Copy link
Member

MisRob commented May 2, 2023

Thank you @jtamiace.

@Pursottam6003 No, you don't need to make any changes. Even though it's related, it's somewhat separate from the original issue you're solving here (+ @jtamiace suggests leaving the order as is for now)

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Sorry, I missed this PR previously. This is the correct change that we want, but these files are automatically generated during the build process, so changing the committed files here will not cause a difference in production.

You will need to update the ordering by modifying this Python script that generates this file: https://github.com/learningequality/studio/blob/unstable/deploy/generatejsconstantfiles.py#L180

Just changing the sorting of that specific list comprehension should be sufficient to retain the ordering here.

@Pursottam6003
Copy link
Contributor Author

Sorry, I missed this PR previously. This is the correct change that we want, but these files are automatically generated during the build process, so changing the committed files here will not cause a difference in production.

You will need to update the ordering by modifying this Python script that generates this file: https://github.com/learningequality/studio/blob/unstable/deploy/generatejsconstantfiles.py#L180

Just changing the sorting of that specific list comprehension should be sufficient to retain the ordering here.

@rtibbles as per my understanding I ran yarn run build to create a production build but the file MasteryModels.js didn't change. Also, I don't know what is the exercises object in the generatejsconstantfiles.py file so I don't know how am I supposed to sort it.
Please tell me about the exercises object and how do I test if it is generating the required order or not

@rtibbles
Copy link
Member

rtibbles commented May 3, 2023

Hi @Pursottam6003,

Running that Python script is not included when running yarn run build - so you'd need to run it independently with:

python deploy/generatejsconstantfiles.py

The exercises object is from le-utils, a library mostly used for shared constants for content. The MASTERY_MODELS constant in the exercises module is just a list of tuples, which you can see here: https://github.com/learningequality/le-utils/blob/main/le_utils/constants/exercises.py#L12

@Pursottam6003
Copy link
Contributor Author

Hi @Pursottam6003,

Running that Python script is not included when running yarn run build - so you'd need to run it independently with:

python deploy/generatejsconstantfiles.py

The exercises object is from le-utils, a library mostly used for shared constants for content. The MASTERY_MODELS constant in the exercises module is just a list of tuples, which you can see here: https://github.com/learningequality/le-utils/blob/main/le_utils/constants/exercises.py#L12

Hii @rtibbles I have updated the python deploy/generatejsconstantfiles.py please review the changes :)

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Ran the command locally, and the new ordering persisted, great work!

@rtibbles rtibbles merged commit d82d165 into learningequality:unstable May 4, 2023
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.

6 participants