-
Notifications
You must be signed in to change notification settings - Fork 87
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
Adding average learner data to course sidebar #1135
Conversation
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.
Great start!
I think it would nice to reuse the styling from Workshop Details for this:
This is a block in the Learn plugin, so you could replicate that and pass in the Course data. Or if there isn't value in having this as a block you could move the logic to functions.php
and use similar markup and style in the theme. What do you think?
Oh yeah - that styling would make a lot of sense - I'll update the markup for that.
I like that - I wasn't sure how we create those blocks, but that makes a lot more sense and allows us to position things more dynamically, so I would much rather we do it that way. I'll work on changing things up there. |
Cool, just took another look and the Lesson Plan Details block is a little simpler, I'd use that as a starting point |
Add the new 'Course Data' block to the courses sidebar to test. |
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.
One change, otherwise LGTM!
Changes made - the CSS is no longer using |
d4d2eb6
to
ce509a4
Compare
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.
LGTM 🚀
…ss/Learn into add-frontend-course-data
I'm temporarily removing the completion rate from this data (commenting it out rather than deleting it) as the completion rate metric is not actually helpful, given how quizzes and completions work in our courses. There is a more helpful data point of "average progress" that is in the dashboard reports, however it isn't readily available for access on the frontend. I'm also not convinced it's a useful data point either way, so I'd like to get this update live and we can figure that out later on.
Commented out code has been removed - PR is ready to merge now. |
This PR adds the average learner data for a course to the sidebar on the single course page.
Some questions from my side that I'm uncertain about:
sidebar-course.php
template file, but should the logic perhaps be added to a function elsewhere?I'm happy to make changes accordingly but thought I'd get the initial PR up first for feedback.
Fixes #1089