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
This commit is contained in:
@@ -229,9 +229,11 @@ def instructor_dashboard(request, course_id):
|
||||
|
||||
if student_to_reset is not None:
|
||||
# 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:
|
||||
(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,
|
||||
course_id=course_id,
|
||||
module_state_key=module_state_key)
|
||||
|
||||
@@ -190,6 +190,7 @@ function goto( mode)
|
||||
<input type="submit" name="action" value="Export CSV file of grades for assignment">
|
||||
</li>
|
||||
</ul>
|
||||
<hr width="40%" style="align:left">
|
||||
|
||||
%endif
|
||||
|
||||
@@ -197,11 +198,13 @@ function goto( mode)
|
||||
<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>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:
|
||||
<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>
|
||||
<p>To delete the state of other XBlocks specify modulename/urlname, eg
|
||||
<tt>combinedopenended/Humanities_SA_Peer</tt></p>
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
Reference in New Issue
Block a user