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,13 +1,11 @@
body {
}
body {}
p {
text-align: justify;
text-align: justify;
}
#showSolution {
display: block;
display: block;
}
p[id^="explanation_"] {
@ -15,48 +13,50 @@ p[id^="explanation_"] {
}
.show {
display: block;
display: block;
}
.hide {
display: none;
display: none;
}
.margin10 {
margin-top: 10px;
margin-top: 10px;
}
.margin25 {
margin-top: 25px;
margin-top: 25px;
}
.margin50 {
margin-top: 50px;
margin-top: 50px;
}
.margin75 {
margin-top: 75px;
margin-top: 75px;
}
.mainLogo {
width: 300px;
height: auto;
float: right;
width: 300px;
height: auto;
float: right;
}
.message_already_answered {
font-style: italic;
font-style: italic;
color: darkgreen;
}
.table_headline {
font-weight: bold;
font-weight: bold;
}
.footer {
color: #b3b3b3
color: #b3b3b3
}
.container {
margin-right: auto;
margin-left: auto;
max-width: 800px; /* or 950px */
margin-right: auto;
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,
}