moodle_rb 1.0.5 → 2.0.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.
- checksums.yaml +7 -0
- data/.github/workflows/build.yml +36 -0
- data/.github/workflows/publish.yml +27 -0
- data/Dockerfile +10 -0
- data/README.md +80 -2
- data/docker-compose.yml +6 -0
- data/lib/moodle_rb/courses.rb +48 -2
- data/lib/moodle_rb/enrolments.rb +30 -1
- data/lib/moodle_rb/users.rb +16 -0
- data/lib/moodle_rb/version.rb +1 -1
- data/moodle_rb.gemspec +1 -2
- data/spec/cassettes/MoodleRb_Categories/_create/.yml +19 -19
- data/spec/cassettes/MoodleRb_Categories/_create/when_validation_fails/.yml +19 -19
- data/spec/cassettes/MoodleRb_Categories/_destroy/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Categories/_destroy/when_using_valid_token/.yml +39 -38
- data/spec/cassettes/MoodleRb_Categories/_index/.yml +19 -19
- data/spec/cassettes/MoodleRb_Categories/_index/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Categories/_show/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Client/_site_info/when_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Client/_site_info/when_valid_token/.yml +19 -19
- data/spec/cassettes/MoodleRb_Courses/_contents/when_using_invalid_token/.yml +52 -0
- data/spec/cassettes/MoodleRb_Courses/_contents/when_using_valid_token/.yml +52 -0
- data/spec/cassettes/MoodleRb_Courses/_create/.yml +19 -19
- data/spec/cassettes/MoodleRb_Courses/_create/when_validation_fails/.yml +36 -36
- data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_valid_token/.yml +38 -38
- data/spec/cassettes/MoodleRb_Courses/_destroy/when_using_valid_token/when_using_invalid_course_id/.yml +20 -20
- data/spec/cassettes/MoodleRb_Courses/_enrolled_users/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Courses/_enrolled_users/when_using_valid_token/.yml +39 -39
- data/spec/cassettes/MoodleRb_Courses/_grade_items/when_using_invalid_token/.yml +52 -0
- data/spec/cassettes/MoodleRb_Courses/_grade_items/when_using_valid_token/.yml +56 -0
- data/spec/cassettes/MoodleRb_Courses/_index/.yml +19 -19
- data/spec/cassettes/MoodleRb_Courses/_index/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Courses/_module/when_using_invalid_token/.yml +52 -0
- data/spec/cassettes/MoodleRb_Courses/_module/when_using_valid_token/.yml +51 -0
- data/spec/cassettes/MoodleRb_Courses/_show/.yml +19 -19
- data/spec/cassettes/MoodleRb_Courses/_show/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Enrolments/_create/.yml +19 -19
- data/spec/cassettes/MoodleRb_Enrolments/_create/when_user_or_course_id_is_invalid/.yml +19 -19
- data/spec/cassettes/MoodleRb_Enrolments/_destroy/.yml +51 -0
- data/spec/cassettes/MoodleRb_Enrolments/_destroy/when_user_or_course_id_is_invalid/.yml +52 -0
- data/spec/cassettes/MoodleRb_Grades/_by_assignment/.yml +19 -19
- data/spec/cassettes/MoodleRb_Grades/_by_course/.yml +19 -19
- data/spec/cassettes/MoodleRb_Grades/_by_course/when_invalid_parameters/.yml +19 -19
- data/spec/cassettes/MoodleRb_Users/_create/.yml +19 -19
- data/spec/cassettes/MoodleRb_Users/_create/when_missing_required_parameters/.yml +19 -19
- data/spec/cassettes/MoodleRb_Users/_destroy/.yml +19 -19
- data/spec/cassettes/MoodleRb_Users/_destroy/when_id_does_not_exist/.yml +19 -19
- data/spec/cassettes/MoodleRb_Users/_destroy/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Users/_enrolled_courses/.yml +19 -19
- data/spec/cassettes/MoodleRb_Users/_enrolled_courses/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Users/_search/.yml +21 -21
- data/spec/cassettes/MoodleRb_Users/_search/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Users/_search_identity/.yml +51 -0
- data/spec/cassettes/MoodleRb_Users/_search_identity/when_using_invalid_token/.yml +52 -0
- data/spec/cassettes/MoodleRb_Users/_show/.yml +19 -19
- data/spec/cassettes/MoodleRb_Users/_show/when_using_invalid_token/.yml +20 -20
- data/spec/cassettes/MoodleRb_Users/_update/.yml +20 -20
- data/spec/cassettes/MoodleRb_Users/_update/when_using_invalid_token/.yml +20 -20
- data/spec/lib/moodle_rb/categories_spec.rb +6 -6
- data/spec/lib/moodle_rb/client_spec.rb +3 -3
- data/spec/lib/moodle_rb/courses_spec.rb +88 -8
- data/spec/lib/moodle_rb/enrolments_spec.rb +39 -4
- data/spec/lib/moodle_rb/grades_spec.rb +4 -4
- data/spec/lib/moodle_rb/users_spec.rb +37 -8
- data/spec/lib/moodle_rb_spec.rb +2 -2
- metadata +117 -135
@@ -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/
|
7
|
-
body:
|
6
|
+
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_delete_courses&wstoken=
|
7
|
+
body:
|
8
8
|
string: courseids[0]=2244291800
|
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:21:27 GMT
|
18
|
-
Server:
|
18
|
+
Server:
|
19
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:
|
20
|
+
Accept-Ranges:
|
21
21
|
- none
|
22
|
-
Pragma:
|
22
|
+
Pragma:
|
23
23
|
- no-cache
|
24
|
-
Expires:
|
24
|
+
Expires:
|
25
25
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
26
|
-
Cache-Control:
|
26
|
+
Cache-Control:
|
27
27
|
- private, must-revalidate, pre-check=0, post-check=0, max-age=0
|
28
|
-
Access-Control-Allow-Origin:
|
28
|
+
Access-Control-Allow-Origin:
|
29
29
|
- "*"
|
30
|
-
Content-Length:
|
30
|
+
Content-Length:
|
31
31
|
- "103"
|
32
|
-
X-Powered-By:
|
32
|
+
X-Powered-By:
|
33
33
|
- PHP/5.6.2
|
34
|
-
Content-Type:
|
34
|
+
Content-Type:
|
35
35
|
- application/json
|
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:21:27 GMT
|
@@ -1,75 +1,75 @@
|
|
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/
|
7
|
-
body:
|
6
|
+
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_create_courses&wstoken=60fc9c9415259404795094957e4ab32f
|
7
|
+
body:
|
8
8
|
string: courses[0][fullname]=Test%20Course&courses[0][idnumber]=ExtRef&courses[0][shortname]=TestC1&courses[0][categoryid]=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
|
-
Date:
|
15
|
+
headers:
|
16
|
+
Date:
|
17
17
|
- Mon, 20 Jun 2016 22:21:27 GMT
|
18
|
-
Server:
|
18
|
+
Server:
|
19
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:
|
20
|
+
Accept-Ranges:
|
21
21
|
- none
|
22
|
-
Pragma:
|
22
|
+
Pragma:
|
23
23
|
- no-cache
|
24
|
-
Expires:
|
24
|
+
Expires:
|
25
25
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
26
|
-
Cache-Control:
|
26
|
+
Cache-Control:
|
27
27
|
- private, must-revalidate, pre-check=0, post-check=0, max-age=0
|
28
|
-
Access-Control-Allow-Origin:
|
28
|
+
Access-Control-Allow-Origin:
|
29
29
|
- "*"
|
30
|
-
Content-Length:
|
30
|
+
Content-Length:
|
31
31
|
- "32"
|
32
|
-
X-Powered-By:
|
32
|
+
X-Powered-By:
|
33
33
|
- PHP/5.6.2
|
34
|
-
Content-Type:
|
34
|
+
Content-Type:
|
35
35
|
- application/json
|
36
|
-
body:
|
36
|
+
body:
|
37
37
|
string: "[{\"id\":15,\"shortname\":\"TestC1\"}]"
|
38
|
-
http_version:
|
38
|
+
http_version:
|
39
39
|
recorded_at: Mon, 20 Jun 2016 22:21:27 GMT
|
40
|
-
- request:
|
40
|
+
- request:
|
41
41
|
method: post
|
42
|
-
uri: http://localhost:8888/
|
43
|
-
body:
|
42
|
+
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_delete_courses&wstoken=60fc9c9415259404795094957e4ab32f
|
43
|
+
body:
|
44
44
|
string: courseids[0]=15
|
45
45
|
headers: {}
|
46
46
|
|
47
|
-
response:
|
48
|
-
status:
|
47
|
+
response:
|
48
|
+
status:
|
49
49
|
code: 200
|
50
50
|
message: OK
|
51
|
-
headers:
|
52
|
-
Date:
|
51
|
+
headers:
|
52
|
+
Date:
|
53
53
|
- Mon, 20 Jun 2016 22:21:27 GMT
|
54
|
-
Server:
|
54
|
+
Server:
|
55
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:
|
56
|
+
Accept-Ranges:
|
57
57
|
- none
|
58
|
-
Pragma:
|
58
|
+
Pragma:
|
59
59
|
- no-cache
|
60
|
-
Expires:
|
60
|
+
Expires:
|
61
61
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
62
|
-
Cache-Control:
|
62
|
+
Cache-Control:
|
63
63
|
- private, must-revalidate, pre-check=0, post-check=0, max-age=0
|
64
|
-
Access-Control-Allow-Origin:
|
64
|
+
Access-Control-Allow-Origin:
|
65
65
|
- "*"
|
66
|
-
Content-Length:
|
66
|
+
Content-Length:
|
67
67
|
- "15"
|
68
|
-
X-Powered-By:
|
68
|
+
X-Powered-By:
|
69
69
|
- PHP/5.6.2
|
70
|
-
Content-Type:
|
70
|
+
Content-Type:
|
71
71
|
- application/json
|
72
|
-
body:
|
72
|
+
body:
|
73
73
|
string: "{\"warnings\":[]}"
|
74
|
-
http_version:
|
74
|
+
http_version:
|
75
75
|
recorded_at: Mon, 20 Jun 2016 22:21:27 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/
|
7
|
-
body:
|
6
|
+
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_delete_courses&wstoken=60fc9c9415259404795094957e4ab32f
|
7
|
+
body:
|
8
8
|
string: courseids[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
|
-
Date:
|
15
|
+
headers:
|
16
|
+
Date:
|
17
17
|
- Mon, 20 Jun 2016 22:21:27 GMT
|
18
|
-
Server:
|
18
|
+
Server:
|
19
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:
|
20
|
+
Accept-Ranges:
|
21
21
|
- none
|
22
|
-
Pragma:
|
22
|
+
Pragma:
|
23
23
|
- no-cache
|
24
|
-
Expires:
|
24
|
+
Expires:
|
25
25
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
26
|
-
Cache-Control:
|
26
|
+
Cache-Control:
|
27
27
|
- private, must-revalidate, pre-check=0, post-check=0, max-age=0
|
28
|
-
Access-Control-Allow-Origin:
|
28
|
+
Access-Control-Allow-Origin:
|
29
29
|
- "*"
|
30
|
-
Content-Length:
|
30
|
+
Content-Length:
|
31
31
|
- "115"
|
32
|
-
X-Powered-By:
|
32
|
+
X-Powered-By:
|
33
33
|
- PHP/5.6.2
|
34
|
-
Content-Type:
|
34
|
+
Content-Type:
|
35
35
|
- application/json
|
36
|
-
body:
|
36
|
+
body:
|
37
37
|
string: "{\"warnings\":[{\"item\":\"course\",\"itemid\":-1,\"warningcode\":\"unknowncourseidnumber\",\"message\":\"Unknown course ID -1\"}]}"
|
38
|
-
http_version:
|
38
|
+
http_version:
|
39
39
|
recorded_at: Mon, 20 Jun 2016 22:21:27 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/
|
7
|
-
body:
|
6
|
+
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_enrol_get_enrolled_users&wstoken=
|
7
|
+
body:
|
8
8
|
string: courseid=8
|
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
|
-
Cache-Control:
|
18
|
+
Cache-Control:
|
19
19
|
- private, must-revalidate, pre-check=0, post-check=0, max-age=0
|
20
|
-
Server:
|
20
|
+
Server:
|
21
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:
|
22
|
+
Content-Type:
|
23
23
|
- application/json
|
24
|
-
Date:
|
24
|
+
Date:
|
25
25
|
- Mon, 20 Jun 2016 22:26:04 GMT
|
26
|
-
Accept-Ranges:
|
26
|
+
Accept-Ranges:
|
27
27
|
- none
|
28
|
-
Expires:
|
28
|
+
Expires:
|
29
29
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
30
|
-
Content-Length:
|
30
|
+
Content-Length:
|
31
31
|
- "103"
|
32
|
-
Access-Control-Allow-Origin:
|
32
|
+
Access-Control-Allow-Origin:
|
33
33
|
- "*"
|
34
|
-
X-Powered-By:
|
34
|
+
X-Powered-By:
|
35
35
|
- PHP/5.6.2
|
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:26:04 GMT
|
@@ -1,75 +1,75 @@
|
|
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/
|
7
|
-
body:
|
6
|
+
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=enrol_manual_enrol_users&wstoken=60fc9c9415259404795094957e4ab32f
|
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
|
-
Content-Type:
|
15
|
+
headers:
|
16
|
+
Content-Type:
|
17
17
|
- application/json
|
18
|
-
X-Powered-By:
|
18
|
+
X-Powered-By:
|
19
19
|
- PHP/5.6.2
|
20
|
-
Pragma:
|
20
|
+
Pragma:
|
21
21
|
- no-cache
|
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
|
-
Accept-Ranges:
|
24
|
+
Accept-Ranges:
|
25
25
|
- none
|
26
|
-
Content-Length:
|
26
|
+
Content-Length:
|
27
27
|
- "4"
|
28
|
-
Access-Control-Allow-Origin:
|
28
|
+
Access-Control-Allow-Origin:
|
29
29
|
- "*"
|
30
|
-
Expires:
|
30
|
+
Expires:
|
31
31
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
32
|
-
Date:
|
32
|
+
Date:
|
33
33
|
- Mon, 20 Jun 2016 22:25:42 GMT
|
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: Mon, 20 Jun 2016 22:25:42 GMT
|
40
|
-
- request:
|
40
|
+
- request:
|
41
41
|
method: post
|
42
|
-
uri: http://localhost:8888/
|
43
|
-
body:
|
42
|
+
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_enrol_get_enrolled_users&wstoken=60fc9c9415259404795094957e4ab32f
|
43
|
+
body:
|
44
44
|
string: courseid=8
|
45
45
|
headers: {}
|
46
46
|
|
47
|
-
response:
|
48
|
-
status:
|
47
|
+
response:
|
48
|
+
status:
|
49
49
|
code: 200
|
50
50
|
message: OK
|
51
|
-
headers:
|
52
|
-
Content-Type:
|
51
|
+
headers:
|
52
|
+
Content-Type:
|
53
53
|
- application/json
|
54
|
-
X-Powered-By:
|
54
|
+
X-Powered-By:
|
55
55
|
- PHP/5.6.2
|
56
|
-
Pragma:
|
56
|
+
Pragma:
|
57
57
|
- no-cache
|
58
|
-
Server:
|
58
|
+
Server:
|
59
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:
|
60
|
+
Accept-Ranges:
|
61
61
|
- none
|
62
|
-
Content-Length:
|
62
|
+
Content-Length:
|
63
63
|
- "4162"
|
64
|
-
Access-Control-Allow-Origin:
|
64
|
+
Access-Control-Allow-Origin:
|
65
65
|
- "*"
|
66
|
-
Expires:
|
66
|
+
Expires:
|
67
67
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
68
|
-
Date:
|
68
|
+
Date:
|
69
69
|
- Mon, 20 Jun 2016 22:25:42 GMT
|
70
|
-
Cache-Control:
|
70
|
+
Cache-Control:
|
71
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\\/
|
74
|
-
http_version:
|
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
75
|
recorded_at: Mon, 20 Jun 2016 22:25:42 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=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
|
@@ -0,0 +1,56 @@
|
|
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 +1,39 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
4
|
method: get
|
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: ""
|
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
|
- "1905"
|
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 X comes with Moodle 2.8.5+ and MAMP 3.0.7.3. 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:
|
37
|
+
http_version:
|
38
38
|
recorded_at: Sun, 12 Apr 2015 00:51:46 GMT
|
39
39
|
recorded_with: VCR 2.9.3
|