Merge pull request #611 from MITx/kimth/mark-graded
Tweaks to the LMS from 6.002x preparation
This commit is contained in:
@@ -726,7 +726,7 @@ class NumericalResponse(LoncapaResponse):
|
||||
# I think this is just pyparsing.ParseException, calc.UndefinedVariable:
|
||||
# But we'd need to confirm
|
||||
except:
|
||||
raise StudentInputError("Invalid input: could not parse '%s' as a number" %\
|
||||
raise StudentInputError("Invalid input: could not interpret '%s' as a number" %\
|
||||
cgi.escape(student_answer))
|
||||
|
||||
if correct:
|
||||
@@ -920,6 +920,7 @@ def sympy_check2():
|
||||
print "oops in customresponse (code) error %s" % err
|
||||
print "context = ", self.context
|
||||
print traceback.format_exc()
|
||||
raise StudentInputError("Error: Problem could not be evaluated with your input") # Notify student
|
||||
else: # self.code is not a string; assume its a function
|
||||
|
||||
# this is an interface to the Tutor2 check functions
|
||||
|
||||
@@ -87,6 +87,8 @@ class @Sequence
|
||||
XModule.loadModules('display', @$('#seq_content'))
|
||||
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, "seq_content"]) # NOTE: Actually redundant. Some other MathJax call also being performed
|
||||
window.update_schematics() # For embedded circuit simulator exercises in 6.002x
|
||||
|
||||
@position = new_position
|
||||
@toggleArrows()
|
||||
@hookUpProgressEvent()
|
||||
|
||||
@@ -62,7 +62,7 @@ def toc_for_course(user, request, course, active_chapter, active_section, course
|
||||
|
||||
where SECTIONS is a list
|
||||
[ {'display_name': name, 'url_name': url_name,
|
||||
'format': format, 'due': due, 'active' : bool}, ...]
|
||||
'format': format, 'due': due, 'active' : bool, 'graded': bool}, ...]
|
||||
|
||||
active is set for the section and chapter corresponding to the passed
|
||||
parameters, which are expected to be url_names of the chapter+section.
|
||||
@@ -98,7 +98,9 @@ def toc_for_course(user, request, course, active_chapter, active_section, course
|
||||
'url_name': section.url_name,
|
||||
'format': section.metadata.get('format', ''),
|
||||
'due': section.metadata.get('due', ''),
|
||||
'active': active})
|
||||
'active': active,
|
||||
'graded': section.metadata.get('graded', False),
|
||||
})
|
||||
|
||||
chapters.append({'display_name': chapter.display_name,
|
||||
'url_name': chapter.url_name,
|
||||
|
||||
BIN
lms/static/images/graded.png
Normal file
BIN
lms/static/images/graded.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 571 B |
@@ -180,6 +180,18 @@ section.course-index {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
&.graded {
|
||||
> a {
|
||||
background-image: url('../images/graded.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: 97% center;
|
||||
}
|
||||
|
||||
&.active > a {
|
||||
@include background-image(url('../images/graded.png'), linear-gradient(top, #e6e6e6, #d6d6d6));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<ul>
|
||||
% for section in chapter['sections']:
|
||||
<li${' class="active"' if 'active' in section and section['active'] else ''}>
|
||||
<li class="${'active' if 'active' in section and section['active'] else ''} ${'graded' if 'graded' in section and section['graded'] else ''}">
|
||||
<a href="${reverse('courseware_section', args=[course_id, chapter['url_name'], section['url_name']])}">
|
||||
<p>${section['display_name']}
|
||||
<span class="subtitle">
|
||||
|
||||
Reference in New Issue
Block a user