diff options
author | Prabhu Ramachandran | 2011-11-24 02:11:40 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-24 02:11:40 +0530 |
commit | 11a2eaefaba6d2b547d35afbee3e85b18520afd2 (patch) | |
tree | f05aef4423f613c4d38232569df77a88c66978e7 /exam/management/commands/load_questions_xml.py | |
parent | 30f56443790841901f15b5ab435f97fba1c81d85 (diff) | |
download | online_test-11a2eaefaba6d2b547d35afbee3e85b18520afd2.tar.gz online_test-11a2eaefaba6d2b547d35afbee3e85b18520afd2.tar.bz2 online_test-11a2eaefaba6d2b547d35afbee3e85b18520afd2.zip |
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.
Diffstat (limited to 'exam/management/commands/load_questions_xml.py')
-rw-r--r-- | exam/management/commands/load_questions_xml.py | 4 |
1 files changed, 4 insertions, 0 deletions
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() |