From d67f271d5e1b8eb3fc45a8a2e8762d054fffc02f Mon Sep 17 00:00:00 2001 From: manojvaghela Date: Fri, 24 Jan 2020 16:42:27 +0530 Subject: deleted question now does not reflect in search --- yaksh/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- cgit From 5c4f432bd004364fc5114912730786f0536cde9a Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 4 Feb 2020 16:43:46 +0530 Subject: Release 0.12.0 related changes --- CHANGELOG.txt | 11 +++++++++++ online_test/__init__.py | 2 +- yaksh/migrations/0016_release_0_12_0.py | 20 ++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 yaksh/migrations/0016_release_0_12_0.py 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/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), + ), + ] -- cgit From f9eb4681807c56b9dd67ed370e032e77f9219bf2 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 10 Feb 2020 17:04:35 +0530 Subject: Change models.py and admin.py - Register course status model in admin - Add object str name in CourseStatus model - Add filter in the admin for filtering courses --- yaksh/admin.py | 14 ++++++++++++-- yaksh/models.py | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/yaksh/admin.py b/yaksh/admin.py index 7ea8ed6..8944722 100644 --- a/yaksh/admin.py +++ b/yaksh/admin.py @@ -1,6 +1,6 @@ from yaksh.models import Question, Quiz, QuestionPaper, Profile from yaksh.models import (TestCase, StandardTestCase, StdIOBasedTestCase, - Course, AnswerPaper) + Course, AnswerPaper, CourseStatus) from django.contrib import admin @@ -14,12 +14,22 @@ 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'] + + 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(Course, CourseAdmin) admin.site.register(Quiz) admin.site.register(QuestionPaper) admin.site.register(AnswerPaper, AnswerPaperAdmin) +admin.site.register(CourseStatus, CourseStatusAdmin) \ No newline at end of file diff --git a/yaksh/models.py b/yaksh/models.py index 6edb9ea..d453f81 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1161,6 +1161,9 @@ 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): -- cgit From 6c7325350471bcf7437fcc7f08debe19bd0365eb Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 10 Feb 2020 17:10:22 +0530 Subject: Fix pep8 issues --- yaksh/admin.py | 4 ++-- yaksh/models.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/yaksh/admin.py b/yaksh/admin.py index 8944722..efbeb7f 100644 --- a/yaksh/admin.py +++ b/yaksh/admin.py @@ -20,7 +20,7 @@ class CourseStatusAdmin(admin.ModelAdmin): class CourseAdmin(admin.ModelAdmin): - list_filter = ['active', 'is_trial'] + list_filter = ['active', 'is_trial'] admin.site.register(Profile, ProfileAdmin) @@ -32,4 +32,4 @@ admin.site.register(Course, CourseAdmin) admin.site.register(Quiz) admin.site.register(QuestionPaper) admin.site.register(AnswerPaper, AnswerPaperAdmin) -admin.site.register(CourseStatus, CourseStatusAdmin) \ No newline at end of file +admin.site.register(CourseStatus, CourseStatusAdmin) diff --git a/yaksh/models.py b/yaksh/models.py index d453f81..df37b26 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1162,7 +1162,9 @@ class CourseStatus(models.Model): self.save() def __str__(self): - return "{0} status for {1}".format(self.course.name, self.user.username) + return "{0} status for {1}".format( + self.course.name, self.user.username + ) ############################################################################### -- cgit From 36f890621989e77663b52a46cdef45086fb9fa1d Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 11 Feb 2020 10:22:25 +0530 Subject: Register lesson and learning module in admin --- yaksh/admin.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/yaksh/admin.py b/yaksh/admin.py index efbeb7f..3d09f69 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, CourseStatus) + Course, AnswerPaper, CourseStatus, LearningModule, + Lesson + ) from django.contrib import admin @@ -23,13 +25,27 @@ 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, CourseAdmin) -admin.site.register(Quiz) +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) -- cgit From f20a8da0c4c29398297d02fbeb2f9868cddae7a3 Mon Sep 17 00:00:00 2001 From: adityacp Date: Wed, 12 Feb 2020 16:14:23 +0530 Subject: Fix indentation --- yaksh/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaksh/admin.py b/yaksh/admin.py index 3d09f69..495b48d 100644 --- a/yaksh/admin.py +++ b/yaksh/admin.py @@ -34,7 +34,7 @@ class LessonAdmin(admin.ModelAdmin): class QuizAdmin(admin.ModelAdmin): - list_filter = ['active', 'is_trial'] + list_filter = ['active', 'is_trial'] admin.site.register(Profile, ProfileAdmin) -- cgit