XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2, 2.5
    • 2.5
    • Forum, Web Services
    • None
    • MOODLE_22_STABLE, MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • MDL-30098_master
    • Hide

      Test pre-requisites

      • Create a course.
      • Create a forum and assignment in this course.
      • Enrol a user into the course.
      • Create a web service token for the user and the admin.

      Test 1

      1. Create a web service client (similar to the one attached) using the students token, the delete_modules function and passing the course module ids in the params.
      2. Execute the client and ensure you get a require_capability warning.

      Test 2

      1. Edit the token in the web service client and set it to the admin's token.
      2. Ensure you can delete the modules.

      Test 3

      1. Edit the params in the web service to invalid course module ids.
      2. Ensure exception is thrown.

      Test 4

      1. Execute phpunit course/tests/externallib_test.php and ensure there are no failures/errors.
      Show
      Test pre-requisites Create a course. Create a forum and assignment in this course. Enrol a user into the course. Create a web service token for the user and the admin. Test 1 Create a web service client (similar to the one attached) using the students token, the delete_modules function and passing the course module ids in the params. Execute the client and ensure you get a require_capability warning. Test 2 Edit the token in the web service client and set it to the admin's token. Ensure you can delete the modules. Test 3 Edit the params in the web service to invalid course module ids. Ensure exception is thrown. Test 4 Execute phpunit course/tests/externallib_test.php and ensure there are no failures/errors.

    Description

      Create a delete_modules() WS function that can be used by all modules.

      Attachments

        1. ws_client.php
          1 kB
          Mark Nelson
        2. ws_curl.php
          18 kB
          Mark Nelson

        Issue Links

          Activity

            People

              markn Mark Nelson
              jerome Jérôme Mouneyrac
              Jérôme Mouneyrac Jérôme Mouneyrac
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Adrian Greeve Adrian Greeve
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13