diff options
author | prathamesh | 2013-07-03 16:49:29 +0530 |
---|---|---|
committer | prathamesh | 2013-07-03 16:49:29 +0530 |
commit | b522a1ba1c1edff7648c6c7d69fa2867a08b4100 (patch) | |
tree | 26df2b155c4db789dabd53f309057ac0aaca5f04 /testapp/exam | |
parent | 781842c523ccf11b85e0be06e884b2cd585f3cb9 (diff) | |
download | online_test-b522a1ba1c1edff7648c6c7d69fa2867a08b4100.tar.gz online_test-b522a1ba1c1edff7648c6c7d69fa2867a08b4100.tar.bz2 online_test-b522a1ba1c1edff7648c6c7d69fa2867a08b4100.zip |
merged java
Diffstat (limited to 'testapp/exam')
-rw-r--r-- | testapp/exam/forms.py | 1 | ||||
-rw-r--r-- | testapp/exam/models.py | 1 | ||||
-rw-r--r-- | testapp/exam/views.py | 2 | ||||
-rw-r--r-- | testapp/exam/xmlrpc_clients.py | 1 |
4 files changed, 4 insertions, 1 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index 1b60a71..8506de2 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -18,6 +18,7 @@ QUESTION_TYPE_CHOICES = ( ("mcq", "MCQ"), ("C", "C Language"), ("C++", "C++ Language"), + ("java", "Java Language"), ) UNAME_CHARS = letters + "._" + digits diff --git a/testapp/exam/models.py b/testapp/exam/models.py index fac01ec..5d6e2cf 100644 --- a/testapp/exam/models.py +++ b/testapp/exam/models.py @@ -20,6 +20,7 @@ QUESTION_TYPE_CHOICES = ( ("mcq", "MultipleChoice"), ("C", "C Language"), ("C++", "C++ Language"), + ("java", "Java Language"), ) ################################################################################ diff --git a/testapp/exam/views.py b/testapp/exam/views.py index 4c47004..dd11346 100644 --- a/testapp/exam/views.py +++ b/testapp/exam/views.py @@ -963,7 +963,7 @@ def user_data(request, username): """Render user data.""" current_user = request.user - if not current_user.is_authenticated() or not is_moderator(user): + if not current_user.is_authenticated() or not is_moderator(current_user): raise Http404('You are not allowed to view this page!') data = get_user_data(username) diff --git a/testapp/exam/xmlrpc_clients.py b/testapp/exam/xmlrpc_clients.py index b846212..cc21e62 100644 --- a/testapp/exam/xmlrpc_clients.py +++ b/testapp/exam/xmlrpc_clients.py @@ -25,6 +25,7 @@ class CodeServerProxy(object): "bash": 'run_bash_code', "C": "run_c_code", "C++": "run_cplus_code", + "java": "run_java_code", } def run_code(self, answer, test_code, user_dir, language): |