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

Unenrol a user when an activity is disabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.1.4, 4.1.5, 4.4
    • Assignment, Enrolments
    • MOODLE_401_STABLE, MOODLE_404_STABLE

      Error

      When you unenrol a user from a course with an assignment in it, you get an error modal.

      Stack trace:

      SyntaxError: Unexpected token 'T', "The instan"... is not valid JSON
          at parse (<anonymous>)
          at https://clean.m41.dev4.3072.ru/lib/javascript.php/1693468035/lib/jquery/jquery-3.6.1.min.js:2:79614
          at l (https://clean.m41.dev4.3072.ru/lib/javascript.php/1693468035/lib/jquery/jquery-3.6.1.min.js:2:79731)
          at XMLHttpRequest.<anonymous> (https://clean.m41.dev4.3072.ru/lib/javascript.php/1693468035/lib/jquery/jquery-3.6.1.min.js:2:82499)

      The problem is in "The instance of this module does not exist" prepending JSON.
      The error string id is 'moduleinstancedoesnotexist' in 'core_error'.
      mtrace in /lib/grade/grade_item.php line 2588

      Steps

      • Create a course.
      • Add an assignment activity.
      • Enroll a user (student).
      • Hand in the assignment using the student account (probably optional).
      • Grade the assignment (probably optional).
      • Disable Assignment activity in "Manage activities".
      • Unenrol the student.

      We have encountered the same error with another activity (not in the core) in another Moodle site. The same problem is probably relevant to other gradeable activities as well.

            Unassigned Unassigned
            андрейусков Андрей Усков
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

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