-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fixes to Learner Progress Overview #255
Conversation
Codecov Report
@@ Coverage Diff @@
## master #255 +/- ##
=======================================
Coverage 92.03% 92.03%
=======================================
Files 41 41
Lines 2134 2134
=======================================
Hits 1964 1964
Misses 170 170 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun fact: LGTM.com is an company site that advocates against "LGTM" with a 21 million dollar investment.
But hey, LGTM 😁
@@ -196,7 +196,14 @@ class ProgressOverview extends Component { | |||
coursesFilter.forEach((course, i) => { | |||
const userProgress = userCoursesImmutable.find(singleCourse => singleCourse.get('course_id') === course.id); | |||
if (userProgress) { | |||
singleRecord[course.id] = `Progress: ${userProgress.getIn(['progress_percent'])}/1 | Sections: ${userProgress.getIn(['progress_details', 'sections_worked'])}/${userProgress.getIn(['progress_details', 'sections_possible'])} | Points: ${userProgress.getIn(['progress_details', 'points_earned'])}/${userProgress.getIn(['progress_details', 'points_possible'])}`; | |||
|
|||
const progressPercent = (userProgress.getIn(['progress_percent'])) ? userProgress.getIn(['progress_percent']).toFixed(2) : '-'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a helper function, but okay for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, agreed. However this whole view is done for now in a kind of anti-pattern approach. It is a monolith, and should be refactored down the line.
Here's a list of items fixed:
If you select a course, you can’t add another course with the same name to the dashboard
Now you can and you can easily distinguish them because:
Data is shown to a needless level of specificity, causing fields to overflow
Fixed. Literally
Data that is 0 is invisible, just leaving slashes
This is now fixed - checks added into code.
The page looks weird when you only have one course selected
Not anymore! Now introducing - “wide view toggle”. Initially you have regular screen width. If you need more, you can toggle it.
Loading all courses initially in LPV is useless
New behaviour:
Add more info to multicourse select dropdown to distinguish reruns
Done.
Enable course multiselector search by course number
Done.