Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18083 META: Gradebook improvements - Stage 1
  3. MDL-16687

Typo in grade/lib.php causes incorrect sorting

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.5
    • 1.9.2
    • Gradebook
    • None
    • Any
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      The following source (from HEAD as of 9/25/2008) contains a typo in line 105 where 'sortfield1' should be 'sortfield2':

      102 $ofields = ", u.$this->sortfield1 AS usrt1";
      103 $order = "usrt1 $this->sortorder1";
      104 if (!empty($this->sortfield2))

      { 105 $ofields .= ", u.$this->sortfield1 AS usrt2"; 106 $order .= ", usrt2 $this->sortorder2"; 107 }

      The SQL generated by this typo-affected code tries to sort by $this->sortfield1 twice and neglects $this->sortfield2. We didn't notice the problem until one of our instructors encountered it while exporting his gradebook.

      This is a one-character fix.

      Thanks,
      Philip Cali and Adam Zapletal

            skodak Petr Skoda
            pcali1 Philip Cali (Inactive)
            Nicolas Connault Nicolas Connault (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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