moodle_rb 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -1
  3. data/lib/moodle_rb/courses.rb +25 -5
  4. data/lib/moodle_rb/version.rb +1 -1
  5. data/spec/lib/moodle_rb/courses_spec.rb +61 -4
  6. metadata +10 -120
  7. data/.github/workflows/build.yml +0 -36
  8. data/.github/workflows/publish.yml +0 -27
  9. data/.gitignore +0 -35
  10. data/.travis.yml +0 -9
  11. data/Dockerfile +0 -10
  12. data/Gemfile +0 -2
  13. data/docker-compose.yml +0 -6
  14. data/moodle_rb.gemspec +0 -26
  15. data/spec/cassettes/MoodleRb_Categories/_create/.yml +0 -39
  16. data/spec/cassettes/MoodleRb_Categories/_create/when_validation_fails/.yml +0 -39
  17. data/spec/cassettes/MoodleRb_Categories/_destroy/when_using_invalid_token/.yml +0 -39
  18. data/spec/cassettes/MoodleRb_Categories/_destroy/when_using_valid_token/.yml +0 -76
  19. data/spec/cassettes/MoodleRb_Categories/_index/.yml +0 -39
  20. data/spec/cassettes/MoodleRb_Categories/_index/when_using_invalid_token/.yml +0 -39
  21. data/spec/cassettes/MoodleRb_Categories/_show/.yml +0 -39
  22. data/spec/cassettes/MoodleRb_Categories/_show/when_using_invalid_token/.yml +0 -39
  23. data/spec/cassettes/MoodleRb_Client/_site_info/when_invalid_token/.yml +0 -39
  24. data/spec/cassettes/MoodleRb_Client/_site_info/when_valid_token/.yml +0 -39
  25. data/spec/cassettes/MoodleRb_Courses/_contents/when_using_invalid_token/.yml +0 -52
  26. data/spec/cassettes/MoodleRb_Courses/_contents/when_using_valid_token/.yml +0 -52
  27. data/spec/cassettes/MoodleRb_Courses/_create/.yml +0 -39
  28. data/spec/cassettes/MoodleRb_Courses/_create/when_validation_fails/.yml +0 -75
  29. data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_invalid_token/.yml +0 -39
  30. data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_valid_token/.yml +0 -75
  31. data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_valid_token/when_using_invalid_course_id/.yml +0 -39
  32. data/spec/cassettes/MoodleRb_Courses/_enrolled_users/when_using_invalid_token/.yml +0 -39
  33. data/spec/cassettes/MoodleRb_Courses/_enrolled_users/when_using_valid_token/.yml +0 -75
  34. data/spec/cassettes/MoodleRb_Courses/_grade_items/when_using_invalid_token/.yml +0 -52
  35. data/spec/cassettes/MoodleRb_Courses/_grade_items/when_using_valid_token/.yml +0 -56
  36. data/spec/cassettes/MoodleRb_Courses/_index/.yml +0 -39
  37. data/spec/cassettes/MoodleRb_Courses/_index/when_using_invalid_token/.yml +0 -39
  38. data/spec/cassettes/MoodleRb_Courses/_module/when_using_invalid_token/.yml +0 -52
  39. data/spec/cassettes/MoodleRb_Courses/_module/when_using_valid_token/.yml +0 -51
  40. data/spec/cassettes/MoodleRb_Courses/_search/.yml +0 -102
  41. data/spec/cassettes/MoodleRb_Courses/_search/when_using_invalid_token/.yml +0 -55
  42. data/spec/cassettes/MoodleRb_Courses/_show/.yml +0 -39
  43. data/spec/cassettes/MoodleRb_Courses/_show/when_using_invalid_token/.yml +0 -39
  44. data/spec/cassettes/MoodleRb_Enrolments/_create/.yml +0 -39
  45. data/spec/cassettes/MoodleRb_Enrolments/_create/when_user_or_course_id_is_invalid/.yml +0 -39
  46. data/spec/cassettes/MoodleRb_Enrolments/_destroy/.yml +0 -51
  47. data/spec/cassettes/MoodleRb_Enrolments/_destroy/when_user_or_course_id_is_invalid/.yml +0 -52
  48. data/spec/cassettes/MoodleRb_Grades/_by_assignment/.yml +0 -39
  49. data/spec/cassettes/MoodleRb_Grades/_by_course/.yml +0 -39
  50. data/spec/cassettes/MoodleRb_Grades/_by_course/when_invalid_parameters/.yml +0 -39
  51. data/spec/cassettes/MoodleRb_Users/_create/.yml +0 -39
  52. data/spec/cassettes/MoodleRb_Users/_create/when_missing_required_parameters/.yml +0 -39
  53. data/spec/cassettes/MoodleRb_Users/_destroy/.yml +0 -39
  54. data/spec/cassettes/MoodleRb_Users/_destroy/when_id_does_not_exist/.yml +0 -39
  55. data/spec/cassettes/MoodleRb_Users/_destroy/when_using_invalid_token/.yml +0 -39
  56. data/spec/cassettes/MoodleRb_Users/_enrolled_courses/.yml +0 -39
  57. data/spec/cassettes/MoodleRb_Users/_enrolled_courses/when_using_invalid_token/.yml +0 -39
  58. data/spec/cassettes/MoodleRb_Users/_search/.yml +0 -39
  59. data/spec/cassettes/MoodleRb_Users/_search/when_using_invalid_token/.yml +0 -39
  60. data/spec/cassettes/MoodleRb_Users/_search_identity/.yml +0 -51
  61. data/spec/cassettes/MoodleRb_Users/_search_identity/when_using_invalid_token/.yml +0 -52
  62. data/spec/cassettes/MoodleRb_Users/_show/.yml +0 -39
  63. data/spec/cassettes/MoodleRb_Users/_show/when_using_invalid_token/.yml +0 -39
  64. data/spec/cassettes/MoodleRb_Users/_update/.yml +0 -39
  65. data/spec/cassettes/MoodleRb_Users/_update/when_using_invalid_token/.yml +0 -39
@@ -1,75 +0,0 @@
1
- ---
2
- recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
5
- method: post
6
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_create_courses&wstoken=60fc9c9415259404795094957e4ab32f
7
- body:
8
- string: courses[0][fullname]=Test%20Course&courses[0][idnumber]=ExtRef&courses[0][shortname]=TestC1&courses[0][categoryid]=1
9
- headers: {}
10
-
11
- response:
12
- status:
13
- code: 200
14
- message: OK
15
- headers:
16
- Date:
17
- - Mon, 20 Jun 2016 22:21:27 GMT
18
- Server:
19
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.20.0
20
- Accept-Ranges:
21
- - none
22
- Pragma:
23
- - no-cache
24
- Expires:
25
- - Thu, 01 Jan 1970 00:00:00 GMT
26
- Cache-Control:
27
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
28
- Access-Control-Allow-Origin:
29
- - "*"
30
- Content-Length:
31
- - "32"
32
- X-Powered-By:
33
- - PHP/5.6.2
34
- Content-Type:
35
- - application/json
36
- body:
37
- string: "[{\"id\":15,\"shortname\":\"TestC1\"}]"
38
- http_version:
39
- recorded_at: Mon, 20 Jun 2016 22:21:27 GMT
40
- - request:
41
- method: post
42
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_delete_courses&wstoken=60fc9c9415259404795094957e4ab32f
43
- body:
44
- string: courseids[0]=15
45
- headers: {}
46
-
47
- response:
48
- status:
49
- code: 200
50
- message: OK
51
- headers:
52
- Date:
53
- - Mon, 20 Jun 2016 22:21:27 GMT
54
- Server:
55
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.20.0
56
- Accept-Ranges:
57
- - none
58
- Pragma:
59
- - no-cache
60
- Expires:
61
- - Thu, 01 Jan 1970 00:00:00 GMT
62
- Cache-Control:
63
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
64
- Access-Control-Allow-Origin:
65
- - "*"
66
- Content-Length:
67
- - "15"
68
- X-Powered-By:
69
- - PHP/5.6.2
70
- Content-Type:
71
- - application/json
72
- body:
73
- string: "{\"warnings\":[]}"
74
- http_version:
75
- recorded_at: Mon, 20 Jun 2016 22:21:27 GMT
@@ -1,39 +0,0 @@
1
- ---
2
- recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
5
- method: post
6
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_delete_courses&wstoken=60fc9c9415259404795094957e4ab32f
7
- body:
8
- string: courseids[0]=-1
9
- headers: {}
10
-
11
- response:
12
- status:
13
- code: 200
14
- message: OK
15
- headers:
16
- Date:
17
- - Mon, 20 Jun 2016 22:21:27 GMT
18
- Server:
19
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.20.0
20
- Accept-Ranges:
21
- - none
22
- Pragma:
23
- - no-cache
24
- Expires:
25
- - Thu, 01 Jan 1970 00:00:00 GMT
26
- Cache-Control:
27
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
28
- Access-Control-Allow-Origin:
29
- - "*"
30
- Content-Length:
31
- - "115"
32
- X-Powered-By:
33
- - PHP/5.6.2
34
- Content-Type:
35
- - application/json
36
- body:
37
- string: "{\"warnings\":[{\"item\":\"course\",\"itemid\":-1,\"warningcode\":\"unknowncourseidnumber\",\"message\":\"Unknown course ID -1\"}]}"
38
- http_version:
39
- recorded_at: Mon, 20 Jun 2016 22:21:27 GMT
@@ -1,39 +0,0 @@
1
- ---
2
- recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
5
- method: post
6
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_enrol_get_enrolled_users&wstoken=
7
- body:
8
- string: courseid=8
9
- headers: {}
10
-
11
- response:
12
- status:
13
- code: 200
14
- message: OK
15
- headers:
16
- Pragma:
17
- - no-cache
18
- Cache-Control:
19
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
20
- Server:
21
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.20.0
22
- Content-Type:
23
- - application/json
24
- Date:
25
- - Mon, 20 Jun 2016 22:26:04 GMT
26
- Accept-Ranges:
27
- - none
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Content-Length:
31
- - "103"
32
- Access-Control-Allow-Origin:
33
- - "*"
34
- X-Powered-By:
35
- - PHP/5.6.2
36
- body:
37
- string: "{\"exception\":\"moodle_exception\",\"errorcode\":\"invalidtoken\",\"message\":\"Invalid token - token not found\"}"
38
- http_version:
39
- recorded_at: Mon, 20 Jun 2016 22:26:04 GMT
@@ -1,75 +0,0 @@
1
- ---
2
- recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
5
- method: post
6
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=enrol_manual_enrol_users&wstoken=60fc9c9415259404795094957e4ab32f
7
- body:
8
- string: enrolments[0][userid]=3&enrolments[0][courseid]=8&enrolments[0][roleid]=5
9
- headers: {}
10
-
11
- response:
12
- status:
13
- code: 200
14
- message: OK
15
- headers:
16
- Content-Type:
17
- - application/json
18
- X-Powered-By:
19
- - PHP/5.6.2
20
- Pragma:
21
- - no-cache
22
- Server:
23
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.20.0
24
- Accept-Ranges:
25
- - none
26
- Content-Length:
27
- - "4"
28
- Access-Control-Allow-Origin:
29
- - "*"
30
- Expires:
31
- - Thu, 01 Jan 1970 00:00:00 GMT
32
- Date:
33
- - Mon, 20 Jun 2016 22:25:42 GMT
34
- Cache-Control:
35
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
36
- body:
37
- string: "null"
38
- http_version:
39
- recorded_at: Mon, 20 Jun 2016 22:25:42 GMT
40
- - request:
41
- method: post
42
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_enrol_get_enrolled_users&wstoken=60fc9c9415259404795094957e4ab32f
43
- body:
44
- string: courseid=8
45
- headers: {}
46
-
47
- response:
48
- status:
49
- code: 200
50
- message: OK
51
- headers:
52
- Content-Type:
53
- - application/json
54
- X-Powered-By:
55
- - PHP/5.6.2
56
- Pragma:
57
- - no-cache
58
- Server:
59
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.20.0
60
- Accept-Ranges:
61
- - none
62
- Content-Length:
63
- - "4162"
64
- Access-Control-Allow-Origin:
65
- - "*"
66
- Expires:
67
- - Thu, 01 Jan 1970 00:00:00 GMT
68
- Date:
69
- - Mon, 20 Jun 2016 22:25:42 GMT
70
- Cache-Control:
71
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
72
- body:
73
- string: "[{\"id\":3,\"firstname\":\"- Test\",\"lastname\":\"-\",\"fullname\":\"- Test -\",\"email\":\"test@localhost\",\"firstaccess\":1405378463,\"lastaccess\":1405379119,\"description\":\"\",\"descriptionformat\":1,\"city\":\"Somewhere\",\"country\":\"AU\",\"profileimageurlsmall\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/15\\/user\\/icon\\/f2\",\"profileimageurl\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/15\\/user\\/icon\\/f1\",\"groups\":[],\"roles\":[{\"roleid\":5,\"name\":\"\",\"shortname\":\"student\",\"sortorder\":0}],\"enrolledcourses\":[{\"id\":8,\"fullname\":\"Manage operational plan (BSBMGT515A)\",\"shortname\":\"BSBMGT515A\"}]},{\"id\":14,\"firstname\":\"Test17\",\"lastname\":\"Moodle\",\"fullname\":\"Test17 Moodle\",\"email\":\"samg17@jobready.com.au\",\"firstaccess\":0,\"lastaccess\":0,\"profileimageurlsmall\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/90\\/user\\/icon\\/f2\",\"profileimageurl\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/90\\/user\\/icon\\/f1\",\"groups\":[],\"roles\":[{\"roleid\":5,\"name\":\"\",\"shortname\":\"student\",\"sortorder\":0}],\"enrolledcourses\":[{\"id\":11,\"fullname\":\"Undertake project work (BSBPMG522A)\",\"shortname\":\"BSBPMG522A\"},{\"id\":10,\"fullname\":\"Ensure team effectiveness (BSBWOR502B)\",\"shortname\":\"BSBWOR502B\"},{\"id\":9,\"fullname\":\"Manage risk (BSBRSK501B)\",\"shortname\":\"BSBRSK501B\"},{\"id\":8,\"fullname\":\"Manage operational plan (BSBMGT515A)\",\"shortname\":\"BSBMGT515A\"},{\"id\":7,\"fullname\":\"Manage people performance (BSBMGT502B)\",\"shortname\":\"BSBMGT502B\"},{\"id\":6,\"fullname\":\"Manage budgets and financial plans (BSBFIM501A)\",\"shortname\":\"BSBFIM501A\"},{\"id\":5,\"fullname\":\"Facilitate continuous improvement (BSBMGT516C)\",\"shortname\":\"BSBMGT516C\"},{\"id\":4,\"fullname\":\"Manage personal work priorities and professional development (BSBWOR501B)\",\"shortname\":\"BSBWOR501B\"}]},{\"id\":15,\"firstname\":\"Test18\",\"lastname\":\"Moodle\",\"fullname\":\"Test18 Moodle\",\"email\":\"samg18@jobready.com.au\",\"firstaccess\":0,\"lastaccess\":0,\"profileimageurlsmall\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/91\\/user\\/icon\\/f2\",\"profileimageurl\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/91\\/user\\/icon\\/f1\",\"groups\":[],\"roles\":[{\"roleid\":5,\"name\":\"\",\"shortname\":\"student\",\"sortorder\":0}],\"enrolledcourses\":[{\"id\":12,\"fullname\":\"CHC43015-Sydney\",\"shortname\":\"CHC43015\"},{\"id\":11,\"fullname\":\"Undertake project work (BSBPMG522A)\",\"shortname\":\"BSBPMG522A\"},{\"id\":10,\"fullname\":\"Ensure team effectiveness (BSBWOR502B)\",\"shortname\":\"BSBWOR502B\"},{\"id\":9,\"fullname\":\"Manage risk (BSBRSK501B)\",\"shortname\":\"BSBRSK501B\"},{\"id\":8,\"fullname\":\"Manage operational plan (BSBMGT515A)\",\"shortname\":\"BSBMGT515A\"},{\"id\":7,\"fullname\":\"Manage people performance (BSBMGT502B)\",\"shortname\":\"BSBMGT502B\"},{\"id\":6,\"fullname\":\"Manage budgets and financial plans (BSBFIM501A)\",\"shortname\":\"BSBFIM501A\"},{\"id\":5,\"fullname\":\"Facilitate continuous improvement (BSBMGT516C)\",\"shortname\":\"BSBMGT516C\"},{\"id\":4,\"fullname\":\"Manage personal work priorities and professional development (BSBWOR501B)\",\"shortname\":\"BSBWOR501B\"}]},{\"id\":16,\"firstname\":\"Test19\",\"lastname\":\"Moodle\",\"fullname\":\"Test19 Moodle\",\"email\":\"samg19@jobready.com.au\",\"firstaccess\":0,\"lastaccess\":0,\"profileimageurlsmall\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/92\\/user\\/icon\\/f2\",\"profileimageurl\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/92\\/user\\/icon\\/f1\",\"groups\":[],\"roles\":[{\"roleid\":5,\"name\":\"\",\"shortname\":\"student\",\"sortorder\":0}],\"enrolledcourses\":[{\"id\":12,\"fullname\":\"CHC43015-Sydney\",\"shortname\":\"CHC43015\"},{\"id\":11,\"fullname\":\"Undertake project work (BSBPMG522A)\",\"shortname\":\"BSBPMG522A\"},{\"id\":10,\"fullname\":\"Ensure team effectiveness (BSBWOR502B)\",\"shortname\":\"BSBWOR502B\"},{\"id\":9,\"fullname\":\"Manage risk (BSBRSK501B)\",\"shortname\":\"BSBRSK501B\"},{\"id\":8,\"fullname\":\"Manage operational plan (BSBMGT515A)\",\"shortname\":\"BSBMGT515A\"},{\"id\":7,\"fullname\":\"Manage people performance (BSBMGT502B)\",\"shortname\":\"BSBMGT502B\"},{\"id\":6,\"fullname\":\"Manage budgets and financial plans (BSBFIM501A)\",\"shortname\":\"BSBFIM501A\"},{\"id\":5,\"fullname\":\"Facilitate continuous improvement (BSBMGT516C)\",\"shortname\":\"BSBMGT516C\"},{\"id\":4,\"fullname\":\"Manage personal work priorities and professional development (BSBWOR501B)\",\"shortname\":\"BSBWOR501B\"}]}]"
74
- http_version:
75
- recorded_at: Mon, 20 Jun 2016 22:25:42 GMT
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=gradereport_user_get_grade_items&wstoken=
6
- body:
7
- encoding: UTF-8
8
- string: courseid=5&userid=0&groupid=0
9
- headers: {}
10
- response:
11
- status:
12
- code: 200
13
- message: OK
14
- headers:
15
- Accept-Ranges:
16
- - bytes
17
- - none
18
- Access-Control-Allow-Origin:
19
- - "*"
20
- Age:
21
- - '0'
22
- Cache-Control:
23
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
24
- Content-Type:
25
- - application/json
26
- Date:
27
- - Wed, 12 Jan 2022 00:08:37 GMT
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Pragma:
31
- - no-cache
32
- Server:
33
- - Moodle
34
- X-Cache:
35
- - MISS
36
- X-Clacks-Overhead:
37
- - GNU Terry Pratchett
38
- X-Ec2-Instance-Id:
39
- - i-0afd4744d7a60c5d7
40
- X-Powered-By:
41
- - Moodle Ninjas
42
- Content-Length:
43
- - '103'
44
- Connection:
45
- - keep-alive
46
- body:
47
- encoding: UTF-8
48
- string: '{"exception":"moodle_exception","errorcode":"invalidtoken","message":"Invalid
49
- token - token not found"}'
50
- http_version:
51
- recorded_at: Wed, 12 Jan 2022 00:08:03 GMT
52
- recorded_with: VCR 2.9.3
@@ -1,56 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=gradereport_user_get_grade_items&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
7
- encoding: UTF-8
8
- string: courseid=5&userid=0&groupid=0
9
- headers: {}
10
- response:
11
- status:
12
- code: 200
13
- message: OK
14
- headers:
15
- Accept-Ranges:
16
- - bytes
17
- - none
18
- Access-Control-Allow-Origin:
19
- - "*"
20
- Age:
21
- - '0'
22
- Cache-Control:
23
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
24
- Content-Type:
25
- - application/json
26
- Date:
27
- - Wed, 12 Jan 2022 00:08:37 GMT
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Pragma:
31
- - no-cache
32
- Server:
33
- - Moodle
34
- X-Cache:
35
- - MISS
36
- X-Clacks-Overhead:
37
- - GNU Terry Pratchett
38
- X-Ec2-Instance-Id:
39
- - i-08adafc8cf93e6451
40
- X-Powered-By:
41
- - Moodle Ninjas
42
- Content-Length:
43
- - '1245'
44
- Connection:
45
- - keep-alive
46
- body:
47
- encoding: UTF-8
48
- string: '{"usergrades":[{"courseid":5,"courseidnumber":"1234","userid":4,"userfullname":"API
49
- User","useridnumber":"","maxdepth":2,"gradeitems":[{"id":7,"itemname":"An
50
- assignment","itemtype":"mod","itemmodule":"assign","iteminstance":1,"itemnumber":0,"idnumber":"","categoryid":5,"outcomeid":null,"scaleid":null,"locked":false,"cmid":21,"weightraw":1,"weightformatted":"100.00
51
- %","graderaw":50,"gradedatesubmitted":null,"gradedategraded":1633307813,"gradehiddenbydate":false,"gradeneedsupdate":false,"gradeishidden":false,"gradeislocked":false,"gradeisoverridden":true,"gradeformatted":"50.00","grademin":0,"grademax":100,"rangeformatted":"0–100","percentageformatted":"50.00
52
- %","feedback":"","feedbackformat":0},{"id":6,"itemname":null,"itemtype":"course","itemmodule":null,"iteminstance":5,"itemnumber":null,"idnumber":null,"categoryid":null,"outcomeid":null,"scaleid":null,"locked":false,"graderaw":60,"gradedatesubmitted":null,"gradedategraded":1633307813,"gradehiddenbydate":false,"gradeneedsupdate":false,"gradeishidden":false,"gradeislocked":false,"gradeisoverridden":true,"gradeformatted":"60.00","grademin":0,"grademax":100,"rangeformatted":"0–100","percentageformatted":"60.00
53
- %","feedback":null,"feedbackformat":0}]}],"warnings":[]}'
54
- http_version:
55
- recorded_at: Wed, 12 Jan 2022 00:08:03 GMT
56
- recorded_with: VCR 2.9.3
@@ -1,39 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_courses&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
7
- string: ""
8
- headers: {}
9
-
10
- response:
11
- status:
12
- code: 200
13
- message: OK
14
- headers:
15
- Access-Control-Allow-Origin:
16
- - "*"
17
- X-Powered-By:
18
- - PHP/5.6.2
19
- Expires:
20
- - Thu, 01 Jan 1970 00:00:00 GMT
21
- Server:
22
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zd DAV/2 mod_perl/2.0.8 Perl/v5.20.0
23
- Pragma:
24
- - no-cache
25
- Accept-Ranges:
26
- - none
27
- Content-Type:
28
- - application/json
29
- Date:
30
- - Sun, 12 Apr 2015 00:51:46 GMT
31
- Content-Length:
32
- - "1905"
33
- Cache-Control:
34
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
35
- body:
36
- string: "[{\"id\":1,\"shortname\":\"Moodle 2.8\",\"categoryid\":0,\"categorysortorder\":1,\"fullname\":\"Moodle 2.8\",\"idnumber\":\"\",\"summary\":\"<h2 style=\\\"font-size: large;\\\">Moodle<span style=\\\"font-size: 1.8em; color: red;\\\">4<\\/span>Mac<\\/h2>\\r\\n<p>This package for OS&nbsp;X comes with Moodle&nbsp;2.8.5+ and MAMP 3.0.7.3.&nbsp;We hope you will like it!<\\/p>\",\"summaryformat\":1,\"format\":\"site\",\"showgrades\":1,\"newsitems\":3,\"startdate\":0,\"numsections\":1,\"maxbytes\":0,\"showreports\":0,\"visible\":1,\"groupmode\":0,\"groupmodeforce\":0,\"defaultgroupingid\":0,\"timecreated\":1405375287,\"timemodified\":1426316351,\"enablecompletion\":0,\"completionnotify\":0,\"lang\":\"\",\"forcetheme\":\"\",\"courseformatoptions\":[{\"name\":\"numsections\",\"value\":1}]},{\"id\":2,\"shortname\":\"About\",\"categoryid\":1,\"categorysortorder\":10001,\"fullname\":\"About Moodle4Mac\",\"idnumber\":\"\",\"summary\":\"\",\"summaryformat\":1,\"format\":\"topics\",\"showgrades\":1,\"newsitems\":0,\"startdate\":1404165600,\"numsections\":2,\"maxbytes\":10485760,\"showreports\":0,\"visible\":1,\"hiddensections\":1,\"groupmode\":0,\"groupmodeforce\":0,\"defaultgroupingid\":0,\"timecreated\":1251442415,\"timemodified\":1405380585,\"enablecompletion\":0,\"completionnotify\":0,\"lang\":\"\",\"forcetheme\":\"\",\"courseformatoptions\":[{\"name\":\"numsections\",\"value\":2},{\"name\":\"hiddensections\",\"value\":1},{\"name\":\"coursedisplay\",\"value\":0}]},{\"id\":3,\"shortname\":\"Update\",\"categoryid\":1,\"categorysortorder\":10002,\"fullname\":\"How to update\",\"idnumber\":\"\",\"summary\":\"\",\"summaryformat\":1,\"format\":\"topics\",\"showgrades\":1,\"newsitems\":0,\"startdate\":1404165600,\"numsections\":3,\"maxbytes\":10485760,\"showreports\":0,\"visible\":1,\"hiddensections\":0,\"groupmode\":0,\"groupmodeforce\":0,\"defaultgroupingid\":0,\"timecreated\":1251443413,\"timemodified\":1405380563,\"enablecompletion\":0,\"completionnotify\":0,\"lang\":\"\",\"forcetheme\":\"\",\"courseformatoptions\":[{\"name\":\"numsections\",\"value\":3},{\"name\":\"hiddensections\",\"value\":0},{\"name\":\"coursedisplay\",\"value\":0}]}]"
37
- http_version:
38
- recorded_at: Sun, 12 Apr 2015 00:51:46 GMT
39
- recorded_with: VCR 2.9.3
@@ -1,39 +0,0 @@
1
- ---
2
- recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
5
- method: get
6
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_courses&wstoken=
7
- body:
8
- string: ""
9
- headers: {}
10
-
11
- response:
12
- status:
13
- code: 200
14
- message: OK
15
- headers:
16
- Date:
17
- - Mon, 20 Jun 2016 22:01:55 GMT
18
- Content-Length:
19
- - "103"
20
- Accept-Ranges:
21
- - none
22
- Server:
23
- - Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.20.0
24
- Pragma:
25
- - no-cache
26
- X-Powered-By:
27
- - PHP/5.6.2
28
- Cache-Control:
29
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
30
- Content-Type:
31
- - application/json
32
- Access-Control-Allow-Origin:
33
- - "*"
34
- Expires:
35
- - Thu, 01 Jan 1970 00:00:00 GMT
36
- body:
37
- string: "{\"exception\":\"moodle_exception\",\"errorcode\":\"invalidtoken\",\"message\":\"Invalid token - token not found\"}"
38
- http_version:
39
- recorded_at: Mon, 20 Jun 2016 22:01:55 GMT
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_course_module&wstoken=
6
- body:
7
- encoding: UTF-8
8
- string: cmid=21
9
- headers: {}
10
- response:
11
- status:
12
- code: 200
13
- message: OK
14
- headers:
15
- Accept-Ranges:
16
- - bytes
17
- - none
18
- Access-Control-Allow-Origin:
19
- - "*"
20
- Age:
21
- - '0'
22
- Cache-Control:
23
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
24
- Content-Type:
25
- - application/json
26
- Date:
27
- - Wed, 12 Jan 2022 00:09:54 GMT
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Pragma:
31
- - no-cache
32
- Server:
33
- - Moodle
34
- X-Cache:
35
- - MISS
36
- X-Clacks-Overhead:
37
- - GNU Terry Pratchett
38
- X-Ec2-Instance-Id:
39
- - i-08adafc8cf93e6451
40
- X-Powered-By:
41
- - Moodle Ninjas
42
- Content-Length:
43
- - '103'
44
- Connection:
45
- - keep-alive
46
- body:
47
- encoding: UTF-8
48
- string: '{"exception":"moodle_exception","errorcode":"invalidtoken","message":"Invalid
49
- token - token not found"}'
50
- http_version:
51
- recorded_at: Wed, 12 Jan 2022 00:09:20 GMT
52
- recorded_with: VCR 2.9.3
@@ -1,51 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_course_module&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
7
- encoding: UTF-8
8
- string: cmid=21
9
- headers: {}
10
- response:
11
- status:
12
- code: 200
13
- message: OK
14
- headers:
15
- Accept-Ranges:
16
- - bytes
17
- - none
18
- Access-Control-Allow-Origin:
19
- - "*"
20
- Age:
21
- - '0'
22
- Cache-Control:
23
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
24
- Content-Type:
25
- - application/json
26
- Date:
27
- - Wed, 12 Jan 2022 00:09:54 GMT
28
- Expires:
29
- - Thu, 01 Jan 1970 00:00:00 GMT
30
- Pragma:
31
- - no-cache
32
- Server:
33
- - Moodle
34
- X-Cache:
35
- - MISS
36
- X-Clacks-Overhead:
37
- - GNU Terry Pratchett
38
- X-Ec2-Instance-Id:
39
- - i-0afd4744d7a60c5d7
40
- X-Powered-By:
41
- - Moodle Ninjas
42
- Content-Length:
43
- - '500'
44
- Connection:
45
- - keep-alive
46
- body:
47
- encoding: UTF-8
48
- string: '{"cm":{"id":21,"course":5,"module":1,"name":"An assignment","modname":"assign","instance":1,"section":19,"sectionnum":0,"groupmode":0,"groupingid":0,"completion":1,"idnumber":"","added":1630996590,"score":0,"indent":0,"visible":1,"visibleoncoursepage":1,"visibleold":1,"completiongradeitemnumber":null,"completionview":0,"completionexpected":0,"showdescription":0,"availability":null,"grade":100,"gradepass":"0.00","gradecat":5,"advancedgrading":[{"area":"submissions","method":null}]},"warnings":[]}'
49
- http_version:
50
- recorded_at: Wed, 12 Jan 2022 00:09:20 GMT
51
- recorded_with: VCR 2.9.3
@@ -1,102 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:8888/moodle28/webservice/rest/server.php?criterianame=search&criteriavalue=My%20course&moodlewsrestformat=json&wsfunction=core_course_search_courses&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Accept-Ranges:
22
- - bytes
23
- Access-Control-Allow-Origin:
24
- - "*"
25
- Age:
26
- - '0'
27
- Cache-Control:
28
- - private, must-revalidate, pre-check=0, post-check=0, max-age=0
29
- Content-Type:
30
- - application/json
31
- Date:
32
- - Wed, 11 May 2022 03:43:20 GMT
33
- Expires:
34
- - Thu, 01 Jan 1970 00:00:00 GMT
35
- Pragma:
36
- - no-cache
37
- Server:
38
- - Moodle
39
- X-Cache:
40
- - MISS
41
- X-Clacks-Overhead:
42
- - GNU Terry Pratchett
43
- X-Powered-By:
44
- - Moodle Ninjas
45
- Content-Length:
46
- - '3946'
47
- Connection:
48
- - keep-alive
49
- body:
50
- encoding: UTF-8
51
- string: '{"total":1,"courses":[{"id":316,"fullname":"My large course","displayname":"My
52
- large course","shortname":"MLC","categoryid":8,"categoryname":"VETtrak testing","sortorder":50002,"summary":"Test
53
- course 1<br \/>\nLorem ipsum dolor sit amet, consectetuer adipiscing elit.
54
- Nulla non arcu lacinia neque faucibus fringilla. Vivamus porttitor turpis
55
- ac leo. Integer in sapien. Nullam eget nisl. Aliquam erat volutpat. Cras elementum.
56
- Mauris suscipit, ligula sit amet pharetra semper, nibh ante cursus purus,
57
- vel sagittis velit mauris vel metus. Integer malesuada. Nullam lectus justo,
58
- vulputate eget mollis sed, tempor sed magna. Mauris elementum mauris vitae
59
- tortor. Aliquam erat volutpat.<br \/>\nTemporibus autem quibusdam et aut officiis
60
- debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae
61
- sint et molestiae non recusandae. Pellentesque ipsum. Cras pede libero, dapibus
62
- nec, pretium sit amet, tempor quis. Aliquam ante. Proin in tellus sit amet
63
- nibh dignissim sagittis. Vivamus porttitor turpis ac leo. Duis bibendum, lectus
64
- ut viverra rhoncus, dolor nunc faucibus libero, eget facilisis enim ipsum
65
- id lacus. In sem justo, commodo ut, suscipit at, pharetra vitae, orci. Aliquam
66
- erat volutpat. Nulla est.<br \/>\nVivamus luctus egestas leo. Aenean fermentum
67
- risus id tortor. Mauris dictum facilisis augue. Aliquam erat volutpat. Aliquam
68
- ornare wisi eu metus. Aliquam id dolor. Duis condimentum augue id magna semper
69
- rutrum. Donec iaculis gravida nulla. Pellentesque ipsum. Etiam dictum tincidunt
70
- diam. Quisque tincidunt scelerisque libero. Etiam egestas wisi a erat.<br
71
- \/>\nInteger lacinia. Cum sociis natoque penatibus et magnis dis parturient
72
- montes, nascetur ridiculus mus. Mauris tincidunt sem sed arcu. Nullam feugiat,
73
- turpis at pulvinar vulputate, erat libero tristique tellus, nec bibendum odio
74
- risus sit amet ante. Aliquam id dolor. Maecenas sollicitudin. Et harum quidem
75
- rerum facilis est et expedita distinctio. Mauris suscipit, ligula sit amet
76
- pharetra semper, nibh ante cursus purus, vel sagittis velit mauris vel metus.
77
- Nullam dapibus fermentum ipsum. Pellentesque habitant morbi tristique senectus
78
- et netus et malesuada fames ac turpis egestas. Nemo enim ipsam voluptatem
79
- quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni
80
- dolores eos qui ratione voluptatem sequi nesciunt. Pellentesque sapien. Duis
81
- risus. Mauris elementum mauris vitae tortor. Suspendisse nisl. Integer rutrum,
82
- orci vestibulum ullamcorper ultricies, lacus quam ultricies odio, vitae placerat
83
- pede sem sit amet enim.<br \/>\nIn laoreet, magna id viverra tincidunt, sem
84
- odio bibendum justo, vel imperdiet sapien wisi sed libero. Proin pede metus,
85
- vulputate nec, fermentum fringilla, vehicula vitae, justo. Nullam justo enim,
86
- consectetuer nec, ullamcorper ac, vestibulum in, elit. Quis autem vel eum
87
- iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur,
88
- vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? Maecenas lorem.
89
- Etiam posuere lacus quis dolor. Class aptent taciti sociosqu ad litora torquent
90
- per conubia nostra, per inceptos hymenaeos. Curabitur ligula sapien, pulvinar
91
- a vestibulum quis, facilisis vel sapien. Nam sed tellus id magna elementum
92
- tincidunt. Suspendisse nisl. Vivamus luctus egestas leo. Nulla non arcu lacinia
93
- neque faucibus fringilla. Etiam dui sem, fermentum vitae, sagittis id, malesuada
94
- in, quam. Etiam dictum tincidunt diam. Etiam commodo dui eget wisi. Nemo enim
95
- ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
96
- consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Proin
97
- pede metus, vulputate nec, fermentum fringilla, vehicula vitae, justo. Duis
98
- ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Pellentesque
99
- sapien.","summaryformat":1,"summaryfiles":[],"overviewfiles":[],"showactivitydates":true,"showcompletionconditions":true,"contacts":[],"enrollmentmethods":["manual"]}],"warnings":[]}'
100
- http_version:
101
- recorded_at: Wed, 11 May 2022 03:42:46 GMT
102
- recorded_with: VCR 2.9.3