bearcat 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/bearcat/client/modules.rb +4 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/modules_spec.rb +9 -0
- data/spec/fixtures/module_item_sequence.json +86 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2RkMGQ5ZDdhNWZkNWQ5MjVmZGU2NzAwY2I5ZDJmMjA1NzE3ZDNkMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDUzNzU0NjhkYjY2MWZkMWMyNzRkODhjYjczZDFjYzA3NjI4NjI2ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2Y2YWIwMGUzNWM4MTZjOTkxMmVhMWNjNmY5YmQwYjYyZjA1N2M4ZWFhNWYw
|
10
|
+
MjcyYmRjYzU4YzJkMjc1ODhkYzAyNjk0ZGY1NDQ2NTE1N2RiOTg5NzM3N2I3
|
11
|
+
ODE4NjZlZDU4ZmZlOTlmZjhlYzNkOTY0MTc3OGYzMjA5MGI4NTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTBjMzE2MDY3MjI1OTBjZmRhZmNkMzI1N2YxZTFkNzUxYWZiZTAyMTA5Nzdk
|
14
|
+
NDFhNGRiNDVkZTI3NzExZWQ4NGVhNDNjYTM4MTJhY2JkMzQ1ZWMzNTY2MTNk
|
15
|
+
ZGFmZTdjMzliNGQ4NWEwMjM4NTQyZGI3OTk1MDc1Nzc4NDE0ZTk=
|
data/lib/bearcat/version.rb
CHANGED
@@ -12,4 +12,13 @@ describe Bearcat::Client::Modules do
|
|
12
12
|
modules.first['id'].should == 1
|
13
13
|
end
|
14
14
|
|
15
|
+
it "returns a course items module sequence" do
|
16
|
+
query = {"asset_type" => "assignment", "asset_id" => 22}
|
17
|
+
stub_get(@client, "/api/v1/courses/1/module_item_sequence").with(query: query).to_return(json_response("module_item_sequence.json"))
|
18
|
+
item_sequence = @client.course_module_item_sequence("1", query)
|
19
|
+
items = item_sequence["modules"]
|
20
|
+
items.count.should == 3
|
21
|
+
items.last["id"].should == 3
|
22
|
+
end
|
23
|
+
|
15
24
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
{
|
2
|
+
"items": [
|
3
|
+
{
|
4
|
+
"current": {
|
5
|
+
"id": 13,
|
6
|
+
"indent": 0,
|
7
|
+
"position": 1,
|
8
|
+
"title": "Student Validation",
|
9
|
+
"type": "Assignment",
|
10
|
+
"module_id": 2,
|
11
|
+
"html_url": "http://localhost:3000/courses/1384/modules/items/13",
|
12
|
+
"content_id": 22,
|
13
|
+
"url": "http://localhost:3000/api/v1/courses/1384/assignments/22",
|
14
|
+
"completion_requirement": {
|
15
|
+
"type": "must_submit"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"prev": {
|
19
|
+
"id": 11,
|
20
|
+
"indent": 0,
|
21
|
+
"position": 1,
|
22
|
+
"title": "New",
|
23
|
+
"type": "Assignment",
|
24
|
+
"module_id": 1,
|
25
|
+
"html_url": "http://localhost:3000/courses/1384/modules/items/11",
|
26
|
+
"content_id": 23,
|
27
|
+
"url": "http://localhost:3000/api/v1/courses/1384/assignments/23",
|
28
|
+
"completion_requirement": {
|
29
|
+
"type": "must_view"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
"next": {
|
33
|
+
"id": 12,
|
34
|
+
"indent": 0,
|
35
|
+
"position": 1,
|
36
|
+
"title": "Last Assignment",
|
37
|
+
"type": "Assignment",
|
38
|
+
"module_id": 3,
|
39
|
+
"html_url": "http://localhost:3000/courses/1384/modules/items/12",
|
40
|
+
"content_id": 24,
|
41
|
+
"url": "http://localhost:3000/api/v1/courses/1384/assignments/24"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"modules": [
|
46
|
+
{
|
47
|
+
"id": 1,
|
48
|
+
"name": "First Module",
|
49
|
+
"position": 1,
|
50
|
+
"unlock_at": null,
|
51
|
+
"require_sequential_progress": true,
|
52
|
+
"publish_final_grade": false,
|
53
|
+
"prerequisite_module_ids": [
|
54
|
+
|
55
|
+
],
|
56
|
+
"items_count": 1,
|
57
|
+
"items_url": "http://localhost:3000/api/v1/courses/1384/modules/1/items"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"id": 2,
|
61
|
+
"name": "Second Module",
|
62
|
+
"position": 2,
|
63
|
+
"unlock_at": null,
|
64
|
+
"require_sequential_progress": true,
|
65
|
+
"publish_final_grade": false,
|
66
|
+
"prerequisite_module_ids": [
|
67
|
+
1
|
68
|
+
],
|
69
|
+
"items_count": 1,
|
70
|
+
"items_url": "http://localhost:3000/api/v1/courses/1384/modules/2/items"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"id": 3,
|
74
|
+
"name": "Last Module",
|
75
|
+
"position": 3,
|
76
|
+
"unlock_at": null,
|
77
|
+
"require_sequential_progress": true,
|
78
|
+
"publish_final_grade": false,
|
79
|
+
"prerequisite_module_ids": [
|
80
|
+
2
|
81
|
+
],
|
82
|
+
"items_count": 1,
|
83
|
+
"items_url": "http://localhost:3000/api/v1/courses/1384/modules/3/items"
|
84
|
+
}
|
85
|
+
]
|
86
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bearcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills, Jake Sorce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -166,6 +166,7 @@ files:
|
|
166
166
|
- spec/fixtures/enroll_student.json
|
167
167
|
- spec/fixtures/group_conferences.json
|
168
168
|
- spec/fixtures/link_unlink_outcome.json
|
169
|
+
- spec/fixtures/module_item_sequence.json
|
169
170
|
- spec/fixtures/modules.json
|
170
171
|
- spec/fixtures/no_custom_data.json
|
171
172
|
- spec/fixtures/outcome_group_import.json
|
@@ -256,6 +257,7 @@ test_files:
|
|
256
257
|
- spec/fixtures/enroll_student.json
|
257
258
|
- spec/fixtures/group_conferences.json
|
258
259
|
- spec/fixtures/link_unlink_outcome.json
|
260
|
+
- spec/fixtures/module_item_sequence.json
|
259
261
|
- spec/fixtures/modules.json
|
260
262
|
- spec/fixtures/no_custom_data.json
|
261
263
|
- spec/fixtures/outcome_group_import.json
|