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

Feedback activity: multiple dependency problem.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.6
    • Fix Version/s: None
    • Component/s: Feedback
    • Labels:
      None
    • Affected Branches:
      MOODLE_36_STABLE

      Description

      How to reproduce

      • Create question A
      • Create question B, it must have a question A as an element of dependency
      • Create question C, it must have a question B as an element of dependency
      • Create question D
      • Start the activity
      • If you select the correct value in question A, you go to B and so on.
      • However, if you select the wrong value, you should get to question D
        => but you get to question C.

      My fix: (for Moodle 3.3)
      In the "can_see_item" function of the mod/feedback/classes/completion.php file
      A "null" value is returned and I think it should be "false"

       
      diff --git a/mod/feedback/classes/completion.php b/mod/feedback/classes/completion.php
      index 22898408152..56fc14abb23 100644
      --- a/mod/feedback/classes/completion.php
      +++ b/mod/feedback/classes/completion.php
      @@ -165,7 +165,7 @@ class mod_feedback_completion extends mod_feedback_structure {
                   $value = $this->get_values_tmp($ditem);
               }
               if ($value === null) {
      -            return null;
      +            return false;
               }
               return $itemobj->compare_value($ditem, $value, $item->dependvalue) ? true : false;
           }
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Trolli Olivier Piton
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: