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

Teacher problems setting user overrides in quiz (calendar error)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • 2.0.1
    • Calendar, Quiz
    • MOODLE_20_STABLE
    • Moderate

      Detected @ MDLQA-697, after some debugging I was able to get simple steps to reproduce it:

      • As teacher, create quiz, set start/end dates for it.
      • Navigation -> user overrides and create one.
      • Error happens:

      Sorry, but you do not currently have permissions to update calendar event
       
      More information about this error
       
      Stack trace:
      line 421 of /lib/setuplib.php: moodle_exception thrown
      line 1969 of /calendar/lib.php: call to print_error()
      line 2379 of /calendar/lib.php: call to calendar_event->update()
      line 1290 of /mod/quiz/lib.php: call to calendar_event::create()
      line 172 of /mod/quiz/overrideedit.php: call to quiz_update_events()

      It seems that the quiz is trying to create user events, (with eventyped = 'close' ???) and calendar_add_event_allowed() is returning one big false, hence the error above. This is the structure of the event:

      stdClass Object
      (
          [description] => xxxxxxxxxxxx
          [courseid] => 0
          [groupid] => 0
          [userid] => 5
          [modulename] => quiz
          [instance] => 1
          [timestart] => 1445001300
          [timeduration] => 0
          [visible] => 1
          [eventtype] => close
          [name] => One Quiz - Override (Quiz closes)
      )

      Really I'm not sure if the mistake is in the quiz, and how the event is created or in calendar and how event-creation perms are checked. It seems that there are some strange course-user dark logic (implications) there.

      Ciao

            rwijaya Rossiani Wijaya
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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