-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from jobready/RTO-27047
RTO-27047: [LMS course copy] Update Moodle gem to allow course copy
- Loading branch information
Showing
7 changed files
with
235 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
spec/cassettes/MoodleRb_Courses/_core_course_import_course/when_using_invalid_token/.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
http_interactions: | ||
- request: | ||
method: post | ||
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_import_course&wstoken= | ||
body: | ||
encoding: UTF-8 | ||
string: importfrom=&importto= | ||
headers: | ||
Accept-Encoding: | ||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | ||
Accept: | ||
- "*/*" | ||
User-Agent: | ||
- Ruby | ||
response: | ||
status: | ||
code: 200 | ||
message: OK | ||
headers: | ||
Accept-Ranges: | ||
- none | ||
Access-Control-Allow-Origin: | ||
- "*" | ||
Age: | ||
- '0' | ||
Cache-Control: | ||
- private, must-revalidate, pre-check=0, post-check=0, max-age=0 | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 13 Feb 2023 02:46:46 GMT | ||
Expires: | ||
- Thu, 01 Jan 1970 00:00:00 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Moodle | ||
X-Cache: | ||
- MISS | ||
X-Clacks-Overhead: | ||
- GNU Terry Pratchett | ||
X-Powered-By: | ||
- Moodle Ninjas | ||
Content-Length: | ||
- '103' | ||
Connection: | ||
- keep-alive | ||
body: | ||
encoding: UTF-8 | ||
string: '{"exception":"moodle_exception","errorcode":"invalidtoken","message":"Invalid | ||
token - token not found"}' | ||
http_version: | ||
recorded_at: Mon, 13 Feb 2023 02:46:46 GMT | ||
recorded_with: VCR 2.9.3 |
54 changes: 54 additions & 0 deletions
54
spec/cassettes/MoodleRb_Courses/_core_course_import_course/when_using_valid_token/.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
http_interactions: | ||
- request: | ||
method: post | ||
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_import_course&wstoken=60fc9c9415259404795094957e4ab32f | ||
body: | ||
encoding: UTF-8 | ||
string: importfrom=467&importto=468 | ||
headers: | ||
Accept-Encoding: | ||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | ||
Accept: | ||
- "*/*" | ||
User-Agent: | ||
- Ruby | ||
response: | ||
status: | ||
code: 200 | ||
message: OK | ||
headers: | ||
Accept-Ranges: | ||
- none | ||
Access-Control-Allow-Origin: | ||
- "*" | ||
Age: | ||
- '0' | ||
Cache-Control: | ||
- private, must-revalidate, pre-check=0, post-check=0, max-age=0 | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 13 Feb 2023 02:46:43 GMT | ||
Expires: | ||
- Thu, 01 Jan 1970 00:00:00 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Moodle | ||
X-Cache: | ||
- MISS | ||
X-Clacks-Overhead: | ||
- GNU Terry Pratchett | ||
X-Powered-By: | ||
- Moodle Ninjas | ||
Content-Length: | ||
- '4' | ||
Connection: | ||
- keep-alive | ||
body: | ||
encoding: UTF-8 | ||
string: 'null' | ||
http_version: | ||
recorded_at: Mon, 13 Feb 2023 02:46:44 GMT | ||
recorded_with: VCR 2.9.3 |
55 changes: 55 additions & 0 deletions
55
...urses/_core_course_import_course/when_using_valid_token/when_using_invalid_course_id/.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
http_interactions: | ||
- request: | ||
method: post | ||
uri: http://localhost:8888/moodle28/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_import_course&wstoken=60fc9c9415259404795094957e4ab32f | ||
body: | ||
encoding: UTF-8 | ||
string: importfrom=467&importto=-1 | ||
headers: | ||
Accept-Encoding: | ||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | ||
Accept: | ||
- "*/*" | ||
User-Agent: | ||
- Ruby | ||
response: | ||
status: | ||
code: 200 | ||
message: OK | ||
headers: | ||
Accept-Ranges: | ||
- none | ||
Access-Control-Allow-Origin: | ||
- "*" | ||
Age: | ||
- '0' | ||
Cache-Control: | ||
- private, must-revalidate, pre-check=0, post-check=0, max-age=0 | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 13 Feb 2023 02:46:45 GMT | ||
Expires: | ||
- Thu, 01 Jan 1970 00:00:00 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- Moodle | ||
X-Cache: | ||
- MISS | ||
X-Clacks-Overhead: | ||
- GNU Terry Pratchett | ||
X-Powered-By: | ||
- Moodle Ninjas | ||
Content-Length: | ||
- '117' | ||
Connection: | ||
- keep-alive | ||
body: | ||
encoding: UTF-8 | ||
string: '{"exception":"moodle_exception","errorcode":"invalidcourseid","message":"You | ||
are trying to use an invalid course ID"}' | ||
http_version: | ||
recorded_at: Mon, 13 Feb 2023 02:46:45 GMT | ||
recorded_with: VCR 2.9.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters