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

Fixes to Learner Progress Overview #255

Merged
merged 6 commits into from
Sep 10, 2020
Merged

Conversation

grozdanowski
Copy link
Contributor

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:

  • in selector now you have additional information to easily identify the run
  • in data render list there’s now also course id to easily identify the run

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:

  • initially no data is loaded to render
  • data will be rendered only if there is a search query and/or courses selected

Add more info to multicourse select dropdown to distinguish reruns
Done.

Enable course multiselector search by course number
Done.

@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2020

Codecov Report

Merging #255 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

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

Copy link
Contributor

@OmarIthawi OmarIthawi left a 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) : '-';
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@grozdanowski grozdanowski merged commit c8cc1e2 into master Sep 10, 2020
@OmarIthawi OmarIthawi deleted the matej-work/lpo-fixes branch September 10, 2020 11:43
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.

3 participants