This commit is contained in:
Ross
2021-01-04 14:33:46 +00:00
parent 1afe641931
commit eafe6ea051
3 changed files with 9 additions and 6 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ a, a:link {
.answer-list .correct {
/* color: green; */
color: blue;
color: lightblue;
}
.answer-list .correct::after{
@@ -67,7 +67,7 @@ a, a:link {
.answered {
/* color: green; */
color: blue;
color: lightblue;
}
.unanswered {
@@ -326,7 +326,7 @@ img.uploading:hover {
.user-answer-score-2 {
/* color: green; */
color: blue;
color: lightblue;
}
td.user-answer-score-0::after {
@@ -387,7 +387,7 @@ td.user-answer-score-2::after {
.answer-1 {
/* color: green; */
color: blue;
color: lightblue;
}
.answer-0 {
+1 -2
View File
@@ -31,8 +31,7 @@ $(document).ready(function () {
if($(".post-form").length > 0) {
$(".post-form").get(0).addEventListener("submit", function (e) {
console.log(e);
if($(".not-marked").length > 0) {
if($(".not-marked").length > 0 && e.submitter.name != "skip") {
e.preventDefault(); // before the code
alert("Ensure all answers are marked first");
}
+4
View File
@@ -420,6 +420,10 @@ def mark(request, pk, sk):
# TODO: convert to JSON request
# *******************************
if form.is_valid():
# If skip button is pressed skip the question without marking
if "skip" in request.POST:
return redirect("anatomy:mark", pk=pk, sk=n + 1)
cd = form.cleaned_data
# correct = cd.get("correct")
# half_correct = cd.get("half_correct")