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

Teacher can not edit a course event in calendar unless she created it herself

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 1.7.2
    • Calendar
    • None
    • MOODLE_17_STABLE

      After migrating to 1.7, events that were created by one teacher, can't be edited by another. I found someting in calendar/lib.php that corrected this, but it would be great if someone double checked it...

      function: calendar_edit_event_allowed

      1183 if ($event->userid) {
      1184 if ($event->userid == $USER->id)

      { 1185 return (has_capability('moodle/calendar:manageownentries', $sitecontext)); + 1186 }

      else

      { + 1187 return has_capability( 'moodle/calendar:manageentries', get_context_instance( CONTEXT_COURSE, $event->courseid)); + 1188 }

      1189 } else if ($event->groupid) {
      1190 $group = get_record('groups', 'id', $event->groupid);
      1191 if($group === false)

      { 1192 return false; 1193 }

      It worked for me, but I can't understand why this "else" didn't exist... maybe event->userid should get there empty?

            danmarsden Dan Marsden
            petcheverry Pablo Etcheverry
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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