github-to-canvas 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -5
- data/lib/github-to-canvas/canvas_interface.rb +2 -2
- data/lib/github-to-canvas/version.rb +1 -1
- data/lib/github-to-canvas.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9ec39071e3c80339a136e20aec41d807f024ae78683d504bac9b8416b7bd62d
|
4
|
+
data.tar.gz: 59e1d8e61fcd871a903e15410d9d3440ce38386f5b11c2e215af825a08b61910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ab65ee006dbb2326437f8805c40bb43b92798e3850f5d474c0c84fe40e969ffd0e1add8ca78f0b242a11aec802e0e47739fd5571bdfbdbeab60e7b3e0a3314
|
7
|
+
data.tar.gz: dec6317c2ccbe88982acd732b9de84c5ee791796369f34c2227383e5bb75105e92e96929f806cec5e06540a1a4544e5e5b5527185eb9e658839cb5f4ac7d151f
|
data/README.md
CHANGED
@@ -249,9 +249,7 @@ repositories. In addition, all lessons must have a type (`Page` or
|
|
249
249
|
`Assignment`), a repository, and a title. Other lesson options are currently
|
250
250
|
ignored.
|
251
251
|
|
252
|
-
Here's an example of what the YAML file should look like.
|
253
|
-
the id needs to be present and match the title, based on how Canvas creates
|
254
|
-
URL slugs for pages.
|
252
|
+
Here's an example of what the YAML file should look like.
|
255
253
|
|
256
254
|
```yaml
|
257
255
|
---
|
@@ -263,8 +261,7 @@ URL slugs for pages.
|
|
263
261
|
- title: Lesson 1
|
264
262
|
type: Assignment
|
265
263
|
repository: https://github.com/learn-co-curriculum/react-hooks-component-props-mini-project
|
266
|
-
-
|
267
|
-
title: Lesson 2
|
264
|
+
- title: Lesson 2
|
268
265
|
type: Page
|
269
266
|
repository: https://github.com/learn-co-curriculum/phase-0-pac-1-js-variables
|
270
267
|
```
|
@@ -55,7 +55,7 @@ class CanvasInterface
|
|
55
55
|
'module_item[title]' => lesson_info["title"],
|
56
56
|
'module_item[type]' => lesson_info["type"].capitalize,
|
57
57
|
'module_item[indent]' => 0,
|
58
|
-
'module_item[page_url]' => lesson_info["
|
58
|
+
'module_item[page_url]' => lesson_info["page_url"],
|
59
59
|
'module_item[completion_requirement][type]' => 'must_view'
|
60
60
|
}
|
61
61
|
elsif lesson_info["type"] == "Quiz"
|
@@ -287,7 +287,7 @@ class CanvasInterface
|
|
287
287
|
end
|
288
288
|
mod
|
289
289
|
end
|
290
|
-
puts course_info.to_yaml if !options[:urls_only]
|
290
|
+
puts course_info.to_yaml if !(options[:urls_only] || options[:csv])
|
291
291
|
end
|
292
292
|
|
293
293
|
def self.csv(file_to_convert)
|
data/lib/github-to-canvas.rb
CHANGED
@@ -23,7 +23,7 @@ class GithubToCanvas
|
|
23
23
|
when 'map'
|
24
24
|
CanvasInterface.map_course_info(options)
|
25
25
|
when 'csv'
|
26
|
-
CanvasInterface.csv(options[:file_to_convert])
|
26
|
+
CanvasInterface.csv(options[:file_to_convert])
|
27
27
|
when 'canvas_read'
|
28
28
|
puts CanvasInterface.read_lesson(options[:filepath])
|
29
29
|
when 'canvas_copy'
|
@@ -85,7 +85,7 @@ class GithubToCanvas
|
|
85
85
|
html = RepositoryConverter.remote_file_conversion(options)
|
86
86
|
# Add each lesson to it's module
|
87
87
|
html = RepositoryConverter.adjust_converted_html(options, html)
|
88
|
-
created_lesson_info = CanvasInterface.create_lesson(options, lesson["title"], html)
|
88
|
+
created_lesson_info = CanvasInterface.create_lesson(options, lesson["title"], html)
|
89
89
|
lesson = lesson.merge(created_lesson_info)
|
90
90
|
|
91
91
|
lesson["page_url"] = lesson["url"] if !lesson["page_url"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-to-canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maxwellbenton
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.1.4
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: github-to-canvas is a tool for migrating and aligning GitHub content with
|