From 7a36396feab880b96192399cff5213b53a19001a Mon Sep 17 00:00:00 2001
From: janmax <mail-github@jmx.io>
Date: Tue, 11 Jul 2017 10:26:33 +0200
Subject: [PATCH] Output of tests is now displayed instead of pre_corrections

---
 core/templates/core/feedback_form.html | 8 ++++++--
 util/processing.py                     | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/core/templates/core/feedback_form.html b/core/templates/core/feedback_form.html
index 9f38500d..f47cacba 100644
--- a/core/templates/core/feedback_form.html
+++ b/core/templates/core/feedback_form.html
@@ -25,9 +25,13 @@
       <a data-toggle="collapse" href="#collapse4">
         <h5 class="card-header">Custom Feedback</h5>
       </a>
-      <div id="collapse4" class="collapse {% if feedback.of_submission.pre_corrections %}show{% else %}hide{% endif %}" role="tabpanel">
+      <div id="collapse4" class="collapse show" role="tabpanel">
         <div class="card-block m-2">
-          <div id="pre_corrections" class="editor editor-pre">{{feedback.of_submission.pre_corrections}}</div>
+          <div id="pre_corrections" class="editor editor-pre">{% for test in feedback.of_submission.tests.all %}
+{{test.name}}
+{{test.annotation}}
+RESULT: {{test.label}}
+          {% endfor %}</div>
         </div>
       </div>
     </div>
diff --git a/util/processing.py b/util/processing.py
index 0a4445f5..b9f1327b 100644
--- a/util/processing.py
+++ b/util/processing.py
@@ -192,4 +192,4 @@ def processing(highest_test):
 
 if __name__ == '__main__':
     testcases_dict = testcases.evaluated_testcases(DESCFILE)
-    print(json.dumps(processing(LinkTest), sort_keys=True, indent=4))
+    print(json.dumps(processing(UnitTestTest), sort_keys=True, indent=4))
-- 
GitLab