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

Missing global $OUTPUT in award_criteria_course.php

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_32_STABLE

      Description

      Discovered from a behat test failure which I've been unable to reproduce so far:

          And I press "Create badge" # /store/moodle/behat_whole_suite_test/badges/tests/behat/award_badge.feature:205
            exception 'Exception' with message 'Moodle exception: Exception - Notice: Undefined variable: OUTPUT in [dirroot]/badges/criteria/award_criteria_course.php on line 103 More information about this error
            
                
            ×
                
            Debug info:
             
            Error code: generalexceptionmessage
            
            
                
            ×
                
            Stack trace:
             
            line 158 of /lib/behat/lib.php: Exception thrown
            line 103 of /badges/criteria/award_criteria_course.php: call to behat_error_handler()
            line 87 of /badges/criteria/award_criteria_course.php: call to award_criteria_course->get_details()
            line 102 of /badges/criteria.php: call to award_criteria_course->config_form_criteria()
            ' in /store/moodle/behat_whole_suite_test/lib/behat/behat_base.php:806
      
      

      badges/criteria/award_criteria_course.php::get_details() is missing the global declaration for $OUTPUT used when the requested course was not found.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dobedobedoh Andrew Nicols
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Yuliya Bozhko, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: