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

        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, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13