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

Remove IN from sql statments in Basic report plugin

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2.1
    • Component/s: SCORM
    • Labels:

      Description

      In mod/scorm/report/basic/report.php
      SQL IN statements are used as mentioned below:-
      $where = ' WHERE u.id IN (' .$allowedlist. ') AND st.userid IS NOT NULL';
      $where = ' WHERE u.id IN (' .$allowedlist. ') AND st.userid IS NULL';
      $where = ' WHERE u.id IN (' .$allowedlist. ') AND (st.userid IS NOT NULL OR st.userid IS NULL)';

      as per new moodle standards no sql statements should use IN directly in this way
      Reference: http://docs.moodle.org/dev/DB_layer_2.0_migration_docs#The_golden_changes (G7)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ankit_frenz Ankit Agarwal
              Reporter:
              ankit_frenz Ankit Agarwal
              Peer reviewer:
              Tim Hunt
              Integrator:
              Sam Hemelryk
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jan/12