From 2c8176e4a37ca3a3ecc900bc011da894a90ce801 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 3 Mar 2014 17:54:18 +0530 Subject: Autochecks scilab function. A method is created that checks the scilab function submitted by the student. The method removes the terminating commands in scilab. If errors are present then it returns error, else provides input to the function and checks for the expected output. If function returns correct output for all the inputs then the function is graded correct, else throws the error message. --- testapp/exam/forms.py | 1 + testapp/exam/models.py | 1 + testapp/exam/xmlrpc_clients.py | 1 + 3 files changed, 3 insertions(+) (limited to 'testapp/exam') diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index 917bea7..26d9a2d 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -19,6 +19,7 @@ QUESTION_TYPE_CHOICES = ( ("C", "C Language"), ("C++", "C++ Language"), ("java", "Java Language"), + ("scilab", "Scilab"), ) UNAME_CHARS = letters + "._" + digits diff --git a/testapp/exam/models.py b/testapp/exam/models.py index babde0f..8718968 100644 --- a/testapp/exam/models.py +++ b/testapp/exam/models.py @@ -21,6 +21,7 @@ QUESTION_TYPE_CHOICES = ( ("C", "C Language"), ("C++", "C++ Language"), ("java", "Java Language"), + ("scilab", "Scilab"), ) ################################################################################ diff --git a/testapp/exam/xmlrpc_clients.py b/testapp/exam/xmlrpc_clients.py index cc21e62..14ebf27 100644 --- a/testapp/exam/xmlrpc_clients.py +++ b/testapp/exam/xmlrpc_clients.py @@ -26,6 +26,7 @@ class CodeServerProxy(object): "C": "run_c_code", "C++": "run_cplus_code", "java": "run_java_code", + "scilab": "run_scilab_code", } def run_code(self, answer, test_code, user_dir, language): -- cgit From 7481ac647eb08b29636041ce717fe7ac512a7562 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Thu, 5 Jun 2014 18:44:08 +0530 Subject: Fixed indentation. --- testapp/exam/forms.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'testapp/exam') diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index 26d9a2d..b606224 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -13,13 +13,13 @@ from string import letters, punctuation, digits import datetime QUESTION_TYPE_CHOICES = ( - ("python", "Python"), - ("bash", "Bash"), - ("mcq", "MCQ"), - ("C", "C Language"), - ("C++", "C++ Language"), - ("java", "Java Language"), - ("scilab", "Scilab"), + ("python", "Python"), + ("bash", "Bash"), + ("mcq", "MCQ"), + ("C", "C Language"), + ("C++", "C++ Language"), + ("java", "Java Language"), + ("scilab", "Scilab"), ) UNAME_CHARS = letters + "._" + digits -- cgit