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> <Directory /var/www/tkupek_elearning>
Options +FollowSymLinks Options FollowSymLinks
<Files wsgi.py> <Files wsgi.py>
Order allow,deny Order allow,deny

View file

@ -1,4 +1,3 @@
# coding=utf-8
from __future__ import unicode_literals from __future__ import unicode_literals
import hashlib import hashlib
@ -79,7 +78,7 @@ class UserAnswer(models.Model):
correct = models.NullBooleanField(null=True) correct = models.NullBooleanField(null=True)
def __unicode__(self): def __unicode__(self):
return "" return str(self.user) + " - " + str(self.question.id)
class Meta: class Meta:
unique_together = (('user', 'question'),) unique_together = (('user', 'question'),)
@ -93,4 +92,4 @@ class UserAnswerOptions(models.Model):
unique_together = (('user_answer', 'option'),) unique_together = (('user_answer', 'option'),)
def __unicode__(self): 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 { p {
text-align: justify; text-align: justify;
} }
#showSolution { #showSolution {
display: block; display: block;
} }
p[id^="explanation_"] { p[id^="explanation_"] {
@ -15,48 +13,50 @@ p[id^="explanation_"] {
} }
.show { .show {
display: block; display: block;
} }
.hide { .hide {
display: none; display: none;
} }
.margin10 { .margin10 {
margin-top: 10px; margin-top: 10px;
} }
.margin25 { .margin25 {
margin-top: 25px; margin-top: 25px;
} }
.margin50 { .margin50 {
margin-top: 50px; margin-top: 50px;
} }
.margin75 { .margin75 {
margin-top: 75px; margin-top: 75px;
} }
.mainLogo { .mainLogo {
width: 300px; width: 300px;
height: auto; height: auto;
float: right; float: right;
} }
.message_already_answered { .message_already_answered {
font-style: italic; font-style: italic;
color: darkgreen;
} }
.table_headline { .table_headline {
font-weight: bold; font-weight: bold;
} }
.footer { .footer {
color: #b3b3b3 color: #b3b3b3
} }
.container { .container {
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
max-width: 800px; /* or 950px */ max-width: 800px; /* or 950px */
} }

View file

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

View file

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

View file

@ -34,4 +34,5 @@
</div> </div>
</body> </body>
</html> </html>

View file

@ -93,4 +93,5 @@
</div> </div>
</body> </body>
</html> </html>

View file

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