Commit 90cd57f6 by pmitros

Merge pull request #12 from MITx/check_button

Number of attempts remaining shown below -- not on button. 
parents 68c47236 a018b614
...@@ -73,7 +73,9 @@ class Module(XModule): ...@@ -73,7 +73,9 @@ class Module(XModule):
content={'name':self.name, content={'name':self.name,
'html':html} 'html':html}
check_button = True # We using strings as truthy values, because the terminology of the check button
# is context-specific.
check_button = "Grade" if self.max_attempts else "Check"
reset_button = True reset_button = True
save_button = True save_button = True
...@@ -96,10 +98,6 @@ class Module(XModule): ...@@ -96,10 +98,6 @@ class Module(XModule):
if not self.lcp.done: if not self.lcp.done:
reset_button = False reset_button = False
attempts_str = ""
if self.max_attempts != None:
attempts_str = " ({a}/{m})".format(a=self.attempts, m=self.max_attempts)
# We don't need a "save" button if infinite number of attempts and non-randomized # We don't need a "save" button if infinite number of attempts and non-randomized
if self.max_attempts == None and self.rerandomize != "always": if self.max_attempts == None and self.rerandomize != "always":
save_button = False save_button = False
...@@ -122,7 +120,8 @@ class Module(XModule): ...@@ -122,7 +120,8 @@ class Module(XModule):
'save_button' : save_button, 'save_button' : save_button,
'answer_available' : self.answer_available(), 'answer_available' : self.answer_available(),
'ajax_url' : self.ajax_url, 'ajax_url' : self.ajax_url,
'attempts': attempts_str, 'attempts_used': self.attempts,
'attempts_allowed': self.max_attempts,
'explain': explain 'explain': explain
}) })
if encapsulate: if encapsulate:
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
<!--[if lte IE 8]> <!--[if lte IE 8]>
<p class="ie-warning"> Enrollment requires a modern web browser with JavaScript enabled. You don't have this. You can&rsquo;t enroll without upgrading, since you couldn&rsquo;t take the course without upgrading. Feel free to download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Mozilla Firefox</a> or <a href="http://support.google.com/chrome/bin/answer.py?hl=en&answer=95346">Google Chrome</a>, for free, to enroll and take this course.</p> <p class="ie-warning"> Enrollment requires a modern web browser with JavaScript enabled. You don't have this. You can&rsquo;t enroll without upgrading, since you couldn&rsquo;t take the course without upgrading. Feel free to download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Mozilla Firefox</a> or <a href="http://support.google.com/chrome/bin/answer.py?hl=en&answer=95346">Google Chrome</a>, for free, to enroll and take this course.</p>
<![endif]--> <![endif]-->
<p class="disclaimer">
Please note that 6.002x has already started.
Several assignment due dates for 6.002x have already passed. It is now impossible for newly enrolled students to get 100% of the points in the course, although new students can still earn points for assignments whose due dates have not passed, and students have access to all of the course material that has been released for the course.
</p>
<form name="enroll" id="enroll_form" method="get"> <form name="enroll" id="enroll_form" method="get">
<fieldset><% if 'error' in locals(): e = error %> <fieldset><% if 'error' in locals(): e = error %>
...@@ -69,5 +72,5 @@ ...@@ -69,5 +72,5 @@
</ol> </ol>
<input name="create_account_button" id="create_account_button" type="submit" value="Create Account"> <input name="create_account_button" id="create_account_button" type="submit" value="Create Account">
</fieldset> </form> </fieldset> </form>
</div> </div>
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<input type="hidden" name="problem_id" value="${ problem['name'] }"> <input type="hidden" name="problem_id" value="${ problem['name'] }">
% if check_button: % if check_button:
<input id="check_${ id }" type="button" value="Check ${ attempts }" > <input id="check_${ id }" type="button" value="${ check_button }" >
% endif % endif
% if reset_button: % if reset_button:
<input id="reset_${ id }" type="button" value="Reset ${ attempts }" > <input id="reset_${ id }" type="button" value="Reset" >
% endif % endif
% if save_button: % if save_button:
<input id="save_${ id }" type="button" value="Save" > <input id="save_${ id }" type="button" value="Save" >
...@@ -21,5 +21,10 @@ ...@@ -21,5 +21,10 @@
% if explain : % if explain :
<a href="/courseware/6.002_Spring_2012/${ explain }" class="new-page">Explanation</a> <a href="/courseware/6.002_Spring_2012/${ explain }" class="new-page">Explanation</a>
% endif % endif
% if attempts_allowed :
<section class="submission_feedback">
You have used ${ attempts_used } of ${ attempts_allowed } submissions
</section>
% endif
</section> </section>
</section> </section>
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