moodle_rb 1.0.4 → 1.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 (67) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/build.yml +36 -0
  3. data/.github/workflows/publish.yml +27 -0
  4. data/Dockerfile +10 -0
  5. data/README.md +78 -2
  6. data/docker-compose.yml +6 -0
  7. data/lib/moodle_rb/courses.rb +48 -2
  8. data/lib/moodle_rb/enrolments.rb +30 -1
  9. data/lib/moodle_rb/users.rb +16 -0
  10. data/lib/moodle_rb/version.rb +1 -1
  11. data/moodle_rb.gemspec +2 -3
  12. data/spec/cassettes/MoodleRb_Categories/_create/.yml +19 -19
  13. data/spec/cassettes/MoodleRb_Categories/_create/when_validation_fails/.yml +19 -19
  14. data/spec/cassettes/MoodleRb_Categories/_destroy/when_using_invalid_token/.yml +20 -20
  15. data/spec/cassettes/MoodleRb_Categories/_destroy/when_using_valid_token/.yml +39 -38
  16. data/spec/cassettes/MoodleRb_Categories/_index/.yml +19 -19
  17. data/spec/cassettes/MoodleRb_Categories/_index/when_using_invalid_token/.yml +20 -20
  18. data/spec/cassettes/MoodleRb_Categories/_show/when_using_invalid_token/.yml +20 -20
  19. data/spec/cassettes/MoodleRb_Client/_site_info/when_invalid_token/.yml +20 -20
  20. data/spec/cassettes/MoodleRb_Client/_site_info/when_valid_token/.yml +19 -19
  21. data/spec/cassettes/MoodleRb_Courses/_contents/when_using_invalid_token/.yml +52 -0
  22. data/spec/cassettes/MoodleRb_Courses/_contents/when_using_valid_token/.yml +52 -0
  23. data/spec/cassettes/MoodleRb_Courses/_create/.yml +19 -19
  24. data/spec/cassettes/MoodleRb_Courses/_create/when_validation_fails/.yml +36 -36
  25. data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_invalid_token/.yml +20 -20
  26. data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_valid_token/.yml +38 -38
  27. data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_valid_token/when_using_invalid_course_id/.yml +20 -20
  28. data/spec/cassettes/MoodleRb_Courses/_enrolled_users/when_using_invalid_token/.yml +20 -20
  29. data/spec/cassettes/MoodleRb_Courses/_enrolled_users/when_using_valid_token/.yml +39 -39
  30. data/spec/cassettes/MoodleRb_Courses/_grade_items/when_using_invalid_token/.yml +52 -0
  31. data/spec/cassettes/MoodleRb_Courses/_grade_items/when_using_valid_token/.yml +56 -0
  32. data/spec/cassettes/MoodleRb_Courses/_index/.yml +19 -19
  33. data/spec/cassettes/MoodleRb_Courses/_index/when_using_invalid_token/.yml +20 -20
  34. data/spec/cassettes/MoodleRb_Courses/_module/when_using_invalid_token/.yml +52 -0
  35. data/spec/cassettes/MoodleRb_Courses/_module/when_using_valid_token/.yml +51 -0
  36. data/spec/cassettes/MoodleRb_Courses/_show/.yml +19 -19
  37. data/spec/cassettes/MoodleRb_Courses/_show/when_using_invalid_token/.yml +20 -20
  38. data/spec/cassettes/MoodleRb_Enrolments/_create/.yml +19 -19
  39. data/spec/cassettes/MoodleRb_Enrolments/_create/when_user_or_course_id_is_invalid/.yml +19 -19
  40. data/spec/cassettes/MoodleRb_Enrolments/_destroy/.yml +51 -0
  41. data/spec/cassettes/MoodleRb_Enrolments/_destroy/when_user_or_course_id_is_invalid/.yml +52 -0
  42. data/spec/cassettes/MoodleRb_Grades/_by_assignment/.yml +19 -19
  43. data/spec/cassettes/MoodleRb_Grades/_by_course/.yml +19 -19
  44. data/spec/cassettes/MoodleRb_Grades/_by_course/when_invalid_parameters/.yml +19 -19
  45. data/spec/cassettes/MoodleRb_Users/_create/.yml +19 -19
  46. data/spec/cassettes/MoodleRb_Users/_create/when_missing_required_parameters/.yml +19 -19
  47. data/spec/cassettes/MoodleRb_Users/_destroy/.yml +19 -19
  48. data/spec/cassettes/MoodleRb_Users/_destroy/when_id_does_not_exist/.yml +19 -19
  49. data/spec/cassettes/MoodleRb_Users/_destroy/when_using_invalid_token/.yml +20 -20
  50. data/spec/cassettes/MoodleRb_Users/_enrolled_courses/.yml +19 -19
  51. data/spec/cassettes/MoodleRb_Users/_enrolled_courses/when_using_invalid_token/.yml +20 -20
  52. data/spec/cassettes/MoodleRb_Users/_search/.yml +21 -21
  53. data/spec/cassettes/MoodleRb_Users/_search/when_using_invalid_token/.yml +20 -20
  54. data/spec/cassettes/MoodleRb_Users/_search_identity/.yml +51 -0
  55. data/spec/cassettes/MoodleRb_Users/_search_identity/when_using_invalid_token/.yml +52 -0
  56. data/spec/cassettes/MoodleRb_Users/_show/.yml +19 -19
  57. data/spec/cassettes/MoodleRb_Users/_show/when_using_invalid_token/.yml +20 -20
  58. data/spec/cassettes/MoodleRb_Users/_update/.yml +20 -20
  59. data/spec/cassettes/MoodleRb_Users/_update/when_using_invalid_token/.yml +20 -20
  60. data/spec/lib/moodle_rb/categories_spec.rb +6 -6
  61. data/spec/lib/moodle_rb/client_spec.rb +3 -3
  62. data/spec/lib/moodle_rb/courses_spec.rb +88 -8
  63. data/spec/lib/moodle_rb/enrolments_spec.rb +39 -4
  64. data/spec/lib/moodle_rb/grades_spec.rb +4 -4
  65. data/spec/lib/moodle_rb/users_spec.rb +37 -8
  66. data/spec/lib/moodle_rb_spec.rb +2 -2
  67. metadata +118 -136
@@ -1,39 +1,39 @@
1
- ---
1
+ ---
2
2
  recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
3
+ http_interactions:
4
+ - request:
5
5
  method: get
6
- uri: http://localhost:8888/moodle29/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_courses&wstoken=
7
- body:
6
+ uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_courses&wstoken=
7
+ body:
8
8
  string: ""
9
9
  headers: {}
10
10
 
11
- response:
12
- status:
11
+ response:
12
+ status:
13
13
  code: 200
14
14
  message: OK
15
- headers:
16
- Date:
15
+ headers:
16
+ Date:
17
17
  - Mon, 20 Jun 2016 22:01:55 GMT
18
- Content-Length:
18
+ Content-Length:
19
19
  - "103"
20
- Accept-Ranges:
20
+ Accept-Ranges:
21
21
  - none
22
- Server:
22
+ Server:
23
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:
24
+ Pragma:
25
25
  - no-cache
26
- X-Powered-By:
26
+ X-Powered-By:
27
27
  - PHP/5.6.2
28
- Cache-Control:
28
+ Cache-Control:
29
29
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
30
- Content-Type:
30
+ Content-Type:
31
31
  - application/json
32
- Access-Control-Allow-Origin:
32
+ Access-Control-Allow-Origin:
33
33
  - "*"
34
- Expires:
34
+ Expires:
35
35
  - Thu, 01 Jan 1970 00:00:00 GMT
36
- body:
36
+ body:
37
37
  string: "{\"exception\":\"moodle_exception\",\"errorcode\":\"invalidtoken\",\"message\":\"Invalid token - token not found\"}"
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Mon, 20 Jun 2016 22:01:55 GMT
@@ -0,0 +1,52 @@
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
@@ -0,0 +1,51 @@
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,39 +1,39 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: post
5
5
  uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_courses&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
6
+ body:
7
7
  string: options[ids][0]=1
8
8
  headers: {}
9
9
 
10
- response:
11
- status:
10
+ response:
11
+ status:
12
12
  code: 200
13
13
  message: OK
14
- headers:
15
- Access-Control-Allow-Origin:
14
+ headers:
15
+ Access-Control-Allow-Origin:
16
16
  - "*"
17
- X-Powered-By:
17
+ X-Powered-By:
18
18
  - PHP/5.6.2
19
- Expires:
19
+ Expires:
20
20
  - Thu, 01 Jan 1970 00:00:00 GMT
21
- Server:
21
+ Server:
22
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:
23
+ Pragma:
24
24
  - no-cache
25
- Accept-Ranges:
25
+ Accept-Ranges:
26
26
  - none
27
- Content-Type:
27
+ Content-Type:
28
28
  - application/json
29
- Date:
29
+ Date:
30
30
  - Sun, 12 Apr 2015 00:51:46 GMT
31
- Content-Length:
31
+ Content-Length:
32
32
  - "707"
33
- Cache-Control:
33
+ Cache-Control:
34
34
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
35
- body:
35
+ body:
36
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}]}]"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Sun, 12 Apr 2015 00:51:46 GMT
39
39
  recorded_with: VCR 2.9.3
@@ -1,39 +1,39 @@
1
- ---
1
+ ---
2
2
  recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
3
+ http_interactions:
4
+ - request:
5
5
  method: post
6
- uri: http://localhost:8888/moodle29/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_courses&wstoken=
7
- body:
6
+ uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_courses&wstoken=
7
+ body:
8
8
  string: options[ids][0]=1
9
9
  headers: {}
10
10
 
11
- response:
12
- status:
11
+ response:
12
+ status:
13
13
  code: 200
14
14
  message: OK
15
- headers:
16
- Pragma:
15
+ headers:
16
+ Pragma:
17
17
  - no-cache
18
- Accept-Ranges:
18
+ Accept-Ranges:
19
19
  - none
20
- Content-Length:
20
+ Content-Length:
21
21
  - "103"
22
- Access-Control-Allow-Origin:
22
+ Access-Control-Allow-Origin:
23
23
  - "*"
24
- Date:
24
+ Date:
25
25
  - Mon, 20 Jun 2016 22:04:25 GMT
26
- Expires:
26
+ Expires:
27
27
  - Thu, 01 Jan 1970 00:00:00 GMT
28
- Content-Type:
28
+ Content-Type:
29
29
  - application/json
30
- X-Powered-By:
30
+ X-Powered-By:
31
31
  - PHP/5.6.2
32
- Server:
32
+ Server:
33
33
  - 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
34
- Cache-Control:
34
+ Cache-Control:
35
35
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
36
- body:
36
+ body:
37
37
  string: "{\"exception\":\"moodle_exception\",\"errorcode\":\"invalidtoken\",\"message\":\"Invalid token - token not found\"}"
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Mon, 20 Jun 2016 22:04:25 GMT
@@ -1,39 +1,39 @@
1
- ---
1
+ ---
2
2
  recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
3
+ http_interactions:
4
+ - request:
5
5
  method: post
6
6
  uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=enrol_manual_enrol_users&wstoken=60fc9c9415259404795094957e4ab32f
7
- body:
7
+ body:
8
8
  string: enrolments[0][userid]=3&enrolments[0][courseid]=8&enrolments[0][roleid]=5
9
9
  headers: {}
10
10
 
11
- response:
12
- status:
11
+ response:
12
+ status:
13
13
  code: 200
14
14
  message: OK
15
- headers:
16
- Access-Control-Allow-Origin:
15
+ headers:
16
+ Access-Control-Allow-Origin:
17
17
  - "*"
18
- X-Powered-By:
18
+ X-Powered-By:
19
19
  - PHP/5.6.2
20
- Content-Type:
20
+ Content-Type:
21
21
  - application/json
22
- Date:
22
+ Date:
23
23
  - Sun, 12 Apr 2015 01:06:20 GMT
24
- Content-Length:
24
+ Content-Length:
25
25
  - "4"
26
- Pragma:
26
+ Pragma:
27
27
  - no-cache
28
- Cache-Control:
28
+ Cache-Control:
29
29
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
30
- Server:
30
+ Server:
31
31
  - 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
32
- Expires:
32
+ Expires:
33
33
  - Thu, 01 Jan 1970 00:00:00 GMT
34
- Accept-Ranges:
34
+ Accept-Ranges:
35
35
  - none
36
- body:
36
+ body:
37
37
  string: "null"
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Sun, 12 Apr 2015 01:06:20 GMT
@@ -1,39 +1,39 @@
1
- ---
1
+ ---
2
2
  recorded_with: VCR 2.9.3
3
- http_interactions:
4
- - request:
3
+ http_interactions:
4
+ - request:
5
5
  method: post
6
6
  uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=enrol_manual_enrol_users&wstoken=60fc9c9415259404795094957e4ab32f
7
- body:
7
+ body:
8
8
  string: enrolments[0][userid]=9999&enrolments[0][courseid]=9999&enrolments[0][roleid]=5
9
9
  headers: {}
10
10
 
11
- response:
12
- status:
11
+ response:
12
+ status:
13
13
  code: 200
14
14
  message: OK
15
- headers:
16
- Cache-Control:
15
+ headers:
16
+ Cache-Control:
17
17
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
18
- Content-Type:
18
+ Content-Type:
19
19
  - application/json
20
- Accept-Ranges:
20
+ Accept-Ranges:
21
21
  - none
22
- Content-Length:
22
+ Content-Length:
23
23
  - "119"
24
- Date:
24
+ Date:
25
25
  - Sat, 11 Apr 2015 12:50:42 GMT
26
- Expires:
26
+ Expires:
27
27
  - Thu, 01 Jan 1970 00:00:00 GMT
28
- Access-Control-Allow-Origin:
28
+ Access-Control-Allow-Origin:
29
29
  - "*"
30
- Server:
30
+ Server:
31
31
  - 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
32
- Pragma:
32
+ Pragma:
33
33
  - no-cache
34
- X-Powered-By:
34
+ X-Powered-By:
35
35
  - PHP/5.6.2
36
- body:
36
+ body:
37
37
  string: "{\"exception\":\"invalid_parameter_exception\",\"errorcode\":\"invalidparameter\",\"message\":\"Invalid parameter value detected\"}"
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Sat, 11 Apr 2015 12:50:42 GMT
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=enrol_manual_unenrol_users&wstoken=60fc9c9415259404795094957e4ab32f
6
+ body:
7
+ encoding: UTF-8
8
+ string: enrolments[0][userid]=7&enrolments[0][courseid]=5&enrolments[0][roleid]=5
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
+ - Tue, 11 Jan 2022 05:21:58 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
+ - '4'
44
+ Connection:
45
+ - keep-alive
46
+ body:
47
+ encoding: UTF-8
48
+ string: 'null'
49
+ http_version:
50
+ recorded_at: Tue, 11 Jan 2022 05:21:25 GMT
51
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=enrol_manual_unenrol_users&wstoken=60fc9c9415259404795094957e4ab32f
6
+ body:
7
+ encoding: UTF-8
8
+ string: enrolments[0][userid]=9999&enrolments[0][courseid]=9999&enrolments[0][roleid]=5
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
+ - Tue, 11 Jan 2022 05:21:58 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
+ - '133'
44
+ Connection:
45
+ - keep-alive
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"exception":"dml_missing_record_exception","errorcode":"invalidrecord","message":"Can''t
49
+ find data record in database table course."}'
50
+ http_version:
51
+ recorded_at: Tue, 11 Jan 2022 05:21:26 GMT
52
+ recorded_with: VCR 2.9.3
@@ -1,39 +1,39 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: post
5
5
  uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=mod_assign_get_grades&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
6
+ body:
7
7
  string: assignmentids[0]=1
8
8
  headers: {}
9
9
 
10
- response:
11
- status:
10
+ response:
11
+ status:
12
12
  code: 200
13
13
  message: OK
14
- headers:
15
- Content-Length:
14
+ headers:
15
+ Content-Length:
16
16
  - "180"
17
- Server:
17
+ Server:
18
18
  - 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
19
- Expires:
19
+ Expires:
20
20
  - Thu, 01 Jan 1970 00:00:00 GMT
21
- Cache-Control:
21
+ Cache-Control:
22
22
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
23
- Pragma:
23
+ Pragma:
24
24
  - no-cache
25
- Content-Type:
25
+ Content-Type:
26
26
  - application/json
27
- Accept-Ranges:
27
+ Accept-Ranges:
28
28
  - none
29
- Date:
29
+ Date:
30
30
  - Wed, 22 Apr 2015 23:29:46 GMT
31
- X-Powered-By:
31
+ X-Powered-By:
32
32
  - PHP/5.6.2
33
- Access-Control-Allow-Origin:
33
+ Access-Control-Allow-Origin:
34
34
  - "*"
35
- body:
35
+ body:
36
36
  string: "{\"assignments\":[{\"assignmentid\":1,\"grades\":[{\"id\":1,\"userid\":5,\"attemptnumber\":0,\"timecreated\":1428801844,\"timemodified\":1428801869,\"grader\":2,\"grade\":\"90.00000\"}]}],\"warnings\":[]}"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Wed, 22 Apr 2015 23:29:46 GMT
39
39
  recorded_with: VCR 2.9.3
@@ -1,39 +1,39 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: post
5
5
  uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_grades_get_grades&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
6
+ body:
7
7
  string: courseid=8&userids[0]=5
8
8
  headers: {}
9
9
 
10
- response:
11
- status:
10
+ response:
11
+ status:
12
12
  code: 200
13
13
  message: OK
14
- headers:
15
- Content-Length:
14
+ headers:
15
+ Content-Length:
16
16
  - "1192"
17
- Server:
17
+ Server:
18
18
  - 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
19
- Expires:
19
+ Expires:
20
20
  - Thu, 01 Jan 1970 00:00:00 GMT
21
- Cache-Control:
21
+ Cache-Control:
22
22
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
23
- Pragma:
23
+ Pragma:
24
24
  - no-cache
25
- Content-Type:
25
+ Content-Type:
26
26
  - application/json
27
- Accept-Ranges:
27
+ Accept-Ranges:
28
28
  - none
29
- Date:
29
+ Date:
30
30
  - Wed, 22 Apr 2015 23:29:46 GMT
31
- X-Powered-By:
31
+ X-Powered-By:
32
32
  - PHP/5.6.2
33
- Access-Control-Allow-Origin:
33
+ Access-Control-Allow-Origin:
34
34
  - "*"
35
- body:
35
+ body:
36
36
  string: "{\"items\":[{\"activityid\":\"course\",\"itemnumber\":0,\"scaleid\":0,\"name\":\"Course total\",\"grademin\":0,\"grademax\":100,\"gradepass\":0,\"locked\":0,\"hidden\":0,\"grades\":[{\"userid\":5,\"grade\":85,\"locked\":0,\"hidden\":0,\"overridden\":0,\"feedback\":null,\"feedbackformat\":0,\"usermodified\":null,\"datesubmitted\":null,\"dategraded\":1428807511,\"str_grade\":\"85.00\",\"str_long_grade\":\"85.00 \\/ 100.00\",\"str_feedback\":\"\"}]},{\"activityid\":\"13\",\"itemnumber\":0,\"scaleid\":0,\"name\":\"TestAssignment\",\"grademin\":0,\"grademax\":100,\"gradepass\":0,\"locked\":0,\"hidden\":0,\"grades\":[{\"userid\":5,\"grade\":90,\"locked\":0,\"hidden\":0,\"overridden\":0,\"feedback\":\"<p>Good<\\/p>\",\"feedbackformat\":1,\"usermodified\":2,\"datesubmitted\":null,\"dategraded\":1428801869,\"str_grade\":\"90.00\",\"str_long_grade\":\"90.00 \\/ 100.00\",\"str_feedback\":\"<p>Good<\\/p>\"}]},{\"activityid\":\"14\",\"itemnumber\":0,\"scaleid\":0,\"name\":\"Topic 1 Assignment Test\",\"grademin\":0,\"grademax\":100,\"gradepass\":0,\"locked\":0,\"hidden\":0,\"grades\":[{\"userid\":5,\"grade\":80,\"locked\":0,\"hidden\":0,\"overridden\":0,\"feedback\":null,\"feedbackformat\":1,\"usermodified\":2,\"datesubmitted\":null,\"dategraded\":1428807511,\"str_grade\":\"80.00\",\"str_long_grade\":\"80.00 \\/ 100.00\",\"str_feedback\":\"\"}]}],\"outcomes\":[]}"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Wed, 22 Apr 2015 23:29:46 GMT
39
39
  recorded_with: VCR 2.9.3