Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nesting of questions in subfolders (#2489)
* allow recursive question folders * fix semicolon * fail on directories without questions * add nested question to test course * add nested question tests * Update questionsSync.js * add example question to hw1 * add example question to test * annoying * Update course-db.js * update docs * create news item * Update docs/question.md Co-authored-by: Matthew West <mwest@illinois.edu> * renumber news item * add similar comment to the docs about assessments and course instances * update news item * renumber news item * update news item Co-authored-by: Matthew West <mwest@illinois.edu>
- Loading branch information
Showing
14 changed files
with
172 additions
and
50 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
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
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,44 @@ | ||
<style> | ||
img { | ||
display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
} | ||
.code-block { | ||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; | ||
background: #f0f0f0; | ||
width: 70%; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
.code-block > pre { | ||
padding: 0.5rem; | ||
display: block; | ||
margin-bottom: 0px; | ||
line-height: 125%; | ||
overflow: wrap; | ||
} | ||
</style> | ||
|
||
<p> | ||
Questions now have the ability to be nested inside of subfolders! This long-requested feature was implemented by <a href="https://github.com/nicknytko">Nicolas Nytko</a> (CS BS '19, CS MS '22). Instead of a sprawling <code class="user-output">questions</code> folder inside of your course, you can now organize these into folders however you wish: | ||
</p> | ||
|
||
<img src="nested.png" width="867px"> | ||
|
||
<p> | ||
The QID of the question is now the path from the <code class="user-output">questions</code> folder. For example, the first question above has a QID of <code class="user-output">demo/ansiOutput</code> and this is how it should be referenced in assessments. This is also reflected in the "Questions" tab: | ||
</p> | ||
|
||
<img class="border rounded" src="questions.png" width="1016px"> | ||
|
||
<p> | ||
Nested folders have also been enabled under the <code class="user-output">courseInstances</code> and <code class="user-output">assessments</code> folders. | ||
</p> | ||
|
||
<hr class="mt-5"> | ||
<p class="text-right small"> | ||
Want to help make PrairieLearn better? It's open source and <a href="https://github.com/PrairieLearn/PrairieLearn">contributions are welcome!</a> | ||
</p> |
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,6 @@ | ||
{ | ||
"uuid": "244367fd-9a96-4a5b-9db4-9c1fdd0b2ca6", | ||
"title": "Question folder nesting", | ||
"author": "<a href=\"https://github.com/mwest1066\">Matt West</a>", | ||
"visible_to_students": false | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,7 @@ | ||
{ | ||
"uuid": "5fa17ff4-20a9-4e93-af03-f4e52b4cc485", | ||
"title": "Nested question", | ||
"topic": "Algebra", | ||
"tags": ["nnytko2", "sp20", "v3"], | ||
"type": "v3" | ||
} |
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,5 @@ | ||
<pl-question-panel> | ||
<p> | ||
This question demonstrates functionality to nest questions in subfolders. The qid of the question then becomes its full path relative to <code class="user-output">questions</code>. This specific question has a qid of <code class="user-output">subfolder/nestedQuestion</code>. | ||
</p> | ||
</pl-question-panel> |
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,2 @@ | ||
def grade(data): | ||
data['score'] = 1.0 |
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