moodle_rb 1.0.5 → 1.1.3

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 +73 -1
  6. data/docker-compose.yml +6 -0
  7. data/lib/moodle_rb/courses.rb +44 -0
  8. data/lib/moodle_rb/enrolments.rb +28 -1
  9. data/lib/moodle_rb/users.rb +16 -0
  10. data/lib/moodle_rb/version.rb +1 -1
  11. data/moodle_rb.gemspec +1 -2
  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 +85 -7
  63. data/spec/lib/moodle_rb/enrolments_spec.rb +36 -3
  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 +117 -135
@@ -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: userids[0]=ABC&courseid=8
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
  - "119"
17
- Expires:
17
+ Expires:
18
18
  - Thu, 01 Jan 1970 00:00:00 GMT
19
- Pragma:
19
+ Pragma:
20
20
  - no-cache
21
- Accept-Ranges:
21
+ Accept-Ranges:
22
22
  - none
23
- Content-Type:
23
+ Content-Type:
24
24
  - application/json
25
- X-Powered-By:
25
+ X-Powered-By:
26
26
  - PHP/5.6.2
27
- Cache-Control:
27
+ Cache-Control:
28
28
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
29
- Access-Control-Allow-Origin:
29
+ Access-Control-Allow-Origin:
30
30
  - "*"
31
- Date:
31
+ Date:
32
32
  - Wed, 10 Jun 2015 03:06:02 GMT
33
- Server:
33
+ Server:
34
34
  - 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
35
- body:
35
+ body:
36
36
  string: "{\"exception\":\"invalid_parameter_exception\",\"errorcode\":\"invalidparameter\",\"message\":\"Invalid parameter value detected\"}"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Wed, 10 Jun 2015 03:06:02 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_user_create_users&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
6
+ body:
7
7
  string: users[0][firstname]=Austin&users[0][password]=Password123!&users[0][lastname]=Powers&users[0][idnumber]=PAUST002&users[0][email]=austinp1%40jobready.com.au&users[0][username]=testuser1
8
8
  headers: {}
9
9
 
10
- response:
11
- status:
10
+ response:
11
+ status:
12
12
  code: 200
13
13
  message: OK
14
- headers:
15
- Cache-Control:
14
+ headers:
15
+ Cache-Control:
16
16
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
17
- X-Powered-By:
17
+ X-Powered-By:
18
18
  - PHP/5.6.2
19
- Pragma:
19
+ Pragma:
20
20
  - no-cache
21
- Content-Length:
21
+ Content-Length:
22
22
  - "33"
23
- Server:
23
+ Server:
24
24
  - 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
25
- Access-Control-Allow-Origin:
25
+ Access-Control-Allow-Origin:
26
26
  - "*"
27
- Accept-Ranges:
27
+ Accept-Ranges:
28
28
  - none
29
- Content-Type:
29
+ Content-Type:
30
30
  - application/json
31
- Expires:
31
+ Expires:
32
32
  - Thu, 01 Jan 1970 00:00:00 GMT
33
- Date:
33
+ Date:
34
34
  - Sun, 12 Apr 2015 01:01:16 GMT
35
- body:
35
+ body:
36
36
  string: "[{\"id\":5,\"username\":\"testuser1\"}]"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Sun, 12 Apr 2015 01:01:16 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_user_create_users&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
6
+ body:
7
7
  string: users[0][username]=testuser1
8
8
  headers: {}
9
9
 
10
- response:
11
- status:
10
+ response:
11
+ status:
12
12
  code: 200
13
13
  message: OK
14
- headers:
15
- Cache-Control:
14
+ headers:
15
+ Cache-Control:
16
16
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
17
- X-Powered-By:
17
+ X-Powered-By:
18
18
  - PHP/5.6.2
19
- Pragma:
19
+ Pragma:
20
20
  - no-cache
21
- Content-Length:
21
+ Content-Length:
22
22
  - "119"
23
- Server:
23
+ Server:
24
24
  - 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
25
- Access-Control-Allow-Origin:
25
+ Access-Control-Allow-Origin:
26
26
  - "*"
27
- Accept-Ranges:
27
+ Accept-Ranges:
28
28
  - none
29
- Content-Type:
29
+ Content-Type:
30
30
  - application/json
31
- Expires:
31
+ Expires:
32
32
  - Thu, 01 Jan 1970 00:00:00 GMT
33
- Date:
33
+ Date:
34
34
  - Sun, 12 Apr 2015 01:01:16 GMT
35
- body:
35
+ body:
36
36
  string: "{\"exception\":\"invalid_parameter_exception\",\"errorcode\":\"invalidparameter\",\"message\":\"Invalid parameter value detected\"}"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Sun, 12 Apr 2015 01:01:16 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
6
  uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_user_delete_users&wstoken=60fc9c9415259404795094957e4ab32f
7
- body:
7
+ body:
8
8
  string: userids[0]=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
- Content-Type:
18
+ Content-Type:
19
19
  - application/json
20
- Date:
20
+ Date:
21
21
  - Sun, 12 Apr 2015 01:04:36 GMT
22
- Content-Length:
22
+ Content-Length:
23
23
  - "4"
24
- X-Powered-By:
24
+ X-Powered-By:
25
25
  - PHP/5.6.2
26
- Accept-Ranges:
26
+ Accept-Ranges:
27
27
  - none
28
- Expires:
28
+ Expires:
29
29
  - Thu, 01 Jan 1970 00:00:00 GMT
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
- 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: "null"
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Sun, 12 Apr 2015 01:04:36 GMT
@@ -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_user_delete_users&wstoken=60fc9c9415259404795094957e4ab32f
6
- body:
6
+ body:
7
7
  string: userids[0]=999
8
8
  headers: {}
9
9
 
10
- response:
11
- status:
10
+ response:
11
+ status:
12
12
  code: 200
13
13
  message: OK
14
- headers:
15
- Cache-Control:
14
+ headers:
15
+ Cache-Control:
16
16
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
17
- Content-Type:
17
+ Content-Type:
18
18
  - application/json
19
- Access-Control-Allow-Origin:
19
+ Access-Control-Allow-Origin:
20
20
  - "*"
21
- Pragma:
21
+ Pragma:
22
22
  - no-cache
23
- Expires:
23
+ Expires:
24
24
  - Thu, 01 Jan 1970 00:00:00 GMT
25
- Accept-Ranges:
25
+ Accept-Ranges:
26
26
  - none
27
- Server:
27
+ Server:
28
28
  - 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
29
- X-Powered-By:
29
+ X-Powered-By:
30
30
  - PHP/5.6.2
31
- Date:
31
+ Date:
32
32
  - Sun, 12 Apr 2015 01:03:59 GMT
33
- Content-Length:
33
+ Content-Length:
34
34
  - "95"
35
- body:
35
+ body:
36
36
  string: "{\"exception\":\"dml_missing_record_exception\",\"errorcode\":\"invaliduser\",\"message\":\"Invalid user\"}"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Sun, 12 Apr 2015 01:03:59 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
- uri: http://localhost:8888/moodle29/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_user_delete_users&wstoken=
6
- body:
5
+ uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_user_delete_users&wstoken=
6
+ body:
7
7
  string: userids[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
- Pragma:
14
+ headers:
15
+ Pragma:
16
16
  - no-cache
17
- Date:
17
+ Date:
18
18
  - Mon, 20 Jun 2016 22:34:35 GMT
19
- Content-Length:
19
+ Content-Length:
20
20
  - "103"
21
- Accept-Ranges:
21
+ Accept-Ranges:
22
22
  - none
23
- Content-Type:
23
+ Content-Type:
24
24
  - application/json
25
- Access-Control-Allow-Origin:
25
+ Access-Control-Allow-Origin:
26
26
  - "*"
27
- X-Powered-By:
27
+ X-Powered-By:
28
28
  - PHP/5.6.2
29
- Expires:
29
+ Expires:
30
30
  - Thu, 01 Jan 1970 00:00:00 GMT
31
- Server:
31
+ Server:
32
32
  - 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
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: "{\"exception\":\"moodle_exception\",\"errorcode\":\"invalidtoken\",\"message\":\"Invalid token - token not found\"}"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Mon, 20 Jun 2016 22:34:35 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
6
  uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_enrol_get_users_courses&wstoken=60fc9c9415259404795094957e4ab32f
7
- body:
7
+ body:
8
8
  string: userid=3
9
9
  headers: {}
10
10
 
11
- response:
12
- status:
11
+ response:
12
+ status:
13
13
  code: 200
14
14
  message: OK
15
- headers:
16
- Accept-Ranges:
15
+ headers:
16
+ Accept-Ranges:
17
17
  - none
18
- Date:
18
+ Date:
19
19
  - Sun, 12 Apr 2015 01:05:25 GMT
20
- Cache-Control:
20
+ Cache-Control:
21
21
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
22
- Expires:
22
+ Expires:
23
23
  - Thu, 01 Jan 1970 00:00:00 GMT
24
- Pragma:
24
+ Pragma:
25
25
  - no-cache
26
- X-Powered-By:
26
+ X-Powered-By:
27
27
  - PHP/5.6.2
28
- Content-Type:
28
+ Content-Type:
29
29
  - application/json
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
- Content-Length:
32
+ Content-Length:
33
33
  - "110"
34
- Access-Control-Allow-Origin:
34
+ Access-Control-Allow-Origin:
35
35
  - "*"
36
- body:
36
+ body:
37
37
  string: "[{\"id\":8,\"shortname\":\"TestC1\",\"fullname\":\"Test Course\",\"enrolledusercount\":1,\"idnumber\":\"ExtRef\",\"visible\":1}]"
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Sun, 12 Apr 2015 01:05: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
- uri: http://localhost:8888/moodle29/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_enrol_get_users_courses&wstoken=
7
- body:
6
+ uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_enrol_get_users_courses&wstoken=
7
+ body:
8
8
  string: userid=3
9
9
  headers: {}
10
10
 
11
- response:
12
- status:
11
+ response:
12
+ status:
13
13
  code: 200
14
14
  message: OK
15
- headers:
16
- Server:
15
+ headers:
16
+ Server:
17
17
  - 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
18
- Expires:
18
+ Expires:
19
19
  - Thu, 01 Jan 1970 00:00:00 GMT
20
- Content-Length:
20
+ Content-Length:
21
21
  - "103"
22
- Pragma:
22
+ Pragma:
23
23
  - no-cache
24
- Cache-Control:
24
+ Cache-Control:
25
25
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
26
- Accept-Ranges:
26
+ Accept-Ranges:
27
27
  - none
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
- Access-Control-Allow-Origin:
32
+ Access-Control-Allow-Origin:
33
33
  - "*"
34
- Date:
34
+ Date:
35
35
  - Mon, 20 Jun 2016 22:37:07 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:37:07 GMT
@@ -1,39 +1,39 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: post
5
- uri: http://localhost:8888/moodle29/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_user_get_users&wstoken=87b95af2df709fa60b395b5c59a3fc2e
6
- body:
5
+ uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_user_get_users&wstoken=60fc9c9415259404795094957e4ab32f
6
+ body:
7
7
  string: criteria[0][value]=Guest%25&criteria[0][key]=firstname
8
8
  headers: {}
9
9
 
10
- response:
11
- status:
10
+ response:
11
+ status:
12
12
  code: 200
13
13
  message: OK
14
- headers:
15
- Date:
14
+ headers:
15
+ Date:
16
16
  - Wed, 08 Jun 2016 06:25:46 GMT
17
- Expires:
17
+ Expires:
18
18
  - Thu, 01 Jan 1970 00:00:00 GMT
19
- Pragma:
19
+ Pragma:
20
20
  - no-cache
21
- X-Powered-By:
21
+ X-Powered-By:
22
22
  - PHP/5.6.2
23
- Server:
23
+ Server:
24
24
  - 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
25
- Content-Type:
25
+ Content-Type:
26
26
  - application/json
27
- Access-Control-Allow-Origin:
27
+ Access-Control-Allow-Origin:
28
28
  - "*"
29
- Content-Length:
29
+ Content-Length:
30
30
  - "339"
31
- Accept-Ranges:
31
+ Accept-Ranges:
32
32
  - none
33
- Cache-Control:
33
+ Cache-Control:
34
34
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
35
- body:
36
- string: "{\"users\":[{\"id\":1,\"firstname\":\"Guest user\",\"lastname\":\" \",\"fullname\":\"Guest user \",\"email\":\"root@localhost\",\"firstaccess\":0,\"lastaccess\":0,\"profileimageurlsmall\":\"http:\\/\\/localhost:8888\\/moodle29\\/pluginfile.php\\/4\\/user\\/icon\\/f2\",\"profileimageurl\":\"http:\\/\\/localhost:8888\\/moodle29\\/pluginfile.php\\/4\\/user\\/icon\\/f1\"}],\"warnings\":[]}"
37
- http_version:
35
+ body:
36
+ string: "{\"users\":[{\"id\":1,\"firstname\":\"Guest user\",\"lastname\":\" \",\"fullname\":\"Guest user \",\"email\":\"root@localhost\",\"firstaccess\":0,\"lastaccess\":0,\"profileimageurlsmall\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/4\\/user\\/icon\\/f2\",\"profileimageurl\":\"http:\\/\\/localhost:8888\\/moodle28\\/pluginfile.php\\/4\\/user\\/icon\\/f1\"}],\"warnings\":[]}"
37
+ http_version:
38
38
  recorded_at: Wed, 08 Jun 2016 06:25: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
- uri: http://localhost:8888/moodle29/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_user_get_users&wstoken=
6
- body:
5
+ uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_user_get_users&wstoken=
6
+ body:
7
7
  string: criteria[0][value]=%25&criteria[0][key]=firstname
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
  - "103"
17
- Expires:
17
+ Expires:
18
18
  - Thu, 01 Jan 1970 00:00:00 GMT
19
- Accept-Ranges:
19
+ Accept-Ranges:
20
20
  - none
21
- X-Powered-By:
21
+ X-Powered-By:
22
22
  - PHP/5.6.2
23
- Content-Type:
23
+ Content-Type:
24
24
  - application/json
25
- Date:
25
+ Date:
26
26
  - Mon, 20 Jun 2016 22:38:27 GMT
27
- Access-Control-Allow-Origin:
27
+ Access-Control-Allow-Origin:
28
28
  - "*"
29
- Cache-Control:
29
+ Cache-Control:
30
30
  - private, must-revalidate, pre-check=0, post-check=0, max-age=0
31
- Server:
31
+ Server:
32
32
  - 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
33
- Pragma:
33
+ Pragma:
34
34
  - no-cache
35
- body:
35
+ body:
36
36
  string: "{\"exception\":\"moodle_exception\",\"errorcode\":\"invalidtoken\",\"message\":\"Invalid token - token not found\"}"
37
- http_version:
37
+ http_version:
38
38
  recorded_at: Mon, 20 Jun 2016 22:38:27 GMT
39
39
  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_user_search_identity&wstoken=60fc9c9415259404795094957e4ab32f
6
+ body:
7
+ encoding: UTF-8
8
+ string: query=moodle_student%40mailinator.com
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 21:28:57 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
+ - '195'
44
+ Connection:
45
+ - keep-alive
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"list":[{"id":25,"fullname":"Moodle Student","extrafields":[{"name":"idnumber","value":"MS01"},{"name":"email","value":"moodle_student@mailinator.com"}]}],"maxusersperpage":100,"overflow":false}'
49
+ http_version:
50
+ recorded_at: Tue, 11 Jan 2022 21:28:24 GMT
51
+ recorded_with: VCR 2.9.3