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

Exercise - League Table Error When userid Is 0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.9
    • Fix Version/s: STABLE backlog
    • Component/s: Other
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      The League table is looking up the "teacher" submission which is assigned userid = 0 in the mdl_exercise_submissions table.

      Since user 0 does not exist, it always shows the error:

      Print league table: user not found

      A patch is attached for mod/exercise/locallib.php that fixes this error by adding an if statement to continue when userid = 0 in:

      function exercise_print_league_table($exercise) {

      To reproduce the issue, view the League table for any exercise activity with submissions.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: