Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-37232

Regression: copying from question pools sets some questions index to the same number, which also prevents reordering the questions

    XMLWordPrintable

    Details

    • Type: (Deprecated) Contributed Patch
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0, 10.1
    • Fix Version/s: 10.3
    • Labels:
    • 10 status:
      Resolved
    • Previous Issue Keys:
      SAM-2395

      Description

      Steps to reproduce:

      • In a quiz, Add Question: Copy from Question Pool
      • Select a pool with questions
      • Select a few questions from the pool and import
      • Notice the questions will be imported with the same 'number' (sequence number)
      • Try to change one of the questions that has the same 'number' as another question
      • Notice that all questions with the same number will be changed to the number selected in the previous step

      The problem is some over-complication in the algorithm that is copying the questions. During testing, we didn't immediately become aware of this because we were focused solely on the order in which the questions were imported into the quiz (which does preserve the order). However, we didn't notice the problem with the 'sequence' number until a few days ago.

      The attached patch fixes the function performing the copy/sort by reverting some of the original functionality, and by changing the sorted collection from a TreeMap to a TreeSet.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  bjones86 Brian Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code