summaryrefslogtreecommitdiff
path: root/testapp/exam
diff options
context:
space:
mode:
authorPrabhu Ramachandran2015-03-01 10:31:18 +0530
committerPrabhu Ramachandran2015-03-01 10:31:18 +0530
commit997a7907a13b394e5ca69fadf17f5bb4d5445536 (patch)
tree4950c79bca8c99f8f83e20d314d3845aeff87423 /testapp/exam
parent265ad4d17f481e30a84350e8eb96e72c8cedef6b (diff)
parent2c6aa7e1ec058453ce8c559fce26b3ee05d99cae (diff)
downloadonline_test-997a7907a13b394e5ca69fadf17f5bb4d5445536.tar.gz
online_test-997a7907a13b394e5ca69fadf17f5bb4d5445536.tar.bz2
online_test-997a7907a13b394e5ca69fadf17f5bb4d5445536.zip
Merge pull request #36 from prathamesh920/app_package
App package
Diffstat (limited to 'testapp/exam')
-rw-r--r--testapp/exam/admin.py2
-rw-r--r--testapp/exam/forms.py2
-rw-r--r--testapp/exam/management/commands/dump_user_data.py4
-rw-r--r--testapp/exam/management/commands/load_exam.py2
-rw-r--r--testapp/exam/management/commands/load_questions_xml.py2
-rw-r--r--testapp/exam/management/commands/results2csv.py2
-rw-r--r--testapp/exam/models.py2
-rw-r--r--testapp/exam/templates/exam/design_questionpaper.html2
-rw-r--r--testapp/exam/urls.py2
-rw-r--r--testapp/exam/views.py8
10 files changed, 14 insertions, 14 deletions
diff --git a/testapp/exam/admin.py b/testapp/exam/admin.py
index 8482ef9..060859a 100644
--- a/testapp/exam/admin.py
+++ b/testapp/exam/admin.py
@@ -1,4 +1,4 @@
-from exam.models import Question, Quiz
+from testapp.exam.models import Question, Quiz
from django.contrib import admin
admin.site.register(Question)
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py
index 9bfedbe..f04fdb3 100644
--- a/testapp/exam/forms.py
+++ b/testapp/exam/forms.py
@@ -1,5 +1,5 @@
from django import forms
-from exam.models import Profile, Quiz, Question
+from testapp.exam.models import Profile, Quiz, Question
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
diff --git a/testapp/exam/management/commands/dump_user_data.py b/testapp/exam/management/commands/dump_user_data.py
index ec016bb..c5537e5 100644
--- a/testapp/exam/management/commands/dump_user_data.py
+++ b/testapp/exam/management/commands/dump_user_data.py
@@ -5,8 +5,8 @@ from django.core.management.base import BaseCommand
from django.template import Template, Context
# Local imports.
-from exam.views import get_user_data
-from exam.models import User
+from testapp.exam.views import get_user_data
+from testapp.exam.models import User
data_template = Template('''\
===============================================================================
diff --git a/testapp/exam/management/commands/load_exam.py b/testapp/exam/management/commands/load_exam.py
index e3f72da..c4a34a3 100644
--- a/testapp/exam/management/commands/load_exam.py
+++ b/testapp/exam/management/commands/load_exam.py
@@ -5,7 +5,7 @@ from os.path import basename
from django.core.management.base import BaseCommand
# Local imports.
-from exam.models import Question, Quiz
+from testapp.exam.models import Question, Quiz
def clear_exam():
"""Deactivate all questions from the database."""
diff --git a/testapp/exam/management/commands/load_questions_xml.py b/testapp/exam/management/commands/load_questions_xml.py
index 8bc2701..3e13ae1 100644
--- a/testapp/exam/management/commands/load_questions_xml.py
+++ b/testapp/exam/management/commands/load_questions_xml.py
@@ -8,7 +8,7 @@ import re
from django.core.management.base import BaseCommand
# Local imports.
-from exam.models import Question
+from testapp.exam.models import Question
def decode_html(html_str):
"""Un-escape or decode HTML strings to more usable Python strings.
diff --git a/testapp/exam/management/commands/results2csv.py b/testapp/exam/management/commands/results2csv.py
index 2993745..1cdf8e3 100644
--- a/testapp/exam/management/commands/results2csv.py
+++ b/testapp/exam/management/commands/results2csv.py
@@ -7,7 +7,7 @@ from django.core.management.base import BaseCommand
from django.template import Template, Context
# Local imports.
-from exam.models import Quiz, QuestionPaper
+from testapp.exam.models import Quiz, QuestionPaper
result_template = Template('''\
"name","username","rollno","email","answered","total","attempts","position",\
diff --git a/testapp/exam/models.py b/testapp/exam/models.py
index 4d82783..196ee73 100644
--- a/testapp/exam/models.py
+++ b/testapp/exam/models.py
@@ -304,7 +304,7 @@ class AnswerPaper(models.Model):
def time_left(self):
"""Return the time remaining for the user in seconds."""
- dt = datetime.datetime.now() - self.start_time
+ dt = datetime.datetime.now() - self.start_time.replace(tzinfo=None)
try:
secs = dt.total_seconds()
except AttributeError:
diff --git a/testapp/exam/templates/exam/design_questionpaper.html b/testapp/exam/templates/exam/design_questionpaper.html
index 8994148..33c8b8f 100644
--- a/testapp/exam/templates/exam/design_questionpaper.html
+++ b/testapp/exam/templates/exam/design_questionpaper.html
@@ -165,7 +165,7 @@ select
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Cannot Save</h4>
</div>
- <div id = "modal_body"class="modal-body">
+ <div class="modal-body">
Please select questions for your paper
</div>
<div class="modal-footer">
diff --git a/testapp/exam/urls.py b/testapp/exam/urls.py
index 37a031d..f8a6cb8 100644
--- a/testapp/exam/urls.py
+++ b/testapp/exam/urls.py
@@ -1,6 +1,6 @@
from django.conf.urls import patterns, include, url
-urlpatterns = patterns('exam.views',
+urlpatterns = patterns('testapp.exam.views',
url(r'^$', 'index'),
url(r'^login/$', 'user_login'),
url(r'^quizzes/$','quizlist_user'),
diff --git a/testapp/exam/views.py b/testapp/exam/views.py
index 7c9af6c..60dc01d 100644
--- a/testapp/exam/views.py
+++ b/testapp/exam/views.py
@@ -15,11 +15,11 @@ from django.views.decorators.csrf import csrf_exempt
from taggit.models import Tag
from itertools import chain
# Local imports.
-from exam.models import Quiz, Question, QuestionPaper, QuestionSet
-from exam.models import Profile, Answer, AnswerPaper, User
-from exam.forms import UserRegisterForm, UserLoginForm, QuizForm,\
+from testapp.exam.models import Quiz, Question, QuestionPaper, QuestionSet
+from testapp.exam.models import Profile, Answer, AnswerPaper, User
+from testapp.exam.forms import UserRegisterForm, UserLoginForm, QuizForm,\
QuestionForm, RandomQuestionForm
-from exam.xmlrpc_clients import code_server
+from testapp.exam.xmlrpc_clients import code_server
from settings import URL_ROOT
# The directory where user data can be saved.