diff options
-rw-r--r-- | yaksh/admin.py | 6 | ||||
-rw-r--r-- | yaksh/models.py | 3 | ||||
-rw-r--r-- | yaksh/templates/yaksh/login.html | 8 | ||||
-rw-r--r-- | yaksh/templates/yaksh/moderator_dashboard.html | 2 |
4 files changed, 17 insertions, 2 deletions
diff --git a/yaksh/admin.py b/yaksh/admin.py index 79d4930..199fb56 100644 --- a/yaksh/admin.py +++ b/yaksh/admin.py @@ -1,4 +1,4 @@ -from yaksh.models import Question, Quiz, QuestionPaper +from yaksh.models import Question, Quiz, QuestionPaper, Profile from yaksh.models import TestCase, StandardTestCase, StdIOBasedTestCase, Course, AnswerPaper from django.contrib import admin @@ -8,7 +8,11 @@ class AnswerPaperAdmin(admin.ModelAdmin): search_fields = ['user__first_name', 'user__last_name','user__username', "question_paper__quiz__description","user_ip" ] +class ProfileAdmin(admin.ModelAdmin): + search_fields = ['user__first_name', 'user__last_name','user__username', + "roll_number", "institute","department"] +admin.site.register(Profile, ProfileAdmin) admin.site.register(Question) admin.site.register(TestCase) admin.site.register(StandardTestCase) diff --git a/yaksh/models.py b/yaksh/models.py index 2fa34e4..87e6260 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -306,6 +306,9 @@ class Profile(models.Model): os.chmod(user_dir, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) return user_dir + def __str__(self): + return '%s' % (self.user.get_full_name()) + ############################################################################### class Question(models.Model): diff --git a/yaksh/templates/yaksh/login.html b/yaksh/templates/yaksh/login.html index e4b5933..f40b12f 100644 --- a/yaksh/templates/yaksh/login.html +++ b/yaksh/templates/yaksh/login.html @@ -36,6 +36,14 @@ <li>Scales to over 500+ simultaneous users.</li> </ul> </p> + <br/> + <p><b>Fork us at:</b> + <a class = "btn btn-social-icon btn-github" + href ="https://github.com/fossee/online_test"> + + <span class="fa fa-github" style="font-size:48px"></span> + </p> + </a> </div> </div> diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html index faccffe..c61675d 100644 --- a/yaksh/templates/yaksh/moderator_dashboard.html +++ b/yaksh/templates/yaksh/moderator_dashboard.html @@ -20,7 +20,7 @@ {{ paper.quiz.course.name }} </td> <td> - <a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.id}}/">{{ paper.quiz.description }}</a> + <a href="{{URL_ROOT}}/exam/manage/monitor/{{ paper.quiz.id }}/">{{ paper.quiz.description }}</a> </td> <td> {{ answer_papers|length }} user(s) |