From 11a2eaefaba6d2b547d35afbee3e85b18520afd2 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Thu, 24 Nov 2011 02:11:40 +0530 Subject: ENH/TMP: Preliminary support for bash scripts. - Changing the Question model to add a language attribute. - Moving python_server.py -> code_server.py. - Adding functionality to test for Shell scripts. This is still incomplete since the shell code checker seems to have some problems. - Modified the xmlrpc_clients to support multiple languages and right now two. - Using setgid/setuid instead of setegid/seteuid in the code_server.py.. - Adding a bash example to the sample_questions.py. The shell script support doesn't quite work yet but this is really a code_server/checking issue. --- exam/management/commands/load_questions_xml.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'exam/management/commands') diff --git a/exam/management/commands/load_questions_xml.py b/exam/management/commands/load_questions_xml.py index aa403dd..b4151ae 100644 --- a/exam/management/commands/load_questions_xml.py +++ b/exam/management/commands/load_questions_xml.py @@ -35,6 +35,9 @@ def load_questions_xml(filename): desc_node = question.getElementsByTagName("description")[0] description = (desc_node.childNodes[0].data).strip() + lang_node = question.getElementsByTagName("language")[0] + language = (lang_node.childNodes[0].data).strip() + points_node = question.getElementsByTagName("points")[0] points = int((points_node.childNodes[0].data).strip()) \ if points_node else 1 @@ -45,6 +48,7 @@ def load_questions_xml(filename): new_question = Question(summary=summary, description=description, points=points, + language=language, test=test) new_question.save() -- cgit