From 421a53672fd249e181dc00d9a5fa12b3f624a11b Mon Sep 17 00:00:00 2001 From: Noam Hurwitz Date: Sat, 15 Nov 2014 04:05:57 -0800 Subject: [PATCH 1/2] completed grader view --- website/templates/grader.html | 101 +++++++++++++++++----------------- website/views.py | 2 +- 2 files changed, 52 insertions(+), 51 deletions(-) diff --git a/website/templates/grader.html b/website/templates/grader.html index 05fe1c2..1c5b34b 100644 --- a/website/templates/grader.html +++ b/website/templates/grader.html @@ -4,59 +4,60 @@ {% block content %} -{% for assignment in assignments %} -
- - -
-
-
- 47% +
+
+
+
+ +
+ +
+
+ +
+ + +
-
-
- -
-
-
-
- -
- -
-
- -
- - - -
- - -
+ + +
+ {% endfor %} + {% endfor %} {% endblock %} diff --git a/website/views.py b/website/views.py index 7a4cb66..9c718d9 100644 --- a/website/views.py +++ b/website/views.py @@ -37,7 +37,7 @@ def grader(request): problems = package_problems.problem_answer_pairings(a) list_of_list_of_problems.append(problems) - return render(request, "grader.html", {'problem_solution_pair_list': list_of_list_of_problems}) + return render(request, "grader.html", {'problem_solution_pair_list_list': list_of_list_of_problems}) def process_prof_file(file): From db2dd1362afbaed6bf09221b3c09376ea4578079 Mon Sep 17 00:00:00 2001 From: Noam Hurwitz Date: Sat, 15 Nov 2014 04:55:57 -0800 Subject: [PATCH 2/2] write to file --- website/package_problems.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/package_problems.py b/website/package_problems.py index b19cbdb..6abd55c 100644 --- a/website/package_problems.py +++ b/website/package_problems.py @@ -17,7 +17,7 @@ def problem_answer_pairings(asgt): solution_file = open("SOLUTIONS" + "-" + a_n + "-" + name, 'a') print(r"\begin{solution}", file=solution_file) - print(asgt.problems[i].solution) + print(asgt.problems[i].solution, file=solution_file) print(r"\end{solution}", file=solution_file) problem_pairings.append(problem_file, solution_file)