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

PHP warning when visiting tool_monitor page directly.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.8
    • Component/s: Reports
    • Labels:
    • Testing Instructions:
      Hide
      Test 1
      1. Log in as a student.
      2. Visit <yoursite>/admin/tool/monitor/index.php.
      3. Ensure there is no PHP warning.
      Test 2
      1. Log in as an admin.
      2. Visit <yoursite>/admin/tool/monitor/index.php.
      3. Edit the file course/lib.php and change the 'COURSE_MAX_COURSES_PER_DROPDOWN' value to less than the number of courses in the select box.
      4. Reload the page and ensure the select box is not displayed.
      Show
      Test 1 Log in as a student. Visit <yoursite>/admin/tool/monitor/index.php. Ensure there is no PHP warning. Test 2 Log in as an admin. Visit <yoursite>/admin/tool/monitor/index.php. Edit the file course/lib.php and change the 'COURSE_MAX_COURSES_PER_DROPDOWN' value to less than the number of courses in the select box. Reload the page and ensure the select box is not displayed.
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-47778_master

      Description

      1. Log in as a student.
      2. Visit <yoursite>/admin/tool/monitor/index.php.
      3. Notice you receive the following warning -

      Warning: Invalid argument supplied for foreach() in /Users/mark/htdocs/mstorage/sm/moodle/admin/tool/monitor/classes/output/managesubs/rules.php on line 163
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markn Mark Nelson
              Reporter:
              markn Mark Nelson
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Dan Poltawski
              Tester:
              Zachary Durber
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Nov/14