Merge remote-tracking branch 'origin/master'

Conflicts:
	tkupek_elearning/elearning/models.py
This commit is contained in:
tkupek 2016-03-19 19:18:22 +01:00
commit e1d365f408
8 changed files with 42 additions and 32 deletions

View file

@ -11,7 +11,7 @@ Alias /static/ /var/www/tkupek_elearning/elearning/static/
<Directory /var/www/tkupek_elearning>
Options +FollowSymLinks
Options FollowSymLinks
<Files wsgi.py>
Order allow,deny

View file

@ -1,4 +1,3 @@
# coding=utf-8
from __future__ import unicode_literals
import hashlib
@ -79,7 +78,7 @@ class UserAnswer(models.Model):
correct = models.NullBooleanField(null=True)
def __unicode__(self):
return ""
return str(self.user) + " - " + str(self.question.id)
class Meta:
unique_together = (('user', 'question'),)
@ -93,4 +92,4 @@ class UserAnswerOptions(models.Model):
unique_together = (('user_answer', 'option'),)
def __unicode__(self):
return unicode(str(self.user_answer) + " - " + str(self.option), "utf-8")
return str(self.user_answer) + " - " + str(self.option)

View file

@ -1,9 +1,7 @@
body {
}
body {}
p {
text-align: justify;
text-align: justify;
}
#showSolution {
@ -46,6 +44,7 @@ p[id^="explanation_"] {
.message_already_answered {
font-style: italic;
color: darkgreen;
}
.table_headline {
@ -60,3 +59,4 @@ p[id^="explanation_"] {
margin-left: auto;
max-width: 800px; /* or 950px */
}

View file

@ -24,9 +24,10 @@
<img src="{{ settings.logo }}" class="mainLogo">
<h1>{{ settings.title }}</h1>
<hr/>
<p>{{ settings.message_access_denied }}</p>
<p>{{ settings.message_access_denied|safe }}</p>
</div>
</body>
</html>

View file

@ -77,7 +77,7 @@
</ul>
<p id="enable-{{ question.id }}" data-value="{{ question.enable }}" data-questionId= "{{ question.id }}" class="message_already_answered hide">
{{ settings.message_already_answered }}
{{ settings.message_already_answered|safe }}
</p>
<div class="container">
@ -95,10 +95,11 @@
<div class="margin50" ></div>
<hr/>
{{ settings.footer }}
{{ settings.footer|safe }}
</div>
<script type="text/javascript" src="{% static 'js/elearning.js' %}"></script>
</body>
</html>

View file

@ -35,3 +35,4 @@
</body>
</html>

View file

@ -94,3 +94,4 @@
</body>
</html>

View file

@ -118,3 +118,10 @@ USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = '/var/www/tkupek_elearning/elearning/static/'
# TinyMCE settings
TINYMCE_DEFAULT_CONFIG = {
'theme': "simple",
'custom_undo_redo_levels': 20,
'width': 500,
}