-
Notifications
You must be signed in to change notification settings - Fork 60
Instructor Tool XBlock - Polish (OC-751) #45
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
Conversation
|
@bradenmacdonald Please review. The last build has a single test that's failing. I'm not sure why -- I ran the full test suite locally and was unable to reproduce the failure. CC @antoviaque |
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.
Can you please leave pb-dashboard in with a comment saying deprecated, so that existing courses will keep working?
|
Is "Student Answers Dashboard" the best name for this? I think it's confusing because there's another "Dashboard" block in this repo already, which also displays a student's answers. |
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.
object is a confusing name for this parameter - it sounds like this method is expecting an object as its parameter. How about fetchObject or returnObject or wantsObject?
|
FYI, I clicked the button to make Travis run the build again and now it's passing. That error you were seeing is a weird error that occurs randomly in the Travis environment and I haven't yet figured out the cause. Usually you can just run the test again and it will pass. |
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.
Nit: I think you can combine this with showResults, since there doesn't seem to be any time when you want to force the resultTable to appear before the last_export_result is ready.
|
@itsjeyd Nice work! I couldn't find any bugs and it works very well. Please rebase this code (since there's now a merge conflict) and address the issues I commented on, then ping me for another review :) |
cf0fe6d to
420b9ce
Compare
Backbone.js, and Underscore.js.
420b9ce to
f57db13
Compare
|
@bradenmacdonald Thanks a lot for your comments! The code is ready for another review. For the inline notes, if I didn't reply directly that means I just applied them.
I agree that it's a tad confusing, but renaming from "Data Export" to "Student Answers Dashboard" was an explicit requirement for completing OC-751. It probably came directly from the client? In any case, I'm pretty sure it's not my call to change it :) Maybe @antoviaque can comment on this?
Did not notice there was a button that lets you restart a build without pushing. Thanks for prompting me to go hunt for that, I know where to look for it now ;) |
problem_builder/tasks.py
Outdated
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.
@itsjeyd Nice improvements! This is great. I only have one final comment, which is about fetching the choices above. I believe the choices will always be the same for each block, so we should avoid loading all the choices from the modulestore for each student.
You could:
- Move the code that looks for choice children up one level to be in
_extract_dataoutside of the per-student loop.
or - Keep it here but cache the result (this is probably more efficient since it avoids looking up answers that won't be needed).
Actually, after looking into this I found out that you might be able to take advantage of QuestionnaireAbstractBlock.get_submission_display and to make this cleaner:
def _get_answer(block, submission, answer_cache): # Answer cache is a dict that is reset for each block.
answer = submission['answer']
if isinstance(block, QuestionnaireAbstractBlock):
# Convert from answer ID to answer label
if answer not in answer_cache:
answer_cache[answer] = block.get_submission_display(answer)
return answer_cache[answer]
return answerThere 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.
@bradenmacdonald Thanks! dae27b3 implements the optimizations you suggest.
|
@itsjeyd @bradenmacdonald It's true that we already have a Dashboard XBlock. Any suggestions on a better name? This now does more than just exporting data, so it would be good to keep reflecting that. There is no precise requirement from the client on this, we can chose what we think is best. |
|
@antoviaque @itsjeyd Maybe rename the other dashboard to "Answer Review" or something? Or call this "Instructor Tool" ? |
|
@bradenmacdonald Both approaches would work for me - @itsjeyd up to you : ) |
|
@antoviaque OK then! :) My vote is for renaming "Student Answers Dashboard" to "Instructor Tool", as this emphasizes the fact that unlike the other dashboard, the Instructor Tool is only for instructors/not accessible to students. |
|
@bradenmacdonald This is ready for you to have another look. Thanks! |
|
Thanks @itsjeyd - looks great! 👍 |
Instructor Tool XBlock - Polish (OC-751)
This PR renames the "Data Export" XBlock to "Instructor Tool". It also improves and extends existing functionality. It is now possible to:
Also, the UI has been overhauled completely. It now looks like this:
Testing
From Studio:
pb-instructor-toolto advanced modules.From the LMS: