announce about progress on section progress page#11976
Conversation
There was a problem hiding this comment.
We need to be able to know whether to show this message or not on a per course basis. This means we need to get the gatekeeper settings for each course on page load. Not sure if this ends up being more querying than we'd like.
There was a problem hiding this comment.
@ashercodeorg seems like someone who might have opinions on this
There was a problem hiding this comment.
AFAIK, querying the Gatekeeper is cheap. Perhaps @wjordan can say for certain.
f8e1a7b to
c57dab1
Compare
|
|
||
| def self.progress_disabled_courses(user_id = nil) | ||
| disabled_courses = valid_courses(user_id).select do |course| | ||
| script_name = Script.find(course[:id]).name |
There was a problem hiding this comment.
Any reason not to use the script cache (via Script.get_from_cache(course[:id]).name)?
| end | ||
| end | ||
|
|
||
| def self.progress_disabled_courses(user_id = nil) |
There was a problem hiding this comment.
Please document the method: what does it do, what does it return, etc.
|
LGTM, though you should get someone else to review the non-ruby code. |
|
Script.* doesn't work on pegasus. |
Show a message about progress on courses in which it's disabled. If you change courses in the dropdown the message will hide as appropriate.