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

Make stricter LIMIT param checking for -1, ''

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Prerequesites:

      • Moodle needs to be workign to send email, I suggest using $CFG->divertallemailsto so we don't have to worry about email addressses.
      • My config:

        $CFG->smtphosts = 'smtp.highway1.com.au';
        $CFG->divertallemailsto = 'talktodan@gmail.com';
        

      Testing:

      1. Run behat & phpunit tests and ensure there are no debugging messages about invalid params
      2. Browse around Moodle with DEBUG_DEVELOPER turned on and VERIFY there are not invalid params debugging messages when doing the following:
      3. Ensure that the teacher role is selected in 'Course contacts' admin setting (Site administration / ▶ Appearance / ▶ Courses '')
      4. In a course, enable the self enrolment activity.
      5. As a student who isn't enrolled, go to the course - they should be asked to self enrol
      6. Click 'enrol me'
      7. You should recieve an email welcome message to the course..
      8. In a course with activity...
      9. Visit reports -> logs page and click 'get logs'
      10. Change the option to download the files as csv, ODS and excel format and ensure each file downlaods and opens correctly.
      11. Change the 'all particpants' dropdown to select a specific user and click 'get logs'
      12. As admin: Add 'paella' to your interests in your user profile
      13. Click on 'paella' in your user profile page. Ensure you see yourself in the list of users tagged with 'paella'.
      Show
      Prerequesites: Moodle needs to be workign to send email, I suggest using $CFG->divertallemailsto so we don't have to worry about email addressses. My config: $CFG->smtphosts = 'smtp.highway1.com.au'; $CFG->divertallemailsto = 'talktodan@gmail.com'; Testing: Run behat & phpunit tests and ensure there are no debugging messages about invalid params Browse around Moodle with DEBUG_DEVELOPER turned on and VERIFY there are not invalid params debugging messages when doing the following: Ensure that the teacher role is selected in 'Course contacts' admin setting (Site administration / ▶ Appearance / ▶ Courses '') In a course, enable the self enrolment activity. As a student who isn't enrolled, go to the course - they should be asked to self enrol Click 'enrol me' You should recieve an email welcome message to the course.. In a course with activity... Visit reports -> logs page and click 'get logs' Change the option to download the files as csv, ODS and excel format and ensure each file downlaods and opens correctly. Change the 'all particpants' dropdown to select a specific user and click 'get logs' As admin: Add 'paella' to your interests in your user profile Click on 'paella' in your user profile page. Ensure you see yourself in the list of users tagged with 'paella'.
    • Affected Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-43677-master

      Description

      Following on from MDL-43395, we want to move to stricter validation of limit params in database functions and propose to add a DEVELOPER_DEBUG warning about the use of empty strings '' and -1.

      Note that historically we have used these sort of params in other library functions as default values and so we'll have to change the param of quite a few library functions as well.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              poltawski Dan Poltawski
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: