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

Edit outcome grade item page is broken

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-77472-401
    • Hide
      1. Log in as admin
      2. Navigate to Advanced features in site administration
      3. Choose Enable outcomes and save changes
      4. Create a course (make a note of it's ID)
      5. Navigate to Gradebook setup (from Grades)
      6. Press Edit > Edit settings for the course grade item
      7. Make a note of the ?id=X parameter in the URL (it's grade ID)
      8. Manually navigate to the following URL:

        <WWWROOT>/grade/edit/tree/item.php?courseid=<COURSEID>&id=<GRADEID>
        

      9. Confirm the reported exception is not shown
      10. Confirm you are redirected to the Edit category page
      Show
      Log in as admin Navigate to Advanced features in site administration Choose Enable outcomes and save changes Create a course (make a note of it's ID) Navigate to Gradebook setup (from Grades ) Press Edit > Edit settings for the course grade item Make a note of the ?id=X parameter in the URL (it's grade ID) Manually navigate to the following URL: <WWWROOT>/grade/edit/tree/item.php?courseid=<COURSEID>&id=<GRADEID> Confirm the reported exception is not shown Confirm you are redirected to the Edit category page

    Description

      1. Enable outcomes in admin/settings.php?section=optionalsubsystems
      2. Create an outcome
      3. Click edit outcome from gradebook setup page

      Observe the error:

      Exception - Argument 1 passed to grade_plugin_return::add_url_params() must be an instance of moodle_url, string given, called in [dirroot]/grade/edit/tree/item.php on line 61
       
      More information about this error
       
      Debug info:
      Error code: generalexceptionmessageĂ—Dismiss this notification
      Stack trace:
      line 1227 of /grade/lib.php: TypeError thrown
      line 61 of /grade/edit/tree/item.php: call to grade_plugin_return->add_url_params()
      

      So this line need to be fixed:

      $url = $CFG->wwwroot.'/grade/edit/tree/outcomeitem.php?id='.$id.'&amp;courseid='.$courseid;
      

      And this too:

              $url = $CFG->wwwroot.'/grade/edit/tree/category.php?id='.$grade_category->id.'&amp;courseid='.$courseid;
      

      Attachments

        1. 400.gif
          400.gif
          393 kB
        2. 401.gif
          401.gif
          370 kB
        3. master.gif
          master.gif
          317 kB

        Issue Links

          Activity

            People

              pholden Paul Holden
              ilyatregubov Ilya Tregubov
              Ilya Tregubov Ilya Tregubov
              Jun Pataleta Jun Pataleta
              Ron Carl Alfon Yu Ron Carl Alfon Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.