Survey fixes#9729
Conversation
The teacher now sees an explanation that they can't see a student's survey, and nothing more, when attempting to see the student's view of the survey. Also fix a couple issues in the dots. Firstly, make the dots click handler go to the correct URL with the teacher's view of the student's work, rather than the teacher's view of their own work, matching the URL that was already shown correctly when hovering. Secondly, make the click handler do nothing when the level is locked.
| If the viewer can't view last_attempt, which would happen when it's a teacher | ||
| looking at a student's attempt at an anonymous survey, then just show explanation | ||
| text. It's very important that we don't lose or miss this check. | ||
| Check that @script_level exists, because it won't for a /level/ view. |
There was a problem hiding this comment.
This view is serving a number of different responsibilities — I wonder if the controller can own this logic, and render different views (_level_group.haml for students, _hidden_survey.haml for teachers).
There was a problem hiding this comment.
That's a good idea. I'd like to merge this change to get the team unblocked, and then try this next.
There was a problem hiding this comment.
Same goes for whole change.. I'll merge now but happily take more feedback. Thanks!
There was a problem hiding this comment.
After further looking, this gets tricky because it's actually a view - https://github.com/code-dot-org/code-dot-org/blob/staging/dashboard/app/views/levels/show.html.haml - that decides which haml to show for a level. Presumably the bigger fix would be to hoist that logic into controllers so that it can be unit tested.
Conflicts: dashboard/app/views/levels/_level_group.haml
26780fa Merge pull request #9721 from code-dot-org/netsim-teacher-view (Brad Buchanan) 751ca8a Automatically built. (Continuous Integration) da1d1b8 Merge pull request #9748 from code-dot-org/bump-block-svg-framed (Elijah Hamovitz) f646303 Fix tests by passing locale into component (Brad Buchanan) 5bf6038 Merge pull request #9750 from code-dot-org/fix-topinstructions-feature-test (Elijah Hamovitz) 4de1a32 Removes last .new-router-log-modal style (Brad Buchanan) 2821f6e Move most styles into JSX (Brad Buchanan) 5f3e688 Merge pull request #9739 from code-dot-org/hideStagesNonAuthorized2 (Brent Van Minnen) d327da6 move uitest-specific className from custom Component which does not support classnames to standard paragraph tag which does (Elijah Hamovitz) c53f0ac Use px for filters marginBottom (Brad Buchanan) 31be25a Move sort methods onto the component (Brad Buchanan) 952a54e Indent conditional component (Brad Buchanan) 50cd059 Restore localized log browser header (Brad Buchanan) e38b4f8 Manually specify blockSvgFramed clippath width (Elijah Hamovitz) cf3c84e Merge pull request #9742 from code-dot-org/topInstructions-fix-unwanted-dashed-border (Elijah Hamovitz) 06d30ae Merge pull request #9744 from code-dot-org/fix-survey-view (Brendan Reville) 9b03d61 Merge pull request #9745 from code-dot-org/levelbuilder (Josh Lory) 26501e2 Level builder changes (Continuous Integration) 0cbfc1e Content changes (Continuous Integration) 3d4ef73 Merge branch 'staging' into fix-survey-view (Brendan Reville) 169026f Merge pull request #9702 from code-dot-org/touch-tunneling-fix (Caley Brock) c863139 Merge pull request #9740 from code-dot-org/prevent-auto-starting-animations (Brad Buchanan) 12ee7ac Merge pull request #9729 from code-dot-org/survey-fixes (Brendan Reville) c3af7a1 Merge branch 'staging' into survey-fixes (Brendan Reville) 98ace8a Teacher dashboard: Fix teacher view default course (Brendan Reville) 564d930 chat bubble tip stroke should default to none rather than white (Elijah Hamovitz) 9fba967 Clean up test syntax from code review (Caley Brock)
A variety of fixes for surveys.