summaryrefslogtreecommitdiff
path: root/testapp/exam
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/exam')
-rw-r--r--testapp/exam/forms.py1
-rw-r--r--testapp/exam/models.py1
-rw-r--r--testapp/exam/views.py2
-rw-r--r--testapp/exam/xmlrpc_clients.py1
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):