You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I highlight recommend copy pasting this issue description to chatgpt (or equivalent) as this should be something it can handle writting or creating a basis for quickly
It will vastly improve the time it takes to tag questions if we have a script that can add a new tag when a question's body contains a certain substring.
Ex: if a question contains the string "bitstring", give the question the "comp2804-bitstring" tag
Questions live in a folder called src/content/questions
Every question has a index.md file and a question.ts file.
Tags are stored contained on the ```index.md``, ex:
import type { MultipleChoiceQuestion } from "@common/MultipleChoiceQuestionGenerator";
const body = String.raw`
A password consists of 13 characters, each character being one of the ten digits $0,1,2,\dots,9$. <br>
A password must contain exactly one odd digit. How many passwords are there?
`;
const label1 = String.raw`$13 \cdot 5^{12}$`;
const label2 = String.raw`$13 \cdot 5^{13}$`;
const label3 = String.raw`$13 \cdot 9^{12}$`;
const label4 = String.raw`$13 \cdot 5 \cdot 9^{12}$`;
export const question: MultipleChoiceQuestion = {
body: body,
options: [
{ label: label1, correct: false },
{ label: label2, correct: true },
{ label: label3, correct: false },
{ label: label4, correct: false },
],
};
You should be able to dynamically import each question and check whether question.body contains the desired substring.
The script should look over every single question that is contained in the src/content/questions folder. This folder structure could hypothetically vary in depth within each subfolder.
The text was updated successfully, but these errors were encountered:
For the method that we're doing it, I'm not sure whether it's actually feasible for the way we're doing things. We usually tag questions based on their chapter sections. Some bitstring questions are from 3.1.1 and others from 4.2.1.
Although I agree that manually vetting each and every index.md file to check whether it has the appropriate tag is grossly time-consuming, it may be more efficient to find questions with similar phrases and put the tags for that question to the other one as well.
Note: I highlight recommend copy pasting this issue description to chatgpt (or equivalent) as this should be something it can handle writting or creating a basis for quickly
It will vastly improve the time it takes to tag questions if we have a script that can add a new tag when a question's body contains a certain substring.
Ex:
if a question contains the string "bitstring", give the question the "comp2804-bitstring" tag
Questions live in a folder called
src/content/questions
Every question has a
index.md
file and aquestion.ts
file.Tags are stored contained on the ```index.md``, ex:
The question body is stored on
question.ts
, ex:You should be able to dynamically import each question and check whether
question.body
contains the desired substring.The script should look over every single question that is contained in the
src/content/questions
folder. This folder structure could hypothetically vary in depth within each subfolder.The text was updated successfully, but these errors were encountered: