Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4865

Scheduler should use standard user fields in Moodle >= 2.6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7
    • 2.6
    • Module: Scheduler
    • None
    • MOODLE_26_STABLE
    • MOODLE_27_STABLE

      displaying newly created Scheduler in Moodle 2.6 gives following warning:

      You need to update your sql to include additional name fields in the user object.
      line 3570 of /lib/moodlelib.php: call to debugging()
      line 775 of /mod/scheduler/teacherview.php: call to fullname()
      line 113 of /mod/scheduler/view.php: call to include()

      Probably you should use the Moodle API, user_picture::fields(...), whenever you create an object to passto the fullname(...) function

      teacherview.php (line 776)

      $members = groups_get_members($group->id, user_picture::fields('u'), 'u.lastname, u.firstname');
      

      locallib.php (line 63)

      $attendants = get_users_by_capability ($context, 'mod/scheduler:attend', user_picture::fields('u'), 'u.lastname, u.firstname', '', '', '', '', false, false, false);
      

      downloads.php (lines 36-49)

      $sql = "
          SELECT DISTINCT
          ".user_picture::fields('u').",
          u.department
          FROM
          {scheduler_slots} s,
          {user} u
          WHERE
          s.teacherid = u.id AND
          schedulerid = ?
          ";
      

      downloads.php (line 132)

      $user = $DB->get_record('user', array('id' => $appointment->studentid), user_picture::fields());
      

      ... and so on

            bostelm Henning Bostelmann
            xxxxxxx Gordon Bateson
            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.