@@ -12,15 +12,15 @@ A moodle-based training area for maths aiming to prepare students for their stud
- Create a new course in your moodle system.
- Navigate to the course administration and pick the restore-option.
- Pick the `*.mbz`-file of this repository for restoring. It contains a moodle-course-backup-file. Perform the restore in your newly created moodle-course.
- Pick one of the `*.mbz`-files (according to your preferred language) of this repository for restoring. It contains a moodle-course-backup-file. Perform the restore in your newly created moodle-course.*Please choose one of the `*.mbz-files` according to your preferred language.*
- The course you imported contains a single activity: The training area. Check it out in the dashboard of your course.
- Be free to edit the quiz as you like and import it into other courses of your moodle-system.
## Troubleshooting
### Ressources won't load
It may appear that for security reasons, your moodle-system can't fetch the script `alquiz.js` from `https://marvin.hs-bochum.de/~mneugebauer/alquiz.js`. In this case the training area exists in your moodle-system, but will behave like any other test-element in moodle. For example, the maths-worlds-cluster and the endboss-symbols in the navigation bar (see screenshot above) won't appear. If so, download the script from this repository and move it to a place on your own server. Afterwards you have to change the `<script src="...">`-url in the beginning of each(!) question.
The same may appear for images used in the trigonometry-questions and the avatar-icon(s). Download them from this repository (`img`-directory), move them to your server and change the urls in the regarding questions.
It may appear that for security reasons, your moodle-system can't fetch the script from the server. In this case the training area exists in your moodle-system, but will behave like any other test-element in moodle. For example, the maths-worlds-cluster and the endboss-symbols in the navigation bar (see screenshot above) won't appear. If so, download the script (choose `script/alquiz.js` for german or `script/alquiz_en.js` for english) from this repository and move it to a place on your own server. Afterwards you have to change the `<script src="...">`-url in the beginning of each(!) question.
The same may appear for images used in the trigonometry-questions and the avatar-icon(s). Download them from this repository (`img`-directory), move them to your server and change the urls in the regarding questions. Please note, that for the english version the file with the ending `_en`
### Training area looks messy or does not work properly
The script-file `alquiz.js` adds additional CSS-styling information to the loaded page. These stylings are optimized for the moodle-system of Hochschule Bochum. It may not fit to the stylings of your moodle-system. This may cause troubles for up to two cases:
text=stackFeedbackInWords+"If it gives you more confidence, you can <a href=\"javascript:;\" onclick=\"repeatQuestion();\">repeat this task</a>. Otherwise you are ready for the <a href=\""+nextPageInfos.url+"\">"+nextPageInfos.linkText+"</a>.";
stackFeedback.style.display="none";
}
else{
text="Richtig!";
console.log("using standard speech-bubble-feedback because of undefined feedback text for solved state and too many feedback fields")
}
}
else{
text=currQuestion.BubbleInfo.getText("success");
}
}
else{
//false or partially correct
imgReaction="sad";
if (currQuestion.BubbleInfo.getText("failure")==undefined){
console.log("no fail text");
if (stackFeedbacks.length==1){
//move the stack feedback in the speech bubble by default and add "Erneut versuchen"
console.log("using standard speech-bubble-feedback because of undefined feedback text for failure state and too many feedback fields")
}
}
else{
text=currQuestion.BubbleInfo.getText("failure");
}
}
}
else{
//verfication, syntax error or came back to main question
if (document.querySelector(".validationerror")!=undefined){
//verification state
text=currQuestion.BubbleInfo.getText("validation")==undefined?"Did the system interpret your input correctly? <a href=\"#\" onclick=\"document.querySelector('input[id*=q][name$=_-submit]').click();\">Yes</a> <a href=\"#\" onclick=\"this.parentNode.innerHTML='Ändere deine Eingabe und klicke erneut auf "Prüfen"'\">No</a>":currQuestion.BubbleInfo.getText("validation");
text=currQuestion.BubbleInfo.getText("error")==undefined?"Oh! Apparently, there is a problem with your input. Please look at the note below the input field, correct it and click "Check" again.":currQuestion.BubbleInfo.getText("error");
}
/*else {
//came back to main question after the last of this group is solved
console.log("start routine to check for coming back");
let i = 0;
for (i in this.QuestionGroups) {
if (QuestionGroups[i].Questions[this.currentQuestionId] != undefined) {
break;
}
}
//console.log(this.currentQuestionId + " is in group " + i);
let keys = Object.keys(this.QuestionGroups[i].Questions);
if (keys[0] == this.currentQuestionId) {
//console.log(this.currentQuestionId + " is the first question of this group");
console.log("came back after solving last question of group");
if (currQuestion.BubbleInfo.getText("camebackaftersuccess") == undefined) {
text = "Willkommen zurück zu dieser Aufgabe. Haben dir die letzten Aufgaben geholfen, diese Aufgabe zu verstehen? Versuche es doch nochmal! Gehe ansonsten weiter zur nächsten Aufgabe.";
} else {
text = currQuestion.BubbleInfo.getText("camebackaftersuccess");
letpythagorasPhrase="The Pythagorean theorem states that the ancathete added to the square with the counter-cathete to the square gives the hypothenuse squared. In mathematical terms: \\(a^2+b^2=c^2\\;\\).";
SynQuestions.push(newInstruction("start_instructions","Check-In Training Area","syn_instructions","syn_instructions"));
SynQuestions.push(newInstruction("syn_instructions","Check-In Syntax","syn_main","syn_a1",newBubbleInfo({revisit:"You're back in the overview of this math world, which is all about <b>how to enter answers correctly</b>. Here you are in level <b class=\"current-level\">x of y</b>. You have <span class=\"endboss-state\">not yet</span> defeated the <a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.endboss-link'));\">final boss</a> in this world. Check out your progress below and jump to the question of your choice from here. From here you can also jump to the <a class=\"link-next-world\">next math world</a>. I would recommend you to continue with <a class=\"link-next-question\">the first unresolved question in this world</a>. Click on "<a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.submitbtns'));\">Next question</a>" to get there."})));
SynQuestions.push(newQuestion("syn_main","Syntax Boss",1,newBubbleInfo({success:"Very good! You have mastered the first world. You're ready for the next math world!",camebackaftersuccess:"Welcome back to the first task. With the knowledge you have collected along the way, can you now solve this task? Try again! Click on "Next question" to get to the next task."}),"fra_instructions","syn_instructions"));
FraQuestions.push(newInstruction("fra_instructions","Check-In Fractions & Binom. Formulas","fra_main","fra_a",newBubbleInfo({revisit:"You're back in the overview of the math world <b>Fractions & Binom. Formulas</b>. Here you are in level <b class=\"current-level\">x of y</b>. You have <span class=\"endboss-state\">not yet</span> defeated the <a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.endboss-link'));\">final boss</a> in this world. Check out your progress below and jump to the question of your choice from here. From here you can also jump to the <a class=\"link-next-world\">next math world</a>. I would recommend you to continue with <a class=\"link-next-question\">the first unresolved question in this world</a>. Click on "<a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.submitbtns'));\">Next question</a>" to get there."})));
FraQuestions.push(newQuestion("fra_main","Expand Fraction With Term",1,DefaultBubble,"pq_instructions","fra_instructions"));
/*FraQuestions.push(new Question("fra_main", "Bruch vereinfachen mithilfe binomischer Formeln ", 1, new BubbleInfo({camebackaftersuccess:"Willkommen zurück zur ersten Aufgabe. Kannst du mit dem Wissen, was du auf dem Weg gesammelt hast, diese Aufgabe jetzt lösen? Versuche es nochmal! Mit Klick auf "Nächste Frage" kommst du zur nächsten Aufgabe."}), "pq_instructions", "fra_instructions"));*/
PQQuestions.push(newInstruction("pq_instructions","Check-In p-q-Formel","pq_main","pq_a",newBubbleInfo({revisit:"You're back in the overview of the math world <b>Pq Formula</b>. Here you are in level <b class=\"current-level\">x of y</b>. You have <span class=\"endboss-state\">not yet</span> defeated the <a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.endboss-link'));\">final boss</a> in this world. Check out your progress below and jump to the question of your choice from here. From here you can also jump to the <a class=\"link-next-world\">next math world</a>. I would recommend you to continue with <a class=\"link-next-question\">the first unresolved question in this world</a>. Click on "<a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.submitbtns'));\">Next question</a>" to get there."})));
PQQuestions.push(newQuestion("pq_main","Boss ",1,newBubbleInfo({camebackaftersuccess:"Welcome back to this task. Now, can you apply term reshaping and pq formula to solve this problem? Good luck!"}),"rul_instructions","pq_instructions"));
RulQuestions.push(newInstruction("rul_instructions","Check-In Power Laws","rul_main","rul_a",newBubbleInfo({revisit:"You're back in the overview of the math world <b>Power Laws</b>. Here you are in level <b class=\"current-level\">x of y</b>. You have <span class=\"endboss-state\">not yet</span> defeated the <a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.endboss-link'));\">final boss</a> in this world. Check out your progress below and jump to the question of your choice from here. From here you can also jump to the <a class=\"link-next-world\">next math world</a>. I would recommend you to continue with <a class=\"link-next-question\">the first unresolved question in this world</a>. Click on "<a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.submitbtns'));\">Next question</a>" to get there."})));
RulQuestions.push(newQuestion("rul_e","Use Power Laws",1,DefaultBubble,"rul_main","rul_main"));
RulQuestions.push(newQuestion("rul_main","Boss",1,newBubbleInfo({camebackaftersuccess:"Welcome back to the initial task on the power laws. Now you've learned every power calculation rule. Try again to solve this task. Click on "Next question" to get to the next task."}),"tri_instructions","rul_instructions"));
/*LogQuestions.push(new Instruction("log_instructions", "Check-In Zinseszins und Logarithmus", "log_main", "log_a"));
TriQuestions.push(newInstruction("tri_instructions","Check-In Trigonometry","tri_main","tri_a",newBubbleInfo({revisit:"You're back in the overview of the math world <b>Trigonometry</b>. Here you are in level <b class=\"current-level\">x of y</b>. You have <span class=\"endboss-state\">not yet</span> defeated the <a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.endboss-link'));\">final boss</a> in this world. Check out your progress below and jump to the question of your choice from here. From here you can also jump to the <a class=\"link-next-world\">next math world</a>. I would recommend you to continue with <a class=\"link-next-question\">the first unresolved question in this world</a>. Click on "<a href=\"javascript:;\" onclick=\"tutorialFocusElement(document.querySelector('.submitbtns'));\">Next question</a>" to get there."})));
TriQuestions.push(newQuestion("tri_a","Clarification of Triangle Terms",3,newBubbleInfo({success:"Richtig!",failure:"False. Look at the graph below and repeat the task. Good luck!"}),"tri_b","tri_b",true));
TriQuestions.push(newQuestion("tri_b","Pythagorean Theorem 1",2,newBubbleInfo({success:"Correct! "+pythagorasPhrase,failure:"Falsch. "+pythagorasPhrase+" Feel free to try again. Good luck!"}),"tri_c","tri_c"));
TriQuestions.push(newQuestion("tri_c","Pythagorean Theorem 2 ",2,newBubbleInfo({success:"Correct!",failure:"False. Feel free to try again. Good luck!"}),"tri_d","tri_d"));
TriQuestions.push(newQuestion("tri_d","Clarification of Trigonometric Functions",3,newBubbleInfo({success:"Correct!",failure:"False. Feel free to try again. Good luck!"}),"tri_e","tri_e"));
TriQuestions.push(newQuestion("tri_main","Endboss ",1,newBubbleInfo({camebackaftersuccess:"Welcome back to this task. The last tasks were about competencies that you can use to solve this task. Can you solve them now? Good luck!"}),"sur_instructions"/*"_finish"*/,"tri_instructions"));
SurQuestions.push(newQuestion("sur_a","Umfrage",1,newBubbleInfo({beforeskip:"Please press "Check" before proceeding so that your answers to the survey are saved. Or do you want to skip the survey?"}),"_finsih","_finish",true,6));
//in development state: interrupt button update to give the main page time to recognize the inline scripts like increment solved and set current question id