level_group levels - fix issue with page numbers popping up in url#65192
Conversation
There was a problem hiding this comment.
Nice fix! I don't have a ton of context here but as explained, this makes sense to me. A few questions for my understanding:
- What is an
activity_guide_level? - Is there an implication here that for level groups that are not marked
activity_guide_level, we don't want to be able to view summaries? (because presumably the /summary path will still be broken?) - [edit] also, is there an implication that
activity_guide_levellevel groups will always be a single page?
There was a problem hiding this comment.
Nice sleuthing Kaitie and Ken! Seems like a good quick fix!
some new UI test coverage seems appropriate since these are end-to-end issues. Also it seems like the error may have snuck under the radar in part because the allthethings level is not marked as an assessment but the pswai-pilot-2024 level is. based on that I would suggest adding the following to level_group_activity_guide.feature:
- can see the current level number in the progress bar
- can click summary button and the page renders at least one student response
- testing the above with and without the level being marked as an assessment
I'm not totally sure I understand when we do / don't want level groups to be assessment levels, so there could be some flexibility on 3, but unless we can convince ourselves otherwise that these will always (or never) be assessments, testing both scenarios seems safest to me.
Lastly it could be worth (manually) testing what happens if you add multiple pages to one of these activity guide levels, just to make sure it doesn't fail in some confusing way.
OK to merge as-is to unblock our users, but I would strongly encourage a follow-up PR to add some UI tests before returning to other tasks.
These are a newer use of a DSL level (PR). It is intended to work similar to how our survey or "test" levels work, with a few slight modifications.
Right now, we only show the
According to Ken, as a curriculum team member, yes. That being said, I think we can put some safeguards in place to make sure a creative-problem-solving-curriculum-team-member doesn't break this norm (until we can decide if we want to support this use case or not). This was also part of a follow-up Dave suggested as well |
This PR solves 2 problems with one line of code.
Issue 1: For
level_grouplevels that were marked as an "assessment" at ascript_level, we were getting some weird behavior with the URL automatically adding apage. This was causing issues with teachers being able to access thesummaryof student response's. This was because the combination of being marked as anassessmentand aLevelGrouptriggered actions to treat this as along_assessment(which included page numbers). Thesummarybutton just appendedsummaryto the "paginated" URL which was causing the issues for the user.Action 1: Modified how
long_assessmentis defined in thescript_levelmodel to avoid theseactivity_guide_levelsfrom being included inlong_assessment. I confirmed with Ken that allactivity_guide_levelsare intended to be one page.Issue 2: We also noticed an issue with how bubbles were showing up for these types of levels (
level_grouplevels marked asassessments. The bubble wasn't getting big and showing the number when selected. This also stemmed from thelong_assessmentdesignation which caused apuzzle_pageto be assigned to the level in redux through the controller, some haml - tracing this code got a little wonky (to maybe hand-wavy), but I am pretty sure this is where the problems stemmed from.Action 2: Again, removing the
long_assessmentdesignation meant we were no longer assigning apagewhich fixed the issue where the current page number in redux wasn't matching the level's page_numberLinks
Thread
Other thread
Testing story
Tested locally