XMLWordPrintable

Details

    • MOODLE_21_STABLE
    • MOODLE_22_STABLE
    • wip-MDL-28646
    • Hide

      Testing core_course_get_contents()
      ==================================

      Get a PHP web service client: https://github.com/moodlehq/sample-ws-clients

      1- Call the core_course_get_contents($courseid) web service function on a big course (for example restore http://hub.moodle.org/?courseid=278)
      2- check that the content you receive is correct (try to check one activity per module type)
      3- finally call this function when the https setting in enabled (all the site in https only). The returned file download urls should be in https (for example for file resource).

      Testing the file download script:
      =================================
      1- Download one of the file url you got from your previous core_course_get_contents(). You'll need to add your ws token at the end (?token=893ny873b873b). Check that you can retrieve the right file.
      2- Set the 'Can download file' in service advance settings to OFF. Then try to download the file again. It should fail.
      3- Try some fail cases from the following list: ip restriction/unvalid date on token/service, user not listed in restricted list, missing required capability, site in maintenance mode, user suspended, user confirmed, user deleted, nologin auth, password expired, web service disabled. I added some info about that in the docs: http://docs.moodle.org/21/en/Web_services_FAQ#What_is_the_.27Access_control_exception.27_error

      Show
      Testing core_course_get_contents() ================================== Get a PHP web service client: https://github.com/moodlehq/sample-ws-clients 1- Call the core_course_get_contents($courseid) web service function on a big course (for example restore http://hub.moodle.org/?courseid=278 ) 2- check that the content you receive is correct (try to check one activity per module type) 3- finally call this function when the https setting in enabled (all the site in https only). The returned file download urls should be in https (for example for file resource). Testing the file download script: ================================= 1- Download one of the file url you got from your previous core_course_get_contents(). You'll need to add your ws token at the end (?token=893ny873b873b). Check that you can retrieve the right file. 2- Set the 'Can download file' in service advance settings to OFF. Then try to download the file again. It should fail. 3- Try some fail cases from the following list: ip restriction/unvalid date on token/service, user not listed in restricted list, missing required capability, site in maintenance mode, user suspended, user confirmed, user deleted, nologin auth, password expired, web service disabled. I added some info about that in the docs: http://docs.moodle.org/21/en/Web_services_FAQ#What_is_the_.27Access_control_exception.27_error

    Description

      This web service will be used to return course activities and their contents. It should be generic to handle files and contents.

      For resource module, it should return files url.

      Needs more details and specs

      Attachments

        Issue Links

          Activity

            People

              jerome Jérôme Mouneyrac
              dongsheng Dongsheng Cai
              Rossiani Wijaya Rossiani Wijaya
              Aparup Banerjee Aparup Banerjee
              Aparup Banerjee Aparup Banerjee
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/11