-
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.
Implemented answer validation view for structural float and expression
- Loading branch information
1 parent
49b70ba
commit 9fdb6b8
Showing
14 changed files
with
111 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
If the validation of algebraic expressions is done on | ||
the front-end using mathjs' symbolicEqual() function. | ||
So someone can modify the fetch() that gets the real answer | ||
from the server. | ||
Hence the reason why sympy is used in the backend for that, | ||
and not mathjs. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
let menuToggle = document.querySelector('.menuToggle'); | ||
menuToggle.addEventListener('click', (event)=>{ | ||
event.preventDefault(); | ||
menuToggle.classList.toggle('active'); | ||
}) | ||
document.addEventListener('DOMContentLoaded',()=>{ | ||
|
||
const menuToggle = document.querySelector('.menuToggle'); | ||
if (menuToggle != null){ | ||
menuToggle.addEventListener('click', (event)=>{ | ||
event.preventDefault(); | ||
menuToggle.classList.toggle('active'); | ||
}) | ||
} | ||
|
||
}) |
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
Binary file not shown.
23 changes: 23 additions & 0 deletions
23
phobos/migrations/0019_question_deduct_per_attempt_alter_question_answer.py
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,23 @@ | ||
# Generated by Django 4.2.3 on 2023-08-18 20:33 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('phobos', '0018_assignment_category_alter_question_answer_type'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='question', | ||
name='deduct_per_attempt', | ||
field=models.FloatField(default=0.05), | ||
), | ||
migrations.AlterField( | ||
model_name='question', | ||
name='answer', | ||
field=models.CharField(blank=True, max_length=1000, null=True), | ||
), | ||
] |
Binary file added
BIN
+1.03 KB
...ations/__pycache__/0019_question_deduct_per_attempt_alter_question_answer.cpython-311.pyc
Binary file not shown.
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