From 3bbaff2ebca026042cce3deb025effb9e83e0859 Mon Sep 17 00:00:00 2001 From: adityacp Date: Wed, 28 Feb 2018 16:54:22 +0530 Subject: Change forms.py, models.py, test_models.py and templates - Add help text for timezone field in user registration form - Add new method in course model to get days remaining to start a course - Show start time and end time of a course to the students - Disallow to enroll to a course which is not active - Add model test for the new course method --- yaksh/forms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'yaksh/forms.py') diff --git a/yaksh/forms.py b/yaksh/forms.py index 258a1ee..6b8d1c1 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -85,10 +85,12 @@ class UserRegisterForm(forms.Form): department = forms.CharField( max_length=64, help_text='Department you work/study at') position = forms.CharField( - max_length=64, help_text='Student/Faculty/Researcher/Industry/etc.') + max_length=64, + help_text='Student/Faculty/Researcher/Industry/Fellowship/etc.') timezone = forms.ChoiceField( choices=[(tz, tz) for tz in pytz.common_timezones], - initial=pytz.utc) + help_text='Course timings are shown based on the selected timezone', + initial=pytz.country_timezones['IN'][0]) def clean_username(self): u_name = self.cleaned_data["username"] -- cgit From 140b6c6a06269cc39eae192605f623c7818e9260 Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 16 Feb 2018 16:30:55 +0530 Subject: Add shuffle_testcases to QuestionPaper model instead of Question --- yaksh/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh/forms.py') diff --git a/yaksh/forms.py b/yaksh/forms.py index 258a1ee..e53eda3 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -308,7 +308,7 @@ class UploadFileForm(forms.Form): class QuestionPaperForm(forms.ModelForm): class Meta: model = QuestionPaper - fields = ['shuffle_questions'] + fields = ['shuffle_questions', 'shuffle_testcases'] class LessonForm(forms.ModelForm): -- cgit