Commit c5869c76 by Victor Shnayder

Merge pull request #1782 from MITx/feature/ichuang/allow-reset-of-openended-problems

allow student state of module other than problem to be reset by instructor
parents ac180ca2 5477d643
...@@ -229,9 +229,11 @@ def instructor_dashboard(request, course_id): ...@@ -229,9 +229,11 @@ def instructor_dashboard(request, course_id):
if student_to_reset is not None: if student_to_reset is not None:
# find the module in question # find the module in question
if '/' not in problem_to_reset: # allow state of modules other than problem to be reset
problem_to_reset = "problem/" + problem_to_reset # but problem is the default
try: try:
(org, course_name, run) = course_id.split("/") (org, course_name, run) = course_id.split("/")
module_state_key = "i4x://" + org + "/" + course_name + "/problem/" + problem_to_reset module_state_key = "i4x://" + org + "/" + course_name + "/" + problem_to_reset
module_to_reset = StudentModule.objects.get(student_id=student_to_reset.id, module_to_reset = StudentModule.objects.get(student_id=student_to_reset.id,
course_id=course_id, course_id=course_id,
module_state_key=module_state_key) module_state_key=module_state_key)
......
...@@ -190,6 +190,7 @@ function goto( mode) ...@@ -190,6 +190,7 @@ function goto( mode)
<input type="submit" name="action" value="Export CSV file of grades for assignment"> <input type="submit" name="action" value="Export CSV file of grades for assignment">
</li> </li>
</ul> </ul>
<hr width="40%" style="align:left">
%endif %endif
...@@ -197,11 +198,13 @@ function goto( mode) ...@@ -197,11 +198,13 @@ function goto( mode)
<p>edX email address or their username: </p> <p>edX email address or their username: </p>
<p><input type="text" name="unique_student_identifier"> <input type="submit" name="action" value="Get link to student's progress page"></p> <p><input type="text" name="unique_student_identifier"> <input type="submit" name="action" value="Get link to student's progress page"></p>
<p>and, if you want to reset the number of attempts for a problem, the urlname of that problem</p> <p>and, if you want to reset the number of attempts for a problem, the urlname of that problem</p>
<p> <input type="text" name="problem_to_reset"> <input type="submit" name="action" value="Reset student's attempts"> </p> <p> <input type="text" name="problem_to_reset" size="60"> <input type="submit" name="action" value="Reset student's attempts"> </p>
%if instructor_access: %if instructor_access:
<p> You may also delete the entire state of a student for a problem: <p> You may also delete the entire state of a student for a problem:
<input type="submit" name="action" value="Delete student state for problem"> </p> <input type="submit" name="action" value="Delete student state for problem"> </p>
<p>To delete the state of other XBlocks specify modulename/urlname, eg
<tt>combinedopenended/Humanities_SA_Peer</tt></p>
%endif %endif
%endif %endif
......
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