[SAK-36656] Samigo: Reordering parts is switching parts Created: 04-Aug-2017  Updated: 17-Apr-2018  Resolved: 12-Jan-2018

Status: Verified
Project: Sakai
Component/s: Tests & Quizzes (Samigo)
Affects Version/s: 11.4, 12.0, 19.0
Fix Version/s: 11.5 [Tentative], 12.0, 19.0

Type: Bug Priority: Critical
Reporter: Sam Lee Pan Assignee: Bernardo Garcia Vila
Resolution: Fixed Votes: 1
Labels: authoring, ndc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 1 - Initial order.PNG     PNG File Screenshot 2 - Change order.PNG     PNG File Screenshot 3 - New order.PNG     PNG File partordernotright.png    
12 status: Resolved
11 status: Resolved
Previous Issue Keys: SAM-3239

 Description   

It seems when you try to reorder parts, it switches parts. i.e. if you want to move part 5 to the top- you change the part number to 1 and click update order. It then switches part 1 and part 5.

Steps to reproduce:

  1. Screenshot 1: Setup a test with multiple parts. The last part is called "part to be moved"
  2. Screenshot 2: Move the last part to position 1. and click Update Order
  3. Screenshot 3: New order:
  • "Part to be moved" has moved to the top (expected)
  • However "Part 1 is now at the bottom (unexpected)


 Comments   
Comment by Derek Ramsey [ 28-Nov-2017 ]

Part and Questions both display this same behavior when updating order.

Comment by Tiffany Stull [ 30-Nov-2017 ]

On https://qa01-sakai.marist.edu/portal/ I'm getting very strange behavior trying to reorder parts.  It looks like a combination of the issue described here and --SAM-2395--?

The behavior is this: I select a number for a part to reorder and click Update Order.  The selected part moves into the correct position, but now it has the same part number as the part immediately below it, so it goes Part 1, Part 2, Part 2, Part 3...  An additional effect of this is that I cannot change the order of the two Part 2s (i.e. I can't switch the order of the two Part 2s and if I try to move another part to Part 3, one of the Part 2s is permanently stuck as Part 2).

Affected quiz if you'd like to see the behavior is in the site https://qa01-sakai.marist.edu/portal/site/ffecb5e0-7f34-4932-96f9-ef0f25e6438b - title of the affected assessment is Many Types of Questions grouped by part.

You can see in the screen shot I include below how the resulting quiz looks on the Table of Contents when it's taken.  I have not yet determined whether this has any impact on the student takes, or if it is merely cosmetic - it might be very confusing for the instructor in scoring if they are viewing the Statistics or Item Analysis pages.

Comment by Bernardo Garcia Vila [ 03-Jan-2018 ]

I've reproduced Tiffany's issue (two parts with the same position) by selecting the same position for two parts different than the one that currently occupies it. It can be solved by assigning one of those places the position with no part, but (the way it is developed) it might be easier done manually than by code.

Comment by Tiffany Stull [ 03-Jan-2018 ]

Bernardo Garcia Vila I don't understand what you mean by assigning the place the position with no part.  Is this a workaround that a user can do to fix the issue, or is it something programmatic in the database?

Comment by Bernardo Garcia Vila [ 03-Jan-2018 ]

Yes, a user workaround on the screen. Let's say there are two parts 2, like on your example, but no part 4. The selector allows the user to change one of those from 2 to 4. The bug still needs to be addressed, but thought you'd like to know.

Fake edit: I've entered the marist link where you reproduced it and have realized it also happens with parts 6, but there aren't parts 7 and 8. So an instructor could change one part 2 to 7 and one part 6 to 8.

Comment by Tiffany Stull [ 03-Jan-2018 ]

Ah, ok, thanks!

Regarding the bug, I guess the question then is for a developer - is the bug I experienced different or the same as the one Sam Lee Pan reported here?  If it's different, I'll create a new jira.  Or maybe there needs to be a parent issue of "part reordering bugs" with two subtasks?

Comment by Bernardo Garcia Vila [ 04-Jan-2018 ]

We're going to change the behaviour of the reordering, so the bug won't be present. Also, I think we shouldn't allow instructors to select the same position for different sections/questions, so we might add an alert to avoid it. Guess we can use this JIRA for all that.

For now, you might also want to know that (I believe) the bug does not appear when ordering questions, only with sections.

Comment by Brandon R. Bucy [ 04-Jan-2018 ]

Hi Bernardo,

It's been my experience that the original description of the issue applies also to questions and not just to parts, as Derek mentioned above.  Within a single part, if you try to reorder questions, it switches questions. i.e. Set up a test with 5 questions in a single part.  If you want to move question 5 to the top space - you change the question number to 1 and click update order. It then switches questions 1 and questions 5.  The expected behavior would be that it would make question 5 into the new question 1, question 1 into the new question 2, and so on until question 4 becomes the new question 5.  

Comment by Bernardo Garcia Vila [ 05-Jan-2018 ]

Yeah, I know. My PR (hopefully) accomplishes that*. But I thought Tiffany (or whoever) might like to know how it was actually behaving until now, because it will still be like that on 11.x versions.

 

*Incrementing consecutive parts instead of swapping. Modified positions will be prioritized, the rest will fill the gaps considering their previous position. Added warning for users choosing repeated destination positions.

Comment by Derek Ramsey [ 01-Feb-2018 ]

Verified part and question ordering is working correctly on nightly 13

Generated at Wed Sep 18 22:05:44 CDT 2019 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.