Commit 7f121a3b by David Ormsbee

Merge pull request #611 from MITx/kimth/mark-graded

Tweaks to the LMS from 6.002x preparation
parents f0ef50ef ea4019c0
...@@ -726,7 +726,7 @@ class NumericalResponse(LoncapaResponse): ...@@ -726,7 +726,7 @@ class NumericalResponse(LoncapaResponse):
# I think this is just pyparsing.ParseException, calc.UndefinedVariable: # I think this is just pyparsing.ParseException, calc.UndefinedVariable:
# But we'd need to confirm # But we'd need to confirm
except: 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)) cgi.escape(student_answer))
if correct: if correct:
...@@ -920,6 +920,7 @@ def sympy_check2(): ...@@ -920,6 +920,7 @@ def sympy_check2():
print "oops in customresponse (code) error %s" % err print "oops in customresponse (code) error %s" % err
print "context = ", self.context print "context = ", self.context
print traceback.format_exc() 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 else: # self.code is not a string; assume its a function
# this is an interface to the Tutor2 check functions # this is an interface to the Tutor2 check functions
......
...@@ -87,6 +87,8 @@ class @Sequence ...@@ -87,6 +87,8 @@ class @Sequence
XModule.loadModules('display', @$('#seq_content')) XModule.loadModules('display', @$('#seq_content'))
MathJax.Hub.Queue(["Typeset", MathJax.Hub, "seq_content"]) # NOTE: Actually redundant. Some other MathJax call also being performed 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 @position = new_position
@toggleArrows() @toggleArrows()
@hookUpProgressEvent() @hookUpProgressEvent()
......
...@@ -62,7 +62,7 @@ def toc_for_course(user, request, course, active_chapter, active_section, course ...@@ -62,7 +62,7 @@ def toc_for_course(user, request, course, active_chapter, active_section, course
where SECTIONS is a list where SECTIONS is a list
[ {'display_name': name, 'url_name': url_name, [ {'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 active is set for the section and chapter corresponding to the passed
parameters, which are expected to be url_names of the chapter+section. 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 ...@@ -98,7 +98,9 @@ def toc_for_course(user, request, course, active_chapter, active_section, course
'url_name': section.url_name, 'url_name': section.url_name,
'format': section.metadata.get('format', ''), 'format': section.metadata.get('format', ''),
'due': section.metadata.get('due', ''), 'due': section.metadata.get('due', ''),
'active': active}) 'active': active,
'graded': section.metadata.get('graded', False),
})
chapters.append({'display_name': chapter.display_name, chapters.append({'display_name': chapter.display_name,
'url_name': chapter.url_name, 'url_name': chapter.url_name,
......
...@@ -180,6 +180,18 @@ section.course-index { ...@@ -180,6 +180,18 @@ section.course-index {
font-weight: normal; 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 @@ ...@@ -7,7 +7,7 @@
<ul> <ul>
% for section in chapter['sections']: % 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']])}"> <a href="${reverse('courseware_section', args=[course_id, chapter['url_name'], section['url_name']])}">
<p>${section['display_name']} <p>${section['display_name']}
<span class="subtitle"> <span class="subtitle">
......
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