From d27af45890ba1d5d7bb96e1b489c82f32db8dbd3 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 4 Mar 2025 10:08:42 +0000 Subject: [PATCH] export previous year's question with question details --- crowdsourcer/management/commands/export_marks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crowdsourcer/management/commands/export_marks.py b/crowdsourcer/management/commands/export_marks.py index 0883fedb..7cdd08b5 100644 --- a/crowdsourcer/management/commands/export_marks.py +++ b/crowdsourcer/management/commands/export_marks.py @@ -171,6 +171,7 @@ def handle( "topic", "clarifications", "groups", + "previous_year_question", ] ] @@ -187,6 +188,10 @@ def handle( groups = [g.description for g in question.questiongroup.all()] + prev_question = "" + if question.previous_question: + prev_question = question.previous_question.number_and_part + question_data.append( [ question.number_and_part, @@ -200,6 +205,7 @@ def handle( question.topic, question.clarifications, ",".join(groups), + prev_question, ] )