diff options
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/demo_templates/demo_settings.py | 66 | ||||
-rw-r--r-- | yaksh/demo_templates/demo_urls.py | 3 | ||||
-rw-r--r-- | yaksh/fixtures/demo_fixtures.json | 2 | ||||
-rw-r--r-- | yaksh/models.py | 2 | ||||
-rw-r--r-- | yaksh/scripts/cli.py | 8 |
5 files changed, 72 insertions, 9 deletions
diff --git a/yaksh/demo_templates/demo_settings.py b/yaksh/demo_templates/demo_settings.py index 4e12463..5fe18bc 100644 --- a/yaksh/demo_templates/demo_settings.py +++ b/yaksh/demo_templates/demo_settings.py @@ -10,8 +10,13 @@ https://docs.djangoproject.com/en/1.6/ref/settings/ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os +import tempfile +from yaksh.pipeline.settings import AUTH_PIPELINE + BASE_DIR = os.path.dirname(os.path.dirname(__file__)) +# The directory where user data can be saved. +OUTPUT_DIR = os.path.join(tempfile.gettempdir(), 'output') # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ @@ -22,10 +27,9 @@ SECRET_KEY = 'TH!S_!S_@_DUMMY_K3Y' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -TEMPLATE_DEBUG = True - ALLOWED_HOSTS = [] +URL_ROOT = '' # Application definition @@ -40,6 +44,7 @@ INSTALLED_APPS = ( 'django.contrib.staticfiles', 'yaksh', 'taggit', + 'social.apps.django_app.default', ) MIDDLEWARE_CLASSES = ( @@ -49,6 +54,9 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'yaksh.middleware.one_session_per_user.OneSessionPerUserMiddleware', + 'yaksh.middleware.user_time_zone.TimezoneMiddleware', + 'social.apps.django_app.middleware.SocialAuthExceptionMiddleware', ) ROOT_URLCONF = '{{ root_urlconf }}' @@ -77,7 +85,7 @@ USE_I18N = True USE_L10N = True -USE_TZ = False +USE_TZ = True # Static files (CSS, JavaScript, Images) @@ -85,4 +93,54 @@ USE_TZ = False STATIC_URL = '/static/' -AUTH_PROFILE_MODULE = 'yaksh.Profile' +LOGIN_URL = '/exam/login/' + +LOGIN_REDIRECT_URL = '/exam/' + +SOCIAL_AUTH_LOGIN_ERROR_URL = '/exam/login/' + +EMAIL_USE_TLS = False + +EMAIL_HOST = 'your_email_host' + +EMAIL_PORT = 'your_email_port' + +EMAIL_HOST_USER = 'email_host_user' + +DEFAULT_FROM_EMAIL = EMAIL_HOST_USER + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': ['yaksh/templates'], + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'social.apps.django_app.context_processors.backends', + 'social.apps.django_app.context_processors.login_redirect', + ], + 'debug': False, + } + }, +] + +SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'GOOGLE_KEY_PROVIDED' +SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'GOOGLE_SECRET_PROVIDED' + +SOCIAL_AUTH_FACEBOOK_KEY = 'FACEBOOK_KEY_PROVIDED' +SOCIAL_AUTH_FACEBOOK_SECRET = 'FACEBOOK_SECRET_PROVIDED' + +AUTHENTICATION_BACKENDS = ( + 'social.backends.google.GoogleOAuth2', + 'social.backends.facebook.FacebookOAuth2', + 'django.contrib.auth.backends.ModelBackend', +) + +SOCIAL_AUTH_PIPELINE = AUTH_PIPELINE + +SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] +SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = { + 'fields': 'id, name, email' + +} diff --git a/yaksh/demo_templates/demo_urls.py b/yaksh/demo_templates/demo_urls.py index d99e473..b96b476 100644 --- a/yaksh/demo_templates/demo_urls.py +++ b/yaksh/demo_templates/demo_urls.py @@ -9,5 +9,6 @@ urlpatterns = patterns('', # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), - url(r'^exam/', include('yaksh.urls')), + url(r'^exam/', include('yaksh.urls', namespace='yaksh', app_name='yaksh')), + url(r'^', include('social.apps.django_app.urls', namespace='social')), ) diff --git a/yaksh/fixtures/demo_fixtures.json b/yaksh/fixtures/demo_fixtures.json index 517c2b2..8e95cad 100644 --- a/yaksh/fixtures/demo_fixtures.json +++ b/yaksh/fixtures/demo_fixtures.json @@ -1 +1 @@ -[{"pk": 1, "model": "contenttypes.contenttype", "fields": {"model": "logentry", "name": "log entry", "app_label": "admin"}}, {"pk": 2, "model": "contenttypes.contenttype", "fields": {"model": "permission", "name": "permission", "app_label": "auth"}}, {"pk": 3, "model": "contenttypes.contenttype", "fields": {"model": "group", "name": "group", "app_label": "auth"}}, {"pk": 4, "model": "contenttypes.contenttype", "fields": {"model": "user", "name": "user", "app_label": "auth"}}, {"pk": 5, "model": "contenttypes.contenttype", "fields": {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}}, {"pk": 6, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "sessions"}}, {"pk": 7, "model": "contenttypes.contenttype", "fields": {"model": "profile", "name": "profile", "app_label": "yaksh"}}, {"pk": 8, "model": "contenttypes.contenttype", "fields": {"model": "question", "name": "question", "app_label": "yaksh"}}, {"pk": 9, "model": "contenttypes.contenttype", "fields": {"model": "answer", "name": "answer", "app_label": "yaksh"}}, {"pk": 10, "model": "contenttypes.contenttype", "fields": {"model": "quiz", "name": "quiz", "app_label": "yaksh"}}, {"pk": 11, "model": "contenttypes.contenttype", "fields": {"model": "questionpaper", "name": "question paper", "app_label": "yaksh"}}, {"pk": 12, "model": "contenttypes.contenttype", "fields": {"model": "questionset", "name": "question set", "app_label": "yaksh"}}, {"pk": 13, "model": "contenttypes.contenttype", "fields": {"model": "answerpaper", "name": "answer paper", "app_label": "yaksh"}}, {"pk": 14, "model": "contenttypes.contenttype", "fields": {"model": "assignmentupload", "name": "assignment upload", "app_label": "yaksh"}}, {"pk": 15, "model": "contenttypes.contenttype", "fields": {"model": "testcase", "name": "test case", "app_label": "yaksh"}}, {"pk": 16, "model": "contenttypes.contenttype", "fields": {"model": "tag", "name": "Tag", "app_label": "taggit"}}, {"pk": 17, "model": "contenttypes.contenttype", "fields": {"model": "taggeditem", "name": "Tagged Item", "app_label": "taggit"}}, {"pk": "kib1c35u44b8wleb8nltl5rkqwcsyrhr", "model": "sessions.session", "fields": {"expire_date": "2015-10-22T06:05:31.984", "session_data": "YjY4Mjg0Yjg4ZGI3OTIxYjc5NTY5NmNkMTgyMTQ4MGRmOTViNDRmOTp7fQ=="}}, {"pk": 1, "model": "yaksh.question", "fields": {"ref_code_path": "", "description": "\nWrite a function called <code>fact</code> which takes a single integer argument\n(say <code>n</code>) and returns the factorial of the number. \nFor example:<br/>\n<code>fact(3) -> 6</code>\n", "language": "python", "summary": "Factorial", "snippet": "def fact(num):", "active": true, "points": 2.0, "test": "\nassert fact(0) == 1\nassert fact(5) == 120\n", "type": "code", "options": ""}}, {"pk": 2, "model": "yaksh.question", "fields": {"ref_code_path": "", "description": "Create a simple function called <code>sqr</code> which takes a single \nargument and returns the square of the argument. For example: <br/>\n<code>sqr(3) -> 9</code>.", "language": "python", "summary": "Simple function", "snippet": "def sqr(num):", "active": true, "points": 1.0, "test": "\nimport math\nassert sqr(3) == 9\nassert abs(sqr(math.sqrt(2)) - 2.0) < 1e-14 \n ", "type": "code", "options": ""}}, {"pk": 3, "model": "yaksh.question", "fields": {"ref_code_path": "", "description": "Write a shell script which takes two arguments on the\n command line and prints the sum of the two on the output.", "language": "bash", "summary": "Bash addition", "snippet": "#!/bin/bash", "active": true, "points": 2.0, "test": "docs/sample.sh\ndocs/sample.args\n", "type": "code", "options": ""}}, {"pk": 4, "model": "yaksh.question", "fields": {"ref_code_path": "", "description": "What is the largest integer value that can be represented\nin Python?", "language": "python", "summary": "Size of integer in Python", "snippet": "", "active": true, "points": 0.5, "test": "No Limit", "type": "mcq", "options": "No Limit\n2**32\n2**32 - 1\nNone of the above\n"}}, {"pk": 1, "model": "yaksh.quiz", "fields": {"start_date_time": "2015-10-08T05:54:38", "description": "Demo Quiz", "language": "python", "time_between_attempts": 0, "attempts_allowed": -1, "pass_criteria": 40.0, "active": true, "end_date_time": "2199-01-01T00:00:00", "duration": 20, "prerequisite": null}}, {"pk": 1, "model": "yaksh.questionpaper", "fields": {"shuffle_questions": false, "total_marks": 5.5, "fixed_questions": [1, 2, 3, 4], "random_questions": [], "quiz": 1}}, {"pk": 1, "model": "taggit.tag", "fields": {"name": "Python", "slug": "python"}}, {"pk": 2, "model": "taggit.tag", "fields": {"name": "function", "slug": "function"}}, {"pk": 3, "model": "taggit.tag", "fields": {"name": "factorial", "slug": "factorial"}}, {"pk": 4, "model": "taggit.tag", "fields": {"name": "", "slug": ""}}, {"pk": 5, "model": "taggit.tag", "fields": {"name": "mcq", "slug": "mcq"}}, {"pk": 1, "model": "taggit.taggeditem", "fields": {"tag": 1, "content_type": 8, "object_id": 1}}, {"pk": 2, "model": "taggit.taggeditem", "fields": {"tag": 2, "content_type": 8, "object_id": 1}}, {"pk": 3, "model": "taggit.taggeditem", "fields": {"tag": 3, "content_type": 8, "object_id": 1}}, {"pk": 4, "model": "taggit.taggeditem", "fields": {"tag": 1, "content_type": 8, "object_id": 2}}, {"pk": 5, "model": "taggit.taggeditem", "fields": {"tag": 2, "content_type": 8, "object_id": 2}}, {"pk": 6, "model": "taggit.taggeditem", "fields": {"tag": 4, "content_type": 8, "object_id": 3}}, {"pk": 7, "model": "taggit.taggeditem", "fields": {"tag": 5, "content_type": 8, "object_id": 4}}, {"pk": 1, "model": "auth.permission", "fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 1}}, {"pk": 2, "model": "auth.permission", "fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 1}}, {"pk": 3, "model": "auth.permission", "fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 1}}, {"pk": 4, "model": "auth.permission", "fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 2}}, {"pk": 5, "model": "auth.permission", "fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 2}}, {"pk": 6, "model": "auth.permission", "fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 2}}, {"pk": 7, "model": "auth.permission", "fields": {"codename": "add_group", "name": "Can add group", "content_type": 3}}, {"pk": 8, "model": "auth.permission", "fields": {"codename": "change_group", "name": "Can change group", "content_type": 3}}, {"pk": 9, "model": "auth.permission", "fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 3}}, {"pk": 10, "model": "auth.permission", "fields": {"codename": "add_user", "name": "Can add user", "content_type": 4}}, {"pk": 11, "model": "auth.permission", "fields": {"codename": "change_user", "name": "Can change user", "content_type": 4}}, {"pk": 12, "model": "auth.permission", "fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 4}}, {"pk": 13, "model": "auth.permission", "fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 5}}, {"pk": 14, "model": "auth.permission", "fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 5}}, {"pk": 15, "model": "auth.permission", "fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 5}}, {"pk": 16, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 6}}, {"pk": 17, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 6}}, {"pk": 18, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 6}}, {"pk": 19, "model": "auth.permission", "fields": {"codename": "add_profile", "name": "Can add profile", "content_type": 7}}, {"pk": 20, "model": "auth.permission", "fields": {"codename": "change_profile", "name": "Can change profile", "content_type": 7}}, {"pk": 21, "model": "auth.permission", "fields": {"codename": "delete_profile", "name": "Can delete profile", "content_type": 7}}, {"pk": 22, "model": "auth.permission", "fields": {"codename": "add_question", "name": "Can add question", "content_type": 8}}, {"pk": 23, "model": "auth.permission", "fields": {"codename": "change_question", "name": "Can change question", "content_type": 8}}, {"pk": 24, "model": "auth.permission", "fields": {"codename": "delete_question", "name": "Can delete question", "content_type": 8}}, {"pk": 25, "model": "auth.permission", "fields": {"codename": "add_answer", "name": "Can add answer", "content_type": 9}}, {"pk": 26, "model": "auth.permission", "fields": {"codename": "change_answer", "name": "Can change answer", "content_type": 9}}, {"pk": 27, "model": "auth.permission", "fields": {"codename": "delete_answer", "name": "Can delete answer", "content_type": 9}}, {"pk": 28, "model": "auth.permission", "fields": {"codename": "add_quiz", "name": "Can add quiz", "content_type": 10}}, {"pk": 29, "model": "auth.permission", "fields": {"codename": "change_quiz", "name": "Can change quiz", "content_type": 10}}, {"pk": 30, "model": "auth.permission", "fields": {"codename": "delete_quiz", "name": "Can delete quiz", "content_type": 10}}, {"pk": 31, "model": "auth.permission", "fields": {"codename": "add_questionpaper", "name": "Can add question paper", "content_type": 11}}, {"pk": 32, "model": "auth.permission", "fields": {"codename": "change_questionpaper", "name": "Can change question paper", "content_type": 11}}, {"pk": 33, "model": "auth.permission", "fields": {"codename": "delete_questionpaper", "name": "Can delete question paper", "content_type": 11}}, {"pk": 34, "model": "auth.permission", "fields": {"codename": "add_questionset", "name": "Can add question set", "content_type": 12}}, {"pk": 35, "model": "auth.permission", "fields": {"codename": "change_questionset", "name": "Can change question set", "content_type": 12}}, {"pk": 36, "model": "auth.permission", "fields": {"codename": "delete_questionset", "name": "Can delete question set", "content_type": 12}}, {"pk": 37, "model": "auth.permission", "fields": {"codename": "add_answerpaper", "name": "Can add answer paper", "content_type": 13}}, {"pk": 38, "model": "auth.permission", "fields": {"codename": "change_answerpaper", "name": "Can change answer paper", "content_type": 13}}, {"pk": 39, "model": "auth.permission", "fields": {"codename": "delete_answerpaper", "name": "Can delete answer paper", "content_type": 13}}, {"pk": 40, "model": "auth.permission", "fields": {"codename": "add_assignmentupload", "name": "Can add assignment upload", "content_type": 14}}, {"pk": 41, "model": "auth.permission", "fields": {"codename": "change_assignmentupload", "name": "Can change assignment upload", "content_type": 14}}, {"pk": 42, "model": "auth.permission", "fields": {"codename": "delete_assignmentupload", "name": "Can delete assignment upload", "content_type": 14}}, {"pk": 43, "model": "auth.permission", "fields": {"codename": "add_testcase", "name": "Can add test case", "content_type": 15}}, {"pk": 44, "model": "auth.permission", "fields": {"codename": "change_testcase", "name": "Can change test case", "content_type": 15}}, {"pk": 45, "model": "auth.permission", "fields": {"codename": "delete_testcase", "name": "Can delete test case", "content_type": 15}}, {"pk": 46, "model": "auth.permission", "fields": {"codename": "add_tag", "name": "Can add Tag", "content_type": 16}}, {"pk": 47, "model": "auth.permission", "fields": {"codename": "change_tag", "name": "Can change Tag", "content_type": 16}}, {"pk": 48, "model": "auth.permission", "fields": {"codename": "delete_tag", "name": "Can delete Tag", "content_type": 16}}, {"pk": 49, "model": "auth.permission", "fields": {"codename": "add_taggeditem", "name": "Can add Tagged Item", "content_type": 17}}, {"pk": 50, "model": "auth.permission", "fields": {"codename": "change_taggeditem", "name": "Can change Tagged Item", "content_type": 17}}, {"pk": 51, "model": "auth.permission", "fields": {"codename": "delete_taggeditem", "name": "Can delete Tagged Item", "content_type": 17}}, {"pk": 1, "model": "auth.group", "fields": {"name": "moderator", "permissions": [25, 26, 27, 37, 38, 39, 40, 41, 42, 19, 20, 21, 22, 23, 24, 31, 32, 33, 34, 35, 36, 28, 29, 30, 43, 44, 45]}}, {"pk": 1, "model": "auth.user", "fields": {"username": "admin", "first_name": "", "last_name": "", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2015-10-08T06:01:15.263", "groups": [1], "user_permissions": [], "password": "pbkdf2_sha256$12000$qartiEZkS5K0$wP0uhbdYEcuvRXAveA2geMUcknL11UzwL+TS2r2pL2I=", "email": "admin@admin.com", "date_joined": "2015-10-08T05:51:13"}}, {"pk": 2, "model": "auth.user", "fields": {"username": "student", "first_name": "Student", "last_name": "Yaksh", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2015-10-08T06:05:29.551", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$12000$iRBPv5gvit8o$xKheYrWGGL4c3WN/F7j5UlRkmjAy9hx1BWWhdhd9uh0=", "email": "student@yaksh.xyz", "date_joined": "2015-10-08T05:55:56.956"}}, {"pk": 3, "model": "auth.user", "fields": {"username": "teacher", "first_name": "Teacher", "last_name": "Yaksh", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2015-10-08T06:01:51.536", "groups": [1], "user_permissions": [], "password": "pbkdf2_sha256$12000$J6BkGV3t0Ajz$Q0LPr2588cYNBjWsw+PyY+Kzc4FcrWojtZek5iZ4LA8=", "email": "teacher@yaksh.xyz", "date_joined": "2015-10-08T05:57:52"}}, {"pk": 1, "model": "yaksh.profile", "fields": {"institute": "Demo Institute", "department": "Demo Department", "roll_number": "1", "user": 2, "position": "Student"}}, {"pk": 2, "model": "yaksh.profile", "fields": {"institute": "Demo Institute", "department": "Demo Department", "roll_number": "2", "user": 3, "position": "Teacher"}}, {"pk": 1, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2015-10-08T05:58:41.912", "object_repr": "moderators", "object_id": "1", "change_message": "", "user": 1, "content_type": 3}}, {"pk": 2, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2015-10-08T05:59:22.724", "object_repr": "admin", "object_id": "1", "change_message": "Changed groups.", "user": 1, "content_type": 4}}, {"pk": 3, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2015-10-08T05:59:30.335", "object_repr": "teacher", "object_id": "3", "change_message": "Changed groups.", "user": 1, "content_type": 4}}, {"pk": 4, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2015-10-08T06:01:24.134", "object_repr": "moderator", "object_id": "1", "change_message": "Changed name.", "user": 1, "content_type": 3}}]
\ No newline at end of file +[{"model": "auth.group", "pk": 1, "fields": {"name": "moderator", "permissions": [34, 35, 36, 46, 47, 48, 49, 50, 51, 22, 23, 24, 19, 20, 21, 31, 32, 33, 61, 62, 63, 25, 26, 27, 28, 29, 30, 40, 41, 42, 43, 44, 45, 37, 38, 39, 55, 56, 57, 58, 59, 60, 52, 53, 54]}}, {"model": "auth.user", "pk": 1, "fields": {"password": "pbkdf2_sha256$24000$tgEmPyvMywjC$Bm1FNK/AHPiAQ8tn1g1kqk7grdltY3G6iQWFPbm8Rjw=", "last_login": "2016-12-30T07:33:55.601Z", "is_superuser": true, "username": "aditya", "first_name": "", "last_name": "", "email": "", "is_staff": true, "is_active": true, "date_joined": "2016-11-30T09:45:02.813Z", "groups": [], "user_permissions": []}}, {"model": "auth.user", "pk": 2, "fields": {"password": "pbkdf2_sha256$24000$zGPmfwptCpZT$jeNAn/2JN1ISZHSOEG0rXYsCG3eEVhCeip3GlvOYDKQ=", "last_login": "2017-01-02T06:03:40.815Z", "is_superuser": false, "username": "teacher", "first_name": "teacher", "last_name": "t", "email": "teaacher@mail.com", "is_staff": false, "is_active": true, "date_joined": "2016-11-30T09:45:44Z", "groups": [1], "user_permissions": []}}, {"model": "auth.user", "pk": 3, "fields": {"password": "pbkdf2_sha256$24000$VOZ7IiEsvIee$VKGj51Q5TWpUsUL6hyUsEusq/4+aIPPjKRwQo00rGNE=", "last_login": "2016-12-30T07:34:50.594Z", "is_superuser": false, "username": "teacher2", "first_name": "teacher2", "last_name": "teacher2", "email": "teaacher@mail.com", "is_staff": false, "is_active": true, "date_joined": "2016-12-30T07:33:41Z", "groups": [1], "user_permissions": []}}, {"model": "sessions.session", "pk": "7ioreddxvjsgoxpjrv95m768zsqrx3jb", "fields": {"session_data": "ZDA3OWY3MjNiYjVhNzg3MTllOTZlMzczODVjNmRhNWUyZmU5MzMyYTp7Il9hdXRoX3VzZXJfaGFzaCI6ImI0NmYwNWQ2OTdjMDQwNWExOTlkYTgzMWRlOGMxZWQwYzY3NzRkNjMiLCJfYXV0aF91c2VyX2JhY2tlbmQiOiJkamFuZ28uY29udHJpYi5hdXRoLmJhY2tlbmRzLk1vZGVsQmFja2VuZCIsIl9hdXRoX3VzZXJfaWQiOiIyIn0=", "expire_date": "2017-01-16T06:03:40.917Z"}}, {"model": "yaksh.course", "pk": 1, "fields": {"name": "demo", "enrollment": "open", "active": true, "creator": 2, "created_on": "2016-11-30T09:46:57.721Z", "is_trial": false, "students": [2], "requests": [], "rejected": [], "teachers": []}}, {"model": "yaksh.course", "pk": 49, "fields": {"name": "Demo Course", "enrollment": "open", "active": true, "creator": 3, "created_on": "2016-12-30T07:35:24.348Z", "is_trial": false, "students": [], "requests": [], "rejected": [], "teachers": []}}, {"model": "yaksh.course", "pk": 50, "fields": {"name": "Yaksh Demo course", "enrollment": "open", "active": true, "creator": 3, "created_on": "2016-12-30T10:08:00.894Z", "is_trial": false, "students": [], "requests": [], "rejected": [], "teachers": []}}, {"model": "yaksh.course", "pk": 52, "fields": {"name": "trial_course", "enrollment": "open", "active": true, "creator": 2, "created_on": "2017-01-02T10:01:06.212Z", "is_trial": true, "students": [2], "requests": [], "rejected": [], "teachers": []}}, {"model": "yaksh.concurrentuser", "pk": 1, "fields": {"concurrent_user": 2, "session_key": "7ioreddxvjsgoxpjrv95m768zsqrx3jb"}}, {"model": "yaksh.concurrentuser", "pk": 2, "fields": {"concurrent_user": 1, "session_key": "9okh5j7l02l5q6c8s7ugy41y4xjhfvau"}}, {"model": "yaksh.concurrentuser", "pk": 3, "fields": {"concurrent_user": 3, "session_key": "z1dk1ajplscas6zg0efqwg4rplmwhp80"}}, {"model": "yaksh.profile", "pk": 1, "fields": {"user": 2, "roll_number": "1234", "institute": "djndsfs", "department": "ldfk", "position": "ldf", "timezone": "UTC"}}, {"model": "yaksh.profile", "pk": 2, "fields": {"user": 3, "roll_number": "213e432", "institute": "dslflkf", "department": "dfaffaf", "position": "dfaff", "timezone": "Asia/Kolkata"}}, {"model": "yaksh.question", "pk": 1, "fields": {"summary": "Make File Question (Thursday 3-11-2016)", "description": "Consider a Makefile with \r\n<pre>\r\nall: main\r\nmain: main.c\r\nclean: \r\n rm -f main\r\n</pre> as its content.\r\n<br><br>\r\nWhich of the following is correct if the following code is executed.\r\n<br>\r\n<pre>\r\nmake\r\ntouch clean\r\nmake clean\r\n</pre>", "points": 1.0, "language": "bash", "type": "mcq", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 2, "fields": {"summary": "Find alphabetic characters (a) (Thursday 3-11-2016)", "description": "Write a function \"find_alpha\" which will take a <b>SET</b> of any set of values and\r\nfind all the non alphabetic characters and return the non alphabetic characters as a <b>SET</b>.\r\n<br>\r\n<br>\r\nFor Example\r\n<pre>\r\n>>> find_non_alpha({'a', 'b', ',', '.'})\r\n>>> {',', '.'}\r\n>>> find_non_alpha({'a', '#', '12', '@', '3'})\r\n>>> {'#', '12', '@', '3'}\r\n</pre>\r\n<b>Note:-</b> Answer to this question will be required in an another question. Please copy the final answer before submitting.", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 3, "fields": {"summary": "Sort List of tuples (b) (Thursday 3-11-2016)", "description": "write a function <b>\"sort_list\"</b> which will take a list of tuples where each tuple will have two elements first element is a alphabetic character and second element is the no of occurrences of that character.\r\n<br>\r\n<br>\r\nSort the list from highest occurrences to lowest occurrences and return list of tuples.\r\n<br>\r\n<br>\r\nIf the characters has same no of occurrences then sort the list by alphabetical order.\r\n<br>\r\n<br>\r\nFor Example:\r\n<pre>\r\n>>> sort_list([(\"b\", 2), (\"a\", 2)])\r\n>>> [(\"a\", 2), (\"b\", 2)]\r\n>>> sort_list([(\"c\", 2), (\"d\", 3)])\r\n>>> [(\"d\", 3), (\"c\", 2)]\r\n</pre>", "points": 2.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 4, "fields": {"summary": "Remove non alphabetic characters (c) (Thursday 3-11-2016)", "description": "write a function \"remove_non_alpha\" which will take a string and then perform following operation on string :-\r\n<li> Remove all the non alphabetic characters.\r\n<li> Count the no of occurrences of a character.\r\n<li> Sort the count of occurrences from highest to lowest.\r\n<li> If the characters has same no of occurrences then sort the list by alphabetical order.\r\n<br><br>\r\nFunction should return list of tuples where first element of tuple is the character and second element is no of occurrences of the character. \r\n<br>\r\n<br>\r\nFor Example:\r\n<pre>\r\n>>> remove_non_alpha(\"ab#c\")\r\n>>> [(\"a\", 1), (\"b\", 1), (\"c\", 1)]\r\n>>> remove_non_alpha(\"123a\")\r\n>>> [(\"a\", 1)]\r\n</pre>\r\nYou can use the functions from previous questions to get non alphabetic character.", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 5, "fields": {"summary": "Find error Mock (Thursday 3/11/16)", "description": "What is wrong with this code (assuming it is run in some empty directory)?\r\n<br>\r\n<br>\r\n<pre>\r\n# clean_tex.py\r\nimport os\r\ndef cleanup(tex_file_pth):\r\n base = os.path.splitext(tex_file_pth)[0]\r\n for ext in ('.aux', '.log'):\r\n f = base + ext\r\n if os.path.exists(f):\r\n os.remove(f)\r\n</pre>\r\n<br>\r\n<pre>\r\n# test_clean_tex.py\r\nfrom unittest import mock\r\n\r\n@mock.patch('os.remove')\r\ndef test_cleanup_removes_extra_files(mock_remove):\r\n cleanup('foo.tex')\r\n expected = [mock.call('foo.' + x) for x in ('aux', 'log')]\r\n mock_remove.assert_has_calls(expected)\r\n</pre>", "points": 2.0, "language": "python", "type": "mcc", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 6, "fields": {"summary": "test pratham", "description": "check palindrome", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 7, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 8, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 9, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 10, "fields": {"summary": "test pratham", "description": ",dfjklsdjfks", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 11, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 12, "fields": {"summary": "test mul test case", "description": "dfl;djflksdf", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 13, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 14, "fields": {"summary": "iadufisdhf", "description": "zdfkjdsf", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 15, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 16, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 17, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 18, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 19, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 20, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 21, "fields": {"summary": ".,dfnlskmf", "description": ",/djfksdf", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 22, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 23, "fields": {"summary": "Dummy Question", "description": "write a program for adder", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 24, "fields": {"summary": "Dummy Question", "description": "write a program for adder", "points": 1.0, "language": "python", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 25, "fields": {"summary": "cpp new eval", "description": "write a program for add", "points": 1.0, "language": "c", "type": "code", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 26, "fields": {"summary": "Python Question", "description": "Write a function <b>add</b> to add two numbers.", "points": 1.0, "language": "python", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 27, "fields": {"summary": "C Question", "description": "write a program for add", "points": 1.0, "language": "c", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 28, "fields": {"summary": "C StdIO Question", "description": "write add", "points": 1.0, "language": "c", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 29, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 30, "fields": {"summary": "Bash Question", "description": "wrtie to cut copy paste", "points": 1.0, "language": "bash", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 31, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 32, "fields": {"summary": "Java Question", "description": "write a square program", "points": 1.0, "language": "java", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 33, "fields": {"summary": "Scilab Question", "description": "write a scilab code", "points": 1.0, "language": "scilab", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 34, "fields": {"summary": "demo question", "description": "sdkfjkldsjf", "points": 1.0, "language": "python", "type": "mcq", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 35, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 36, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 37, "fields": {"summary": "Demo Question", "description": "bash code to cd and read test.txt", "points": 1.0, "language": "bash", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 38, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 39, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 40, "fields": {"summary": "Demo Question 2", "description": "ld;af;lwfadk;;fdkf;", "points": 1.0, "language": "python", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 41, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 42, "fields": {"summary": "Yaksh Demo Question", "description": "Write a program to add 3 nos. \r\n<br>\r\nFunction Name is \"add\"\r\n<br>\r\n<br><br>\r\nNote: You do not have to print anything, neither you have to make the function call. Just define the function to perform the required operation, return the output & click on check answer. Also, note that the function name should exactly be as mentioned above.", "points": 1.0, "language": "c", "type": "code", "active": true, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 43, "fields": {"summary": "", "description": "", "points": 1.0, "language": "", "type": "", "active": false, "snippet": "", "user": 2, "partial_grading": false}}, {"model": "yaksh.question", "pk": 44, "fields": {"summary": "Yaksh Demo Question", "description": "Write a program to add 3 nos. \r\n<br>\r\nFunction Name is \"add\"\r\n<br>\r\n<br><br>\r\nNote: You do not have to print anything, neither you have to make the function call. Just define the function to perform the required operation, return the output & click on check answer. Also, note that the function name should exactly be as mentioned above.", "points": 1.0, "language": "c", "type": "code", "active": true, "snippet": "", "user": 3, "partial_grading": false}}, {"model": "yaksh.fileupload", "pk": 1, "fields": {"file": "question_23/Git_Unit_Test_2.csv", "question": 23, "extract": false, "hide": false}}, {"model": "yaksh.fileupload", "pk": 2, "fields": {"file": "question_24/Git_Unit_Test_2.csv", "question": 24, "extract": false, "hide": false}}, {"model": "yaksh.fileupload", "pk": 4, "fields": {"file": "question_30/file1.csv", "question": 30, "extract": false, "hide": false}}, {"model": "yaksh.fileupload", "pk": 5, "fields": {"file": "question_30/file2.csv", "question": 30, "extract": false, "hide": false}}, {"model": "yaksh.fileupload", "pk": 6, "fields": {"file": "question_30/file3.csv", "question": 30, "extract": false, "hide": false}}, {"model": "yaksh.fileupload", "pk": 17, "fields": {"file": "question_37/somedata.zip", "question": 37, "extract": true, "hide": true}}, {"model": "yaksh.answer", "pk": 1, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 2, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 3, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 4, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 5, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 6, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 7, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 8, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 9, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 10, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 11, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 12, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 13, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 14, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 15, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 16, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 17, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 18, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 19, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "Error: Traceback (most recent call last):\nNameError: global name 'clean_ref_code_path' is not defined\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 20, "fields": {"question": 25, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "Input submitted to the function: 0, 0\nCorrect:\n Expected 0 got 0 \nInput submitted to the function: 2 3\nIncorrect:\n Expected 5 got 2 \n \n \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 21, "fields": {"question": 27, "answer": "int add(int a, int b)\r\n{\r\n return a;\r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 22, "fields": {"question": 27, "answer": "int add(int a, int b)\r\n{\r\n return a;\r\n}", "error": "Input submitted to the function: 0, 0\nCorrect:\n Expected 0 got 0 \nInput submitted to the function: 2 3\nIncorrect:\n Expected 5 got 2 \n \n \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 23, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n printf(\"%d\", a+b);\r\n}", "error": "", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 24, "fields": {"question": 30, "answer": "#!bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 25, "fields": {"question": 30, "answer": "#!bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 26, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 27, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 28, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 29, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\nAttributeError: 'BashCodeEvaluator' object has no attribute 'test_code_patht'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 30, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 31, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 32, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 33, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 99, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 34, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 35, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 36, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 37, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 38, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected , got \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 39, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected , got \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 40, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 99, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 41, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 42, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 43, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 44, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 45, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 46, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 47, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 48, "fields": {"question": 30, "answer": "ls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 99, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 8] Exec format error\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 49, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 50, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 51, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 98, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 52, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"yaksh/grader.py\", line 148, in safe_evaluate\n File \"yaksh/bash_code_evaluator.py\", line 99, in check_code\n File \"yaksh/base_evaluator.py\", line 33, in _run_command\n File \"/usr/lib/python2.7/subprocess.py\", line 711, in __init__\n errread, errwrite)\n File \"/usr/lib/python2.7/subprocess.py\", line 1343, in _execute_child\n raise child_exception\nOSError: [Errno 2] No such file or directory\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 53, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected , got \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 54, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected , got \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 55, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected , got \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 56, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected , got \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 57, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 58, "fields": {"question": 30, "answer": "#!/bin/bash\r\nldd", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got ldd: missing file arguments\nTry `ldd --help' for more information.\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 59, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncutttt", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got /tmp/output/teacher/submit.sh: line 2: cutttt: command not found\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 60, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncutttt", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got /tmp/output/teacher/submit.sh: line 2: cutttt: command not found\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 61, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncutttt", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 62, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncutttt", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got /tmp/output/teacher/submit.sh: line 2: cutttt: command not found\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 63, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncutttt", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got /tmp/output/teacher/submit.sh: line 2: cutttt: command not found\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 64, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 65, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: Traceback (most recent call last):\n File \"/usr/lib/python2.7/genericpath.py\", line 26, in exists\n os.stat(path)\nTypeError: coercing to Unicode: need string or buffer, NoneType found\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 66, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 67, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 68, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 69, "fields": {"question": 27, "answer": "int add(int a, int b){\r\n return a;\r\n}", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 70, "fields": {"question": 27, "answer": "int add(int a, int b){\r\n return a;\r\n}", "error": "Input submitted to the function: 0, 0\nCorrect:\n Expected 0 got 0 \nInput submitted to the function: 1, 2\nIncorrect:\n Expected 3 got 1 \n \n \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 71, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main(){\r\nint a,b;\r\n scanf(\"%d, %d\", &a, &b);\r\n printf(\"%d\", a+b);\r\n}", "error": "", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 72, "fields": {"question": 32, "answer": "class Test{\r\n int factorial(int num)\r\n {\r\n return num;\r\n }\r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 73, "fields": {"question": 32, "answer": "class Test{\r\n int factorial(int num)\r\n {\r\n return num;\r\n }\r\n}", "error": "Input submitted to the function: 0\nIncorrect:\nOutput expected 1 but got 0\n\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 74, "fields": {"question": 32, "answer": "class Test{\r\n int factorial(int num)\r\n {\r\n int fact = 1;\r\n while(num > 0)\r\n {\r\n fact = fact * num;\r\n num = num-1;\r\n }\r\n return fact;\r\n }\r\n}", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 75, "fields": {"question": 32, "answer": "class Test{\r\n int factorial(int num)\r\n {\r\n return 1;\r\n }\r\n}", "error": "Input submitted to the function: 0\nCorrect:\nOutput expected 1 and got 1\nInput submitted to the function: 3\nIncorrect:\nOutput expected 6 but got 1\n\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 76, "fields": {"question": 27, "answer": "int add(int a, int b){\r\n return a; \r\n}", "error": "Input submitted to the function: 0, 0\nCorrect:\n Expected 0 got 0 \nInput submitted to the function: 1, 2\nIncorrect:\n Expected 3 got 1 \n \n \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 77, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a;\r\n}", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 78, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a;\r\n}", "error": "Input submitted to the function: 0, 0, 0\nCorrect:\n Expected 0 got 0 \nInput submitted to the function: 2, 3, 3\nIncorrect:\n Expected 8 got 2 \n \n \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 79, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a+b+c;\r\n}", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 80, "fields": {"question": 32, "answer": "", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 81, "fields": {"question": 26, "answer": "", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 82, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a; \r\n}", "error": "Input submitted to the function: 0, 0, 0\nCorrect:\n Expected 0 got 0 \nInput submitted to the function: 2, 3, 3\nIncorrect:\n Expected 8 got 2 \n \n \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 83, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 84, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b;\r\n scanf(\"%d, %d\", &a, &b);\r\n printf(\"%d\", a);\r\n}", "error": "", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 85, "fields": {"question": 30, "answer": "", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 86, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 87, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 88, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n while(1){\r\n \r\n }\r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 89, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n while(1){\r\n \r\n }\r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 90, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n while(1){\r\n \r\n }\r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 91, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n while(1){\r\n \r\n }\r\n}", "error": "Error: Traceback (most recent call last):\n File \"yaksh/base_evaluator.py\", line 54, in create_submit_code_file\n submit_f = open(submit_path, 'w')\nIOError: [Errno 13] Permission denied: u'/home/aditya/yaksh/online_test/submit.c'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 92, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n while(1){\r\n \r\n }\r\n}", "error": "Code took more than 4 seconds to run. You probably have an infinite loop in your code.", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 93, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a;\r\n}", "error": "Input submitted to the function: 0, 0, 0\nCorrect:\n Expected 0 got 0 \nInput submitted to the function: 2, 3, 3\nIncorrect:\n Expected 8 got 2 \n \n \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 94, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a;\r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 95, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b;\r\n \r\n}", "error": "", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 96, "fields": {"question": 30, "answer": "", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 97, "fields": {"question": 30, "answer": "", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 98, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a;\r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 99, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 100, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 101, "fields": {"question": 27, "answer": "", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 102, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b;\r\n}", "error": "", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 103, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a,b;\r\n}", "error": "", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 104, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b;\r\n}", "error": "", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 105, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b; \r\n}", "error": "", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 106, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b; \r\n}", "error": "Error: Traceback (most recent call last):\nAttributeError: 'CppStdIOEvaluator' object has no attribute 'submit_code_path'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 107, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b; \r\n}", "error": "Error: Traceback (most recent call last):\nAttributeError: 'CppStdIOEvaluator' object has no attribute 'submit_code_path'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 108, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nvoid main()\r\n{\r\n int a, b; \r\n}", "error": "Compilation Error:\n2:11: error: \u2018::main\u2019 must return \u2018int\u2019\n void main()\n ^\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 109, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a, b; \r\n return 0;\r\n}", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u''\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 110, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "No test case at \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 111, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "No test case at \n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 112, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error: expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 113, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.args\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 114, "fields": {"question": 30, "answer": "#!/bin/bash\r\npwd", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got /tmp/output/teacher\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 115, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncut $1", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got cut: you must specify a list of bytes, characters, or fields\nTry 'cut --help' for more information.\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 116, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncat $1", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got 1:11:1\n1:11:1\n1:11:1\n1:11:1\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 117, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a+b+c; \r\n}", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 118, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d,%d\", &a, &b);\r\n printf(\"%d\", a+b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'32766'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 119, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d,%d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d\", c); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'1013938385'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 120, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d,%d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d\", a); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'1'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 121, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d,%d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d\", b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'-2074039008'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 122, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d\", b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'-449141616'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 123, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d, %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d\", b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'-963800864'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 124, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d, %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'1 -1278309760'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 125, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'1 1469438992'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 126, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'1 599085392'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 127, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d\", &a);\r\n scanf(\"%d\", &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\\n2 \n Expected Output is u'3' \n Your output is u'1 540444176'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 128, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d\", &a);\r\n scanf(\"%d\", &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 129, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.args\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 130, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 131, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d\", &a);\r\n scanf(\"%d\", &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\r\n2 \n Expected Output is u'3' \n Your output is u'1 2'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 132, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d, %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\r\n2 \n Expected Output is u'3' \n Your output is u'1 1337561232'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 133, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": "Compilation Error:\n In function \u2018int main()\u2019:\n7:3: error: expected \u2018,\u2019 or \u2018;\u2019 before \u2018printf\u2019\n printf(\"%d %d\", a, b); \n ^\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 134, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b\r\n printf(\"%d, %d\", a, b); \r\n}\r\n \r\n ", "error": "Compilation Error:\n In function \u2018int main()\u2019:\n7:3: error: expected \u2018,\u2019 or \u2018;\u2019 before \u2018printf\u2019\n printf(\"%d, %d\", a, b); \n ^\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 135, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d, %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\r\n2 \n Expected Output is u'3' \n Your output is u'1, 2'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 136, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d, %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\r\n2 \n Expected Output is u'3' \n Your output is u'1 92090336'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 137, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d %d\", a, b); \r\n}\r\n \r\n ", "error": " Incorrect answer\n Given Input is\n 1\r\n2 \n Expected Output is u'3' \n Your output is u'1 2'\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 138, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a,b;\r\n scanf(\"%d %d\", &a, &b);\r\n int c = a+b;\r\n printf(\"%d\", c); \r\n}\r\n \r\n ", "error": "Correct answer\n", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 139, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got file1.csv\nfile2.csv\nfile3.csv\nmain.args\nmain.sh\nsubmit.sh\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 140, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncat $1", "error": "Error:expected 3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n3:3:11:2:2\n, got 1:11:1\n1:11:1\n1:11:1\n1:11:1\n\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 141, "fields": {"question": 33, "answer": "kdvds", "error": "Message\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 142, "fields": {"question": 33, "answer": "funcprot(0)\r\nfunction[c]=add(a,b)\r\n\tc=a;\r\n while(1==1)\r\n end\r\nendfunction", "error": "Message\n", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 143, "fields": {"question": 32, "answer": "class Test\r\n{\r\n int square_num(int num){\r\n return num*num;\r\n }\r\n}", "error": "[\"Error:\\n19: error: cannot find symbol\\n result = t.factorial(0);\\n ^\\n method factorial(int)\\n variable t of type Test\\n22: error: cannot find symbol\\n result = t.factorial(3);\\n ^\\n method factorial(int)\\n variable t of type Test\\n25: error: cannot find symbol\\n result = t.factorial(4);\\n ^\\n method factorial(int)\\n variable t of type Test\\n3 errors\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 144, "fields": {"question": 32, "answer": "class Test\r\n{\r\n int factorial(int num){\r\n return num*num;\r\n }\r\n}", "error": "[\"Input submitted to the function: 0\\nIncorrect:\\nOutput expected 1 but got 0\\n\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 145, "fields": {"question": 32, "answer": "class Test\r\n{\r\n int factorial(int num){\r\n int fact = 1;\r\n while(num > 0){\r\n fact = fact * num;\r\n num = num - 1; \r\n }\r\n }\r\n}", "error": "[\"Compilation Error:\\n9: error: missing return statement\\n }\\n ^\\n1 error\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 146, "fields": {"question": 32, "answer": "class Test\r\n{\r\n int factorial(int num){\r\n int fact = 1;\r\n while(num > 0){\r\n fact = fact * num;\r\n num = num - 1; \r\n }\r\n return fact;\r\n }\r\n}", "error": "[]", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 147, "fields": {"question": 27, "answer": "", "error": "[]", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 148, "fields": {"question": 28, "answer": "", "error": "[]", "marks": 0.0, "correct": false, "skipped": true}}, {"model": "yaksh.answer", "pk": 149, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a+b \r\n}", "error": "[\"Compilation Error: \\n In function \\u2018int add(int, int, int)\\u2019: \\n 3:1: error: expected \\u2018;\\u2019 before \\u2018}\\u2019 token \\n } \\n ^\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 150, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a+b;\r\n}", "error": "[\"Input submitted to the function: 0, 0, 0\\nCorrect:\\n Expected 0 got 0 \\nInput submitted to the function: 2, 3, 3\\nIncorrect:\\n Expected 8 got 5 \\n \\n \"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 151, "fields": {"question": 27, "answer": "int add(int a, int b, int c){\r\n return a+b+c;\r\n}", "error": "[]", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 152, "fields": {"question": 28, "answer": "#include<stdio.h>\r\nint main()\r\n{\r\n int a, b;\r\n scanf(\"%d %d\", &a, &b);\r\n printf(\"%d\", a+b);\r\n}", "error": "[]", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 153, "fields": {"question": 30, "answer": "#!/bin/bash\r\nls", "error": "[\"Error:expected 3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n, got file1.csv\\nfile2.csv\\nfile3.csv\\nmain.args\\nmain.sh\\nsubmit.sh\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 154, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncat $1", "error": "[\"Error:expected 3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n, got 1:11:1\\n1:11:1\\n1:11:1\\n1:11:1\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 155, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncat $2", "error": "[\"Error:expected 3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n, got 2:2\\n2:2\\n2:2\\n2:2\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 156, "fields": {"question": 30, "answer": "#!/bin/bash\r\ncat $3", "error": "[\"Error:expected 3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n3:3:11:2:2\\n, got 3:3\\n3:3\\n3:3\\n3:3\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 157, "fields": {"question": 32, "answer": "import java.util.*;\r\nclass Test\r\n{\r\n public static void main(String[] args){\r\n Scanner s = new Scanner(System.in);\r\n int a = s.nextInt();\r\n int b = s.nextInt();\r\n System.out.print(a+b);\r\n }\r\n}", "error": "[]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 158, "fields": {"question": 26, "answer": "def add(a,b):\r\n return a", "error": "[]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 159, "fields": {"question": 26, "answer": "def add(a,b):\r\n return a", "error": "[\"Expected Test Case:\\nassert add(1,2) == 3\\nError - AssertionError in: assert add(1,2) == 3\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 160, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error:expected /tmp/output/teacher/main.sh: line 2: cd: /tmp/somepath: No such file or directory\\ncat: test.txt: No such file or directory\\n, got /tmp/output/teacher\\n/tmp/output/teacher/submit.sh: line 2: cd: /tmp/somepath: No such file or directory\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 161, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error: Traceback (most recent call last):\\n File \\\"yaksh/file_utils.py\\\", line 16, in copy_files\\n File \\\"/usr/lib/python2.7/shutil.py\\\", line 119, in copy\\n copyfile(src, dst)\\n File \\\"/usr/lib/python2.7/shutil.py\\\", line 82, in copyfile\\n with open(src, 'rb') as fsrc:\\nIOError: [Errno 2] No such file or directory: u'/home/aditya/yaksh/online_test/yaksh/data/question_37/somedata.zip'\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 162, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error:expected /tmp/output/teacher/main.sh: line 2: cd: somepath: No such file or directory\\ncat: test.txt: No such file or directory\\n, got /tmp/output/teacher\\n/tmp/output/teacher/submit.sh: line 2: cd: somepath: No such file or directory\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 163, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error:expected /tmp/output/teacher/main.sh: line 2: cd: somepath/: No such file or directory\\ncat: test.txt: No such file or directory\\n, got /tmp/output/teacher\\n/tmp/output/teacher/submit.sh: line 2: cd: somepath/: No such file or directory\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 164, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error:expected /tmp/output/teacher/main.sh: line 2: cd: somepath/: No such file or directory\\ncat: test.txt: No such file or directory\\n, got /tmp/output/teacher\\n/tmp/output/teacher/submit.sh: line 2: cd: somepath/: No such file or directory\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 165, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error:expected 2\\n, got /tmp/output/teacher/somedata\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 166, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error:expected 2\\n, got /tmp/output/teacher/somedata\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 167, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\ncat $2", "error": "[]", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 168, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\npwd", "error": "[\"Error:expected 2\\n, got /tmp/output/teacher/somedata\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 169, "fields": {"question": 37, "answer": "#!/bin/bash\r\ncd $1\r\ncat $2 ", "error": "[]", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.answer", "pk": 170, "fields": {"question": 26, "answer": "def add(a, b):\r\n return a", "error": "[\"Expected Test Case:\\nassert add(1,2) == 3\\nError - AssertionError in: assert add(1,2) == 3\\n\"]", "marks": 0.0, "correct": false, "skipped": false}}, {"model": "yaksh.answer", "pk": 171, "fields": {"question": 26, "answer": "def add(a, b):\r\n return a + b", "error": "[]", "marks": 1.0, "correct": true, "skipped": false}}, {"model": "yaksh.quiz", "pk": 1, "fields": {"course": 1, "start_date_time": "2016-11-30T09:54:22Z", "end_date_time": "2199-01-01T00:00:00Z", "duration": 20, "active": true, "description": "demo quiz inst", "pass_criteria": 40.0, "prerequisite": null, "language": "python", "attempts_allowed": 1, "time_between_attempts": 0, "is_trial": false, "instructions": "<p>\r\nThis examination system has been developed with the intention of making you \r\nlearn programming and be assessed in an interactive and fun manner.\r\nYou will be presented with a series of programming questions and problems that \r\nyou will answer online and get immediate feedback for.\r\n</p>", "view_answerpaper": false}}, {"model": "yaksh.quiz", "pk": 2, "fields": {"course": 1, "start_date_time": "2016-11-30T09:56:06.321Z", "end_date_time": "2199-01-01T00:00:00Z", "duration": 1000, "active": true, "description": "Trial_orig_id_1_godmode", "pass_criteria": 40.0, "prerequisite": null, "language": "python", "attempts_allowed": -1, "time_between_attempts": 0, "is_trial": true, "instructions": "<p>\r\nThis examination system has been developed with the intention of making you \r\nlearn programming and be assessed in an interactive and fun manner.\r\nYou will be presented with a series of programming questions and problems that \r\nyou will answer online and get immediate feedback for.\r\n</p>\r\n<p> Here are some important instructions and rules that you should understand carefully.</p> \r\n<ul>\r\n<li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.\r\n</li>\r\n<li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.\r\n</li>\r\n<li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>\r\n<li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>\r\n<li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expel you from the course. You have been warned.\r\n</li>\r\n</ul>\r\n<p> We hope you enjoy taking this exam !!!</p>", "view_answerpaper": false}}, {"model": "yaksh.quiz", "pk": 3, "fields": {"course": 1, "start_date_time": "2016-12-01T12:42:26Z", "end_date_time": "2199-01-01T00:00:00Z", "duration": 20, "active": true, "description": "sdfs", "pass_criteria": 40.0, "prerequisite": null, "language": "python", "attempts_allowed": 1, "time_between_attempts": 0, "is_trial": false, "instructions": "<p>\r\nThis examination system has been developed with the intention of making you \r\nlearn programming and be assessed in an interactive and fun manner.\r\nYou will be presented with a series of programming questions and problems that \r\nyou will answer online and get immediate feedback for.\r\n</p>\r\n<br/>\r\n<p> Here are some important instructions and rules that you should understand carefully.</p> \r\n<br/><br/>\r\n<ul>\r\n<li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.\r\n</li>\r\n<li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.\r\n</li>\r\n<li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>\r\n<li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>\r\n<li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expel you from the course. You have been warned.\r\n</li>\r\n</ul>\r\n<br/><br/>\r\n<p> We hope you enjoy taking this exam !!!</p>", "view_answerpaper": false}}, {"model": "yaksh.quiz", "pk": 42, "fields": {"course": 1, "start_date_time": "2016-12-22T11:44:22Z", "end_date_time": "2199-01-01T00:00:00Z", "duration": 20, "active": true, "description": "checking quiz", "pass_criteria": 40.0, "prerequisite": null, "language": "python", "attempts_allowed": 1, "time_between_attempts": 0, "is_trial": false, "instructions": "<p>\r\nThis examination system has been developed with the intention of making you \r\nlearn programming and be assessed in an interactive and fun manner.\r\nYou will be presented with a series of programming questions and problems that \r\nyou will answer online and get immediate feedback for.\r\n</p>\r\n<p> Here are some important instructions and rules that you should understand carefully.</p> \r\n<ul>\r\n<li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.\r\n</li>\r\n<li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.\r\n</li>\r\n<li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>\r\n<li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>\r\n<li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expel you from the course. You have been warned.\r\n</li>\r\n</ul>\r\n<p> We hope you enjoy taking this exam !!!</p>", "view_answerpaper": false}}, {"model": "yaksh.quiz", "pk": 50, "fields": {"course": 1, "start_date_time": "2016-12-30T06:17:47Z", "end_date_time": "2199-01-01T00:00:00Z", "duration": 20, "active": true, "description": "dfldsfk", "pass_criteria": 40.0, "prerequisite": null, "language": "python", "attempts_allowed": 1, "time_between_attempts": 0, "is_trial": false, "instructions": "<p>\r\nThis examination system has been developed with the intention of making you \r\nlearn programming and be assessed in an interactive and fun manner.\r\nYou will be presented with a series of programming questions and problems that \r\nyou will answer online and get immediate feedback for.\r\n</p>\r\n<p> Here are some important instructions and rules that you should understand carefully.</p> \r\n<ul>\r\n<li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.\r\n</li>\r\n<li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.\r\n</li>\r\n<li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>\r\n<li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>\r\n<li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expel you from the course. You have been warned.\r\n</li>\r\n</ul>\r\n<p> We hope you enjoy taking this exam !!!</p>", "view_answerpaper": false}}, {"model": "yaksh.quiz", "pk": 51, "fields": {"course": 49, "start_date_time": "2016-12-30T06:17:47Z", "end_date_time": "2199-01-01T00:00:00Z", "duration": 20, "active": true, "description": "Demo Quiz 1", "pass_criteria": 40.0, "prerequisite": null, "language": "python", "attempts_allowed": 1, "time_between_attempts": 0, "is_trial": false, "instructions": "<p>\r\nThis examination system has been developed with the intention of making you \r\nlearn programming and be assessed in an interactive and fun manner.\r\nYou will be presented with a series of programming questions and problems that \r\nyou will answer online and get immediate feedback for.\r\n</p>\r\n<p> Here are some important instructions and rules that you should understand carefully.</p> \r\n<ul>\r\n<li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.\r\n</li>\r\n<li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.\r\n</li>\r\n<li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>\r\n<li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>\r\n<li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expel you from the course. You have been warned.\r\n</li>\r\n</ul>\r\n<p> We hope you enjoy taking this exam !!!</p>", "view_answerpaper": false}}, {"model": "yaksh.quiz", "pk": 52, "fields": {"course": 50, "start_date_time": "2016-12-30T10:08:01.158Z", "end_date_time": "2500-06-26T10:08:01.158Z", "duration": 30, "active": true, "description": "Yaksh Demo quiz", "pass_criteria": 0.0, "prerequisite": null, "language": "Python", "attempts_allowed": -1, "time_between_attempts": 0, "is_trial": false, "instructions": "<p>\nThis examination system has been developed with the intention of making you \nlearn programming and be assessed in an interactive and fun manner.\nYou will be presented with a series of programming questions and problems that \nyou will answer online and get immediate feedback for.\n</p>\n<p> Here are some important instructions and rules that you should understand carefully.</p> \n<ul>\n<li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.\n</li>\n<li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.\n</li>\n<li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>\n<li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>\n<li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expel you from the course. You have been warned.\n</li>\n</ul>\n<p> We hope you enjoy taking this exam !!!</p>\n", "view_answerpaper": false}}, {"model": "yaksh.quiz", "pk": 54, "fields": {"course": 52, "start_date_time": "2017-01-02T09:57:47.999Z", "end_date_time": "2199-01-01T00:00:00Z", "duration": 1000, "active": true, "description": "trial_questions", "pass_criteria": 40.0, "prerequisite": null, "language": "", "attempts_allowed": 1, "time_between_attempts": 0, "is_trial": true, "instructions": "<p>\nThis examination system has been developed with the intention of making you \nlearn programming and be assessed in an interactive and fun manner.\nYou will be presented with a series of programming questions and problems that \nyou will answer online and get immediate feedback for.\n</p>\n<p> Here are some important instructions and rules that you should understand carefully.</p> \n<ul>\n<li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.\n</li>\n<li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.\n</li>\n<li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>\n<li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>\n<li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expel you from the course. You have been warned.\n</li>\n</ul>\n<p> We hope you enjoy taking this exam !!!</p>\n", "view_answerpaper": false}}, {"model": "yaksh.questionpaper", "pk": 1, "fields": {"quiz": 1, "shuffle_questions": false, "total_marks": 0.0, "fixed_questions": [], "random_questions": []}}, {"model": "yaksh.questionpaper", "pk": 2, "fields": {"quiz": 2, "shuffle_questions": false, "total_marks": 2.0, "fixed_questions": [3], "random_questions": []}}, {"model": "yaksh.questionpaper", "pk": 41, "fields": {"quiz": 42, "shuffle_questions": false, "total_marks": 3.0, "fixed_questions": [27, 28, 30], "random_questions": []}}, {"model": "yaksh.questionpaper", "pk": 52, "fields": {"quiz": 50, "shuffle_questions": false, "total_marks": 0.0, "fixed_questions": [], "random_questions": []}}, {"model": "yaksh.questionpaper", "pk": 53, "fields": {"quiz": 52, "shuffle_questions": false, "total_marks": 0.0, "fixed_questions": [], "random_questions": []}}, {"model": "yaksh.questionpaper", "pk": 54, "fields": {"quiz": 51, "shuffle_questions": false, "total_marks": 0.0, "fixed_questions": [], "random_questions": []}}, {"model": "yaksh.questionpaper", "pk": 56, "fields": {"quiz": 54, "shuffle_questions": false, "total_marks": 9.0, "fixed_questions": [26, 27, 28, 30, 32, 33, 37, 40, 42], "random_questions": []}}, {"model": "yaksh.answerpaper", "pk": 50, "fields": {"user": 2, "question_paper": 56, "attempt_number": 1, "start_time": "2017-01-02T10:01:07.112Z", "end_time": "2017-01-03T02:41:07.112Z", "user_ip": "127.0.0.1", "comments": "", "marks_obtained": null, "percent": null, "passed": null, "status": "inprogress", "questions": [32, 33, 37, 40, 42, 26, 27, 28, 30], "questions_unanswered": [32, 33, 37, 40, 42, 26, 27, 28, 30], "questions_answered": [], "answers": []}}, {"model": "yaksh.testcase", "pk": 1, "fields": {"question": 1, "type": null}}, {"model": "yaksh.testcase", "pk": 2, "fields": {"question": 1, "type": null}}, {"model": "yaksh.testcase", "pk": 3, "fields": {"question": 1, "type": null}}, {"model": "yaksh.testcase", "pk": 4, "fields": {"question": 1, "type": null}}, {"model": "yaksh.testcase", "pk": 5, "fields": {"question": 2, "type": null}}, {"model": "yaksh.testcase", "pk": 6, "fields": {"question": 2, "type": null}}, {"model": "yaksh.testcase", "pk": 7, "fields": {"question": 2, "type": null}}, {"model": "yaksh.testcase", "pk": 8, "fields": {"question": 2, "type": null}}, {"model": "yaksh.testcase", "pk": 9, "fields": {"question": 2, "type": null}}, {"model": "yaksh.testcase", "pk": 10, "fields": {"question": 3, "type": null}}, {"model": "yaksh.testcase", "pk": 11, "fields": {"question": 3, "type": null}}, {"model": "yaksh.testcase", "pk": 12, "fields": {"question": 3, "type": null}}, {"model": "yaksh.testcase", "pk": 13, "fields": {"question": 3, "type": null}}, {"model": "yaksh.testcase", "pk": 14, "fields": {"question": 3, "type": null}}, {"model": "yaksh.testcase", "pk": 15, "fields": {"question": 4, "type": null}}, {"model": "yaksh.testcase", "pk": 16, "fields": {"question": 4, "type": null}}, {"model": "yaksh.testcase", "pk": 17, "fields": {"question": 4, "type": null}}, {"model": "yaksh.testcase", "pk": 18, "fields": {"question": 4, "type": null}}, {"model": "yaksh.testcase", "pk": 19, "fields": {"question": 4, "type": null}}, {"model": "yaksh.testcase", "pk": 20, "fields": {"question": 4, "type": null}}, {"model": "yaksh.testcase", "pk": 21, "fields": {"question": 5, "type": null}}, {"model": "yaksh.testcase", "pk": 22, "fields": {"question": 5, "type": null}}, {"model": "yaksh.testcase", "pk": 23, "fields": {"question": 5, "type": null}}, {"model": "yaksh.testcase", "pk": 24, "fields": {"question": 5, "type": null}}, {"model": "yaksh.testcase", "pk": 25, "fields": {"question": 6, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 26, "fields": {"question": 6, "type": "stdiobasedtestcase"}}, {"model": "yaksh.testcase", "pk": 27, "fields": {"question": 6, "type": "mcqtestcase"}}, {"model": "yaksh.testcase", "pk": 29, "fields": {"question": 21, "type": "stdiobasedtestcase"}}, {"model": "yaksh.testcase", "pk": 30, "fields": {"question": 23, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 31, "fields": {"question": 23, "type": "stdiobasedtestcase"}}, {"model": "yaksh.testcase", "pk": 32, "fields": {"question": 24, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 33, "fields": {"question": 24, "type": "stdiobasedtestcase"}}, {"model": "yaksh.testcase", "pk": 34, "fields": {"question": 25, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 35, "fields": {"question": 26, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 37, "fields": {"question": 27, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 39, "fields": {"question": 30, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 41, "fields": {"question": 28, "type": "stdiobasedtestcase"}}, {"model": "yaksh.testcase", "pk": 42, "fields": {"question": 33, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 43, "fields": {"question": 37, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 45, "fields": {"question": 40, "type": "standardtestcase"}}, {"model": "yaksh.testcase", "pk": 46, "fields": {"question": 27, "type": "stdiobasedtestcase"}}, {"model": "yaksh.testcase", "pk": 47, "fields": {"question": 27, "type": "mcqtestcase"}}, {"model": "yaksh.testcase", "pk": 48, "fields": {"question": 27, "type": "mcqtestcase"}}, {"model": "yaksh.testcase", "pk": 49, "fields": {"question": 32, "type": "stdiobasedtestcase"}}, {"model": "yaksh.testcase", "pk": 50, "fields": {"question": 37, "type": "mcqtestcase"}}, {"model": "yaksh.testcase", "pk": 51, "fields": {"question": 37, "type": "mcqtestcase"}}, {"model": "yaksh.standardtestcase", "pk": 5, "fields": {"test_case": "m = {\"a\", \",\", \"b\", \".\"}\r\nassert find_non_alpha(m) == {',', '.'}", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 6, "fields": {"test_case": "m = {\"1\", \"#\", \"c\", \"$\"}\r\nassert find_non_alpha(m) == {\"1\", \"#\", \"$\"}", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 7, "fields": {"test_case": "m = {\"1\", \"2\", \"3\"}\r\nassert find_non_alpha(m) == {\"1\", \"2\", \"3\"}", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 8, "fields": {"test_case": "m = {\"a\", \"1\", \"cde\"}\r\nassert find_non_alpha(m) == {\"1\"}", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 9, "fields": {"test_case": "m = {\"1\", \"%\"}\r\nassert find_non_alpha(m) == {\"1\", \"%\"}", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 10, "fields": {"test_case": "assert sort_list([(\"b\", 2), (\"a\", 2)]) == [(\"a\", 2), (\"b\", 2)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 11, "fields": {"test_case": "assert sort_list([(\"c\", 2), (\"d\", 3)]) == [(\"d\", 3), (\"c\", 2)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 12, "fields": {"test_case": "assert sort_list([(\"e\", 5), (\"f\", 3)]) == [(\"e\", 5), (\"f\", 3)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 13, "fields": {"test_case": "assert sort_list([(\"z\", 3), (\"y\", 4)]) == [(\"y\", 4), (\"z\", 3)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 14, "fields": {"test_case": "assert sort_list([(\"b\", 2), (\"a\", 2), (\"c\", 3)]) == [(\"c\", 3), (\"a\", 2), (\"b\", 2)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 15, "fields": {"test_case": "assert remove_non_alpha(\"ab$c\") == [(\"a\", 1), (\"b\", 1), (\"c\", 1)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 16, "fields": {"test_case": "assert remove_non_alpha(\"1234\") == [()]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 17, "fields": {"test_case": "assert remove_non_alpha(\"\") == [()]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 18, "fields": {"test_case": "assert remove_non_alpha(\"%aaaa^bb%\") == [(\"a\", 4), (\"b\", 2)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 19, "fields": {"test_case": "assert remove_non_alpha(\"1b2a3c\") == [(\"a\", 1), (\"b\", 1), (\"c\", 1)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 20, "fields": {"test_case": "assert remove_non_alpha(\"xxxyyyy\") == [(\"y\", 4), (\"x\", 3)]", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 25, "fields": {"test_case": "assert palin(121)==True", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 26, "fields": {"test_case": "", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 27, "fields": {"test_case": "", "weight": 0.0}}, {"model": "yaksh.standardtestcase", "pk": 30, "fields": {"test_case": "assert add(1,2) == 3", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 32, "fields": {"test_case": "assert add(1,2) == 3", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 34, "fields": {"test_case": "#include <stdio.h>\r\n#include <stdlib.h>\r\n\r\nextern int add(int, int);\r\n\r\ntemplate <class T>\r\n\r\nvoid check(T expect, T result)\r\n{\r\n if (expect == result)\r\n {\r\n printf(\"\\nCorrect:\\n Expected %d got %d \\n\",expect,result);\r\n }\r\n else \r\n {\r\n printf(\"\\nIncorrect:\\n Expected %d got %d \\n\",expect,result);\r\n exit (1);\r\n }\r\n}\r\n\r\nint main(void)\r\n{\r\n int result;\r\n result = add(0,0);\r\n printf(\"Input submitted to the function: 0, 0\");\r\n check(0, result);\r\n result = add(2,3);\r\n printf(\"Input submitted to the function: 2 3\");\r\n check(5,result);\r\n printf(\"All Correct\\n\");\r\n return 0;\r\n}", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 35, "fields": {"test_case": "assert add(1,2) == 3", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 37, "fields": {"test_case": "#include <stdio.h>\r\n#include <stdlib.h>\r\n\r\nextern int add(int, int, int);\r\n\r\ntemplate <class T>\r\nvoid check(T expect,T result)\r\n{\r\n if (expect == result)\r\n {\r\n\tprintf(\"\\nCorrect:\\n Expected %d got %d \\n\",expect,result);\r\n }\r\n else \r\n {\r\n\tprintf(\"\\nIncorrect:\\n Expected %d got %d \\n\",expect,result);\r\n\texit (1);\r\n }\r\n}\r\n\r\nint main(void)\r\n{\r\n\tint result;\r\n\tresult = add(0,0,0);\r\n printf(\"Input submitted to the function: 0, 0, 0\");\r\n\tcheck(0, result);\r\n\tresult = add(2,3,3);\r\n printf(\"Input submitted to the function: 2, 3, 3\");\r\n\tcheck(8,result);\r\n\tprintf(\"All Correct\\n\");\r\n}", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 39, "fields": {"test_case": "#!/bin/bash\r\ncat $1 | cut -d: -f2 | paste -d: $3 - $2", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 42, "fields": {"test_case": "scilab_files/test_add.sce", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 43, "fields": {"test_case": "#!/bin/bash\r\ncd $1\r\ncat $2", "weight": 1.0}}, {"model": "yaksh.standardtestcase", "pk": 45, "fields": {"test_case": "assert add(1,2) == 3", "weight": 1.0}}, {"model": "yaksh.stdiobasedtestcase", "pk": 29, "fields": {"expected_input": "1", "expected_output": "1", "weight": 0}}, {"model": "yaksh.stdiobasedtestcase", "pk": 31, "fields": {"expected_input": "", "expected_output": "10", "weight": 1}}, {"model": "yaksh.stdiobasedtestcase", "pk": 33, "fields": {"expected_input": "", "expected_output": "10", "weight": 1}}, {"model": "yaksh.stdiobasedtestcase", "pk": 41, "fields": {"expected_input": "12", "expected_output": "3", "weight": 1}}, {"model": "yaksh.stdiobasedtestcase", "pk": 46, "fields": {"expected_input": "1\r\n2", "expected_output": "3", "weight": 1}}, {"model": "yaksh.stdiobasedtestcase", "pk": 49, "fields": {"expected_input": "1\r\n2", "expected_output": "3", "weight": 1}}, {"model": "yaksh.mcqtestcase", "pk": 1, "fields": {"options": "main.c is removed.", "correct": false}}, {"model": "yaksh.mcqtestcase", "pk": 2, "fields": {"options": "clean file is removed.", "correct": false}}, {"model": "yaksh.mcqtestcase", "pk": 3, "fields": {"options": "make: 'clean' is up to date.", "correct": true}}, {"model": "yaksh.mcqtestcase", "pk": 4, "fields": {"options": "None of the above.", "correct": false}}, {"model": "yaksh.mcqtestcase", "pk": 21, "fields": {"options": "Should mock clean_tex.os.remove instead of os.remove", "correct": true}}, {"model": "yaksh.mcqtestcase", "pk": 22, "fields": {"options": "The test will fail always", "correct": true}}, {"model": "yaksh.mcqtestcase", "pk": 23, "fields": {"options": "The test will pass always", "correct": false}}, {"model": "yaksh.mcqtestcase", "pk": 24, "fields": {"options": "Should also mock \"os.path.exists\" in some form.", "correct": true}}, {"model": "yaksh.mcqtestcase", "pk": 47, "fields": {"options": "python", "correct": true}}, {"model": "yaksh.mcqtestcase", "pk": 48, "fields": {"options": "java", "correct": false}}, {"model": "yaksh.mcqtestcase", "pk": 50, "fields": {"options": "python", "correct": true}}, {"model": "yaksh.mcqtestcase", "pk": 51, "fields": {"options": "java", "correct": false}}, {"model": "admin.logentry", "pk": 1, "fields": {"action_time": "2016-11-30T09:46:14.954Z", "user": 1, "content_type": 3, "object_id": "1", "object_repr": "moderator", "action_flag": 1, "change_message": "Added."}}, {"model": "admin.logentry", "pk": 2, "fields": {"action_time": "2016-11-30T09:46:29.637Z", "user": 1, "content_type": 4, "object_id": "2", "object_repr": "teacher", "action_flag": 2, "change_message": "Changed groups."}}, {"model": "admin.logentry", "pk": 3, "fields": {"action_time": "2016-12-30T07:34:06.226Z", "user": 1, "content_type": 4, "object_id": "3", "object_repr": "teacher2", "action_flag": 2, "change_message": "Changed groups."}}]
\ No newline at end of file diff --git a/yaksh/models.py b/yaksh/models.py index 04bdd24..d2a85f6 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -231,7 +231,7 @@ class Question(models.Model): type = models.CharField(max_length=24, choices=question_types) # The type of evaluator - test_case_type = models.CharField(max_length=24, choices=test_case_types) + #test_case_type = models.CharField(max_length=24, choices=test_case_types) # Is this question active or not. If it is inactive it will not be used # when creating a QuestionPaper. diff --git a/yaksh/scripts/cli.py b/yaksh/scripts/cli.py index 79523f9..fa18ff7 100644 --- a/yaksh/scripts/cli.py +++ b/yaksh/scripts/cli.py @@ -1,5 +1,6 @@ from __future__ import print_function +import django import subprocess import contextlib import os @@ -8,7 +9,7 @@ import argparse from importlib import import_module from django.conf import settings from django.core import management -from django.template import Template, Context, loader +from django.template import Template, Context from project_detail import NAME, PATH @@ -17,6 +18,9 @@ SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) PARENT_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) TEMPLATE_DIR = path.join(PARENT_DIR, 'demo_templates') +settings.configure() +django.setup() + def main(): #Parse command-line to obtain the arguments and/or options # create top-level parser object @@ -95,7 +99,7 @@ def create_demo(project_name='yaksh_demo', project_dir=CUR_DIR): 'fixture_dir': fixture_dir}) urls_template_path = path.join(TEMPLATE_DIR, 'demo_urls.py') urls_target_path = path.join(project_path, 'demo_urls.py') - command = ("python ../manage.py syncdb " + command = ("python ../manage.py migrate --run-syncdb " "--noinput --settings={0}.demo_settings").format(project_name) loaddata_command = ("python ../manage.py loaddata " |