forked from pyvec/naucse_render
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Each session can now have static files as materials. Expected usage: - Homework assignments (in PDF) - Slides for presentations - Homework feedback These are the use cases for: pyvec/naucse.python.cz#432
- Loading branch information
Showing
7 changed files
with
87 additions
and
4 deletions.
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
35 changes: 35 additions & 0 deletions
35
test_naucse_render/fixtures/expected-dumps/courses/content-test.yaml
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,35 @@ | ||
api_version: | ||
- 0 | ||
- 0 | ||
course: | ||
sessions: | ||
- materials: | ||
- external_url: https://nauc.se | ||
title: A URL | ||
type: none-link | ||
- title: A note | ||
type: special | ||
slug: apecial | ||
source_file: courses/content-test/info.yml | ||
title: Special materials | ||
- materials: | ||
- slug: report.txt | ||
static_file: | ||
path: courses/content-test/static/report.txt | ||
title: A static text file | ||
type: special | ||
- slug: slides.html | ||
static_file: | ||
path: courses/content-test/static/slides.html | ||
title: A static HTML page | ||
type: special | ||
- slug: smile.png | ||
static_file: | ||
path: courses/content-test/static/smile.png | ||
title: A static image | ||
type: special | ||
slug: static | ||
source_file: courses/content-test/info.yml | ||
title: Static file materials | ||
source_file: courses/content-test/info.yml | ||
title: A course for testing content |
19 changes: 19 additions & 0 deletions
19
test_naucse_render/fixtures/test_content/courses/content-test/info.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,19 @@ | ||
title: A course for testing content | ||
|
||
sessions: | ||
- title: Special materials | ||
slug: apecial | ||
materials: | ||
- title: A URL | ||
url: https://nauc.se | ||
- title: A note | ||
url: null | ||
- title: Static file materials | ||
slug: static | ||
materials: | ||
- title: A static text file | ||
static: report.txt | ||
- title: A static HTML page | ||
static: slides.html | ||
- title: A static image | ||
static: smile.png |
1 change: 1 addition & 0 deletions
1
test_naucse_render/fixtures/test_content/courses/content-test/static/report.txt
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 @@ | ||
All OK! |
9 changes: 9 additions & 0 deletions
9
test_naucse_render/fixtures/test_content/courses/content-test/static/slides.html
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,9 @@ | ||
<html> | ||
<head> | ||
<title>Slides</title> | ||
</head> | ||
<body> | ||
<section>A</section> | ||
<section>B</section> | ||
</body> | ||
</html> |
Binary file added
BIN
+213 Bytes
test_naucse_render/fixtures/test_content/courses/content-test/static/smile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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