Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quizz #148

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Quizz #148

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Thumbs.db

# Docusaurus build files
.output/
.view/

# VSCode
.vscode/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/open-education-hub/openedu-builder:0.5.1
FROM ghcr.io/open-education-hub/openedu-builder:0.6.1

# Install ffmpeg
RUN apt-get update && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Namespaces isolate processes from each other by creating independent views of sy
There are different types of namespaces, such as user, PID, network, mount, IPC, and UTS.
You can read more about them [here](https://www.nginx.com/blog/what-are-namespaces-cgroups-how-do-they-work/), [here](https://www.baeldung.com/linux/cgroups-and-namespaces) and a particularly good read about namespaces can be found [here](https://blog.quarkslab.com/digging-into-linux-namespaces-part-1.html)

[Quiz](../drills/questions/questions/cgroups-vs-namespaces.md)
[Quiz](../drills/questions/cgroups-vs-namespaces.md)

However, containers take this isolation a step further by using kernel features such as namespaces and cgroups to provide a more complete and secure isolation of resources.

Expand Down
2 changes: 1 addition & 1 deletion chapters/software-stack/libc/drills/questions/libc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Question Text

Which of following is **not*- and advantage of using libc for programs?
Which of following is **not** and advantage of using libc for programs?

## Question Answers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Question Text

Which of the following is **not*- an advantage of software when compared to hardware?
Which of the following is **not** an advantage of software when compared to hardware?

## Question Answers

Expand Down
2 changes: 2 additions & 0 deletions chapters/software-stack/overview/reading/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ The last two characteristics rely on two items:

![Software Stack](../media/software-stack.svg)

[Quiz](../drills/questions/software.md)

## Contents

- [Modern Software Stacks](../../modern-software-stacks/reading/modern-sw-stack.md)
Expand Down
15 changes: 15 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ stages:
- make_assets
- prepare_view
- embed_reveal
- quizzes
- docusaurus

build_dir: /build
Expand Down Expand Up @@ -206,7 +207,21 @@ embed_reveal:
IO: slides/IO
Application-Interaction: slides/Application-Interaction

quizzes:
plugin: quizify
options:
parser_type: python
parser: md_parser.py
quiz_type: link
quiz_embed: iframe_inline
quiz_regex: \[Quiz.*\]\((questions\/.*\.md)\)
template: simple_quiz
iframe_template: docusaurus_iframe
locations:
- /build/prepare_view/.view/lab*.md

docusaurus:
input: $$quizzes$$
plugin: docusaurus
options:
course_name: SO
Expand Down
5 changes: 4 additions & 1 deletion gen-view.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def solve_links(filename: str, fileToLab: dict) -> str:
text = f.read()

# Questions from the same chapter are at Questions/<question>, without the .md extension
text = re.sub(r"(\[.*?\])\(.*?questions/(.*?)\.md\)", r"\1(Questions/\2)", text)
text = re.sub(r"(\[.*?\])\(.*?questions/(.*?)\.md\)", r"\1(questions/\2.md)", text)

# Remove relative links to reading, media, tasks, and guides
for section in ["reading", "media", "tasks", "guides"]:
Expand All @@ -143,6 +143,9 @@ def solve_links(filename: str, fileToLab: dict) -> str:
# Where Q is the lab number and chapter is the heading of the file
matches = re.findall(r"\[[^\]]*\]\(([^\)]+\.md)\)", text)
for sourceFile in matches:
if sourceFile.startswith("questions/"):
continue

origName = sourceFile # Save the original name for the regex
if sourceFile.endswith("README.md"):
sourceFile = os.path.dirname(sourceFile) + ".md"
Expand Down
Loading