Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-9267 Moodle 3.1 QA
  3. MDLQA-9720

CLONE - Test mod_assing_get_assignments webservice

XMLWordPrintable

      For testing this issue:

      1. You need to have access to console on your system
      2. Curl and python should be installed on your system.
      3. Have basic understanding of Json

      Prerequisite

      1. Login as admin
      2. Enable web services (Site administration ▶︎ Advanced features)
      3. Enable Rest protocol (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Manage protocols)
      4. Enable mobile web service (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Mobile)
      5. Create a token for teacher (Site administration ▶︎ Plugins ▶︎ Web services ▶︎ Manage tokens)
      6. Save token and use it to replace d49d1fac7125d9fd515c374be8d37c34 in the web service below.

      Test

      1. Login as teacher
      2. Navigate to Activity examples course
      3. Edit "Online Text Assignment" activity
      4. Set "Allow submissions from" to more then a year from now.
      5. Uncheck "Always show description"
      6. Attach few file in description.
      7. Edit "Assignment with file submissions"
      8. Set "Allow submissions from" to some date in past
      9. Uncheck "Always show description"
      10. Attach few file in description
      11. Edit "Assignment with file submissions"
      12. Set "Allow submissions from" to some date in past
      13. Check "Always show description"
      14. Attach few file in description
      15. Run following command on your console (Please remember to replace course id and the token parameters to correct values)

        curl 'https://qa.moodle.net/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=2&wsfunction=mod_assign_get_assignments&wstoken=d49d1fac7125d9fd515c374be8d37c34' | python -m json.tool

      16. Confirm you receive a list of courses with four assignments.
      17. One of the assignments should not display intro, introattachments and introformat (the one you configured to not display always the description and start date 1 year in future)
      18. The other assignments displays description (intro) and a list of attached files (introattachments)

            alrachels AL Rachels
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.