Commit f5d6f080 by kimth

Add basic styles

parent eac80378
...@@ -256,16 +256,16 @@ class CapaModule(XModule): ...@@ -256,16 +256,16 @@ class CapaModule(XModule):
seed=self.seed, system=self.system) seed=self.seed, system=self.system)
# Prepend a scary warning to the student # Prepend a scary warning to the student
warning = '<div class="capa_reset">' warning = '<div class="capa_reset">'\
warning += '<h2>Problem reset to initial state!</h2>' '<h2>Warning: Problem reset to initial state!</h2>'\
warning += '<p>Problem state was corruped by invalid submission. The submission consisted of:</p>' 'Problem state was corruped by invalid submission. The submission consisted of:'\
warning += '<ul>' '<ul>'
for student_answer in student_answers.values(): for student_answer in student_answers.values():
if student_answer != '': if student_answer != '':
warning += '<li>' + cgi.escape(student_answer) + '</li>' warning += '<li>' + cgi.escape(student_answer) + '</li>'
warning += '</ul>' warning += '</ul>'\
warning += '<p>If problem persists, please contact the course staff.</p>' 'If problem persists, please contact the course staff.'\
warning += '</div>' '</div>'
html = warning html = warning
try: try:
......
...@@ -465,6 +465,22 @@ section.problem { ...@@ -465,6 +465,22 @@ section.problem {
margin-top: 10px; margin-top: 10px;
} }
div.capa_reset {
padding: 25px;
border: 1px solid #EBE8BF;
border-radius: 3px;
background: #FFFCDD;
font-size: 1em;
margin-top: 10px;
margin-bottom: 10px;
}
.capa_reset>h2 {
color: #FF0000;
}
.capa_reset li {
font-size: 0.9em;
}
.hints { .hints {
border: 1px solid #ccc; border: 1px solid #ccc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment