Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-66009

Nested dependency in mod_feedback fails again

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.6, 3.6.4, 3.7
    • Fix Version/s: 3.6.7, 3.7.3
    • Component/s: Feedback
    • Labels:
    • Testing Instructions:
      Hide
      Setup
      1. Create a feedback activity with the following "Multiple choice - single answer" questions having nested dependencies like this:
        Question-1
        Answers: A, B
        Question-2 depends on Question-1 = "A"
        Answers: A, B
        Question-3 depends on Question-1 = "B"
        Answers: A, B
        Question-4 depends on Question-2 = "A"
        Answers: Yes, No
        Question-5 depends on Question-3 = "A"
        Answers: Yes, No
        (Make sure to add a page break between questions)
      Test
      1. Login as User and complete this feedback in the following manner:
        1. On Question-1, select "A" then press "Next page"
        2. You should be on "Question-2", select "A" then press "Next page"
        3. You should be on "Question-4", select "Yes" then press "Previous page".
        4. Press "Previous page" until you're back in Question-1.
        5. Back on Question 1, select "B" then press "Next page"
        6. Confirm that you are redirected to "Question-3".
        7. Select "A" then press "Next page"
        8. Confirm that you are redirected to "Question-5".
        9. Select "Yes" and press "Submit your answers"
      2. Login as editing teacher and go to the "Show responses" page
      3. Confirm that only the responses for questions 1, 3, and 5 are recorded.
      Bonus
      1. Repeat the test for MDL-63959 and confirm that everything still works as expected.
      Show
      Setup Create a feedback activity with the following " Multiple choice - single answer " questions having nested dependencies like this: Question-1 Answers: A, B Question-2 depends on Question-1 = "A" Answers: A, B Question-3 depends on Question-1 = "B" Answers: A, B Question-4 depends on Question-2 = "A" Answers: Yes, No Question-5 depends on Question-3 = "A" Answers: Yes, No (Make sure to add a page break between questions) Test Login as User and complete this feedback in the following manner: On Question-1, select "A" then press " Next page " You should be on " Question-2 ", select " A " then press " Next page " You should be on " Question-4 ", select " Yes " then press " Previous page ". Press " Previous page " until you're back in Question-1. Back on Question 1, select " B " then press " Next page " Confirm that you are redirected to " Question-3 ". Select " A " then press " Next page " Confirm that you are redirected to " Question-5 ". Select " Yes " and press " Submit your answers " Login as editing teacher and go to the "Show responses" page Confirm that only the responses for questions 1, 3, and 5 are recorded. Bonus Repeat the test for MDL-63959 and confirm that everything still works as expected.
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:
      MDL-66009-master

      Description

      If the feedback contains nested dependencies the items are not checked recursively for dependencies in higher levels. This causes wrong results if the user goes back and forth while competing this feedback.

      Steps to reproduce:

      Given:

      ---------------------------------------------

      Question-1
      Answers: A, B

      Question-2 depends on Question-1 = "A"
      Answers: A, B

      Question-3 depends on Question-1 = "B"
      Answers: A, B

      Question-4 depends on Question-2 = "A"
      Answers: Yes, No

      Question-5 depends on Question-3 = "A"
      Answers: Yes, No

      ---------------------------------------------

      The user does the following steps:

      ---------------------------------------------

      Sees Question-1
      Answer is: A

      Sees Question-2
      Answer is A

      Sees Question-4
      Answer is Yes

      Goes back till question-1
      Sees Question-1
      Answer is: B

      Sees Question-3
      Answer is: A

      Sees Question-5
      Answer is: Yes
      (He also mistakenly sees Question-4 because the dependency is solved)

      Submits his answers

      On show responses the answer to Question-4 is mistakanly shown.

      ---------------------------------------------

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 41 minutes
                  2h 41m