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

Move sql in index.php to an api

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: BACKEND
    • Component/s: Reports
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to gradebook history report, after all the setup as requested in the parent issue.
      2. Make sure the grader drop down looks ok and containts fullname of all the graders
      3. Select a grader and submit, make sure the table is updated.
      4. Run unit tests in grade/report/history/tests/report_test.php
      Show
      Go to gradebook history report, after all the setup as requested in the parent issue. Make sure the grader drop down looks ok and containts fullname of all the graders Select a grader and submit, make sure the table is updated. Run unit tests in grade/report/history/tests/report_test.php
    • Affected Branches:
      MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-46678-master
    • Story Points:
      5
    • Sprint:
      BACKEND Sprint 15

      Description

      Index.php has the following hardcoded sql

      $sql = "SELECT u.id, ".$DB->sql_concat('u.lastname', "' '", 'u.firstname')."
              FROM {user} u
              JOIN {grade_grades_history} ggh ON ggh.usermodified = u.id
              JOIN {grade_items} gi ON gi.id = ggh.itemid
              WHERE gi.courseid = :courseid
              GROUP BY u.id
              ORDER BY u.lastname ASC, u.firstname ASC";
      

      It needs to be moved to an api.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ankit_frenz Ankit Agarwal
              Reporter:
              ankit_frenz Ankit Agarwal
              Peer reviewer:
              Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: