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

Scheduler should use standard user fields in Moodle >= 2.6

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Activity

          People

            bostelm Henning Bostelmann
            xxxxxxx Gordon Bateson
            Valery Fremaux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/May/14