summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/java_stdio_evaluator.py3
-rw-r--r--yaksh/migrations/0016_release_0_12_0.py20
-rw-r--r--yaksh/views.py4
3 files changed, 24 insertions, 3 deletions
diff --git a/yaksh/java_stdio_evaluator.py b/yaksh/java_stdio_evaluator.py
index 89f9fc4..0d7e480 100644
--- a/yaksh/java_stdio_evaluator.py
+++ b/yaksh/java_stdio_evaluator.py
@@ -26,7 +26,8 @@ class JavaStdIOEvaluator(StdIOEvaluator):
self.weight = test_case_data.get('weight')
def teardown(self):
- os.remove(self.submit_code_path)
+ if os.path.exists(self.submit_code_path):
+ os.remove(self.submit_code_path)
if self.files:
delete_files(self.files)
diff --git a/yaksh/migrations/0016_release_0_12_0.py b/yaksh/migrations/0016_release_0_12_0.py
new file mode 100644
index 0000000..74edaa5
--- /dev/null
+++ b/yaksh/migrations/0016_release_0_12_0.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.21 on 2020-02-05 05:38
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('yaksh', '0015_release_0_10_0'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='question',
+ name='language',
+ field=models.CharField(choices=[('python', 'Python'), ('bash', 'Bash'), ('c', 'C Language'), ('cpp', 'C++ Language'), ('java', 'Java Language'), ('scilab', 'Scilab'), ('r', 'R')], max_length=24),
+ ),
+ ]
diff --git a/yaksh/views.py b/yaksh/views.py
index c0317d9..0b24bcf 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -1324,12 +1324,12 @@ def _remove_already_present(questionpaper_id, questions):
return questions
-def _get_questions_from_tags(question_tags, user):
+def _get_questions_from_tags(question_tags, user, active=True):
search_tags = []
for tags in question_tags:
search_tags.extend(re.split('[; |, |\*|\n]', tags))
return Question.objects.filter(tags__name__in=search_tags,
- user=user).distinct()
+ user=user, active=active).distinct()
@login_required