summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2020-02-13 09:51:15 +0530
committeradityacp2020-02-13 09:51:15 +0530
commit20c8ebbd65f694bfbf18c229d7b3dfabf439fa3f (patch)
tree25b0f73c4f4628e9c67058794df5578c044f6e7c
parentd7a461639cd57fe78121375bd6730cacecbd63e5 (diff)
parent32f1d4dc7816bbb93f6dda77591eeb75c3f30c0d (diff)
downloadonline_test-20c8ebbd65f694bfbf18c229d7b3dfabf439fa3f.tar.gz
online_test-20c8ebbd65f694bfbf18c229d7b3dfabf439fa3f.tar.bz2
online_test-20c8ebbd65f694bfbf18c229d7b3dfabf439fa3f.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into revamp_ui
-rw-r--r--CHANGELOG.txt11
-rw-r--r--online_test/__init__.py2
-rw-r--r--yaksh/admin.py32
-rw-r--r--yaksh/migrations/0016_release_0_12_0.py20
-rw-r--r--yaksh/models.py5
-rw-r--r--yaksh/views.py4
6 files changed, 68 insertions, 6 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index dc80135..4145e07 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,14 @@
+=== 0.12.0 (04-02-2020) ===
+
+* Added syntax highlighting to the code answers in answerpaper
+* Added feature to allow adding newlines to Standard IO testcases
+* Added an evaluator to support R language
+* Fixed bug to only allow self created grading systems to show up in the course
+form
+* Fixed bug to hide deleted questions from search results
+* Fixed bug to check if residual files exist before teardown operations in
+JavaStdIOEvaluator
+
=== 0.11.0 (27-09-2019) ===
* Upgraded python-social-auth 0.2.19 to social-auth-app-django 3.1.0
diff --git a/online_test/__init__.py b/online_test/__init__.py
index f323a57..2c7bffb 100644
--- a/online_test/__init__.py
+++ b/online_test/__init__.py
@@ -1 +1 @@
-__version__ = '0.11.0'
+__version__ = '0.12.0'
diff --git a/yaksh/admin.py b/yaksh/admin.py
index 7ea8ed6..495b48d 100644
--- a/yaksh/admin.py
+++ b/yaksh/admin.py
@@ -1,6 +1,8 @@
from yaksh.models import Question, Quiz, QuestionPaper, Profile
from yaksh.models import (TestCase, StandardTestCase, StdIOBasedTestCase,
- Course, AnswerPaper)
+ Course, AnswerPaper, CourseStatus, LearningModule,
+ Lesson
+ )
from django.contrib import admin
@@ -14,12 +16,36 @@ class ProfileAdmin(admin.ModelAdmin):
"roll_number", "institute", "department"]
+class CourseStatusAdmin(admin.ModelAdmin):
+ search_fields = ['user__first_name', 'user__last_name', 'user__username']
+ list_filter = ['course__is_trial']
+
+
+class CourseAdmin(admin.ModelAdmin):
+ list_filter = ['active', 'is_trial']
+
+
+class LearningModuleAdmin(admin.ModelAdmin):
+ list_filter = ['active', 'is_trial']
+
+
+class LessonAdmin(admin.ModelAdmin):
+ list_filter = ['active']
+
+
+class QuizAdmin(admin.ModelAdmin):
+ list_filter = ['active', 'is_trial']
+
+
admin.site.register(Profile, ProfileAdmin)
admin.site.register(Question)
admin.site.register(TestCase)
admin.site.register(StandardTestCase)
admin.site.register(StdIOBasedTestCase)
-admin.site.register(Course)
-admin.site.register(Quiz)
+admin.site.register(Course, CourseAdmin)
+admin.site.register(Quiz, QuizAdmin)
admin.site.register(QuestionPaper)
admin.site.register(AnswerPaper, AnswerPaperAdmin)
+admin.site.register(CourseStatus, CourseStatusAdmin)
+admin.site.register(Lesson, LessonAdmin)
+admin.site.register(LearningModule, LearningModuleAdmin)
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/models.py b/yaksh/models.py
index d1b53e7..efd4fd7 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -1162,6 +1162,11 @@ class CourseStatus(models.Model):
self.current_unit = unit
self.save()
+ def __str__(self):
+ return "{0} status for {1}".format(
+ self.course.name, self.user.username
+ )
+
###############################################################################
class ConcurrentUser(models.Model):
diff --git a/yaksh/views.py b/yaksh/views.py
index 28515fd..6a0794f 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -1358,12 +1358,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