From cac7f8a289fb1e91a4244850845b150580559a38 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 31 Mar 2013 16:44:43 +0000 Subject: [PATCH 1/2] allow student state of module other than problem to be reset by instructor this makes it possible to reset open ended response problems --- lms/djangoapps/instructor/views.py | 4 +++- lms/templates/courseware/instructor_dashboard.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/instructor/views.py b/lms/djangoapps/instructor/views.py index 671283db9f..b1a62a5039 100644 --- a/lms/djangoapps/instructor/views.py +++ b/lms/djangoapps/instructor/views.py @@ -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) diff --git a/lms/templates/courseware/instructor_dashboard.html b/lms/templates/courseware/instructor_dashboard.html index 23329c837d..8eaf6cb1dd 100644 --- a/lms/templates/courseware/instructor_dashboard.html +++ b/lms/templates/courseware/instructor_dashboard.html @@ -197,7 +197,7 @@ function goto( mode)

edX email address or their username:

and, if you want to reset the number of attempts for a problem, the urlname of that problem

-

+

%if instructor_access:

You may also delete the entire state of a student for a problem: From 5477d6430a5b43a0e3ee3a1dc6963c463049b3b1 Mon Sep 17 00:00:00 2001 From: ichuang Date: Mon, 1 Apr 2013 19:59:20 +0000 Subject: [PATCH 2/2] add instructions to idashboard for deleting state of non-problem xblocks --- lms/templates/courseware/instructor_dashboard.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lms/templates/courseware/instructor_dashboard.html b/lms/templates/courseware/instructor_dashboard.html index 8eaf6cb1dd..1931a80fce 100644 --- a/lms/templates/courseware/instructor_dashboard.html +++ b/lms/templates/courseware/instructor_dashboard.html @@ -190,6 +190,7 @@ function goto( mode) +


%endif @@ -202,6 +203,8 @@ function goto( mode) %if instructor_access:

You may also delete the entire state of a student for a problem:

+

To delete the state of other XBlocks specify modulename/urlname, eg + combinedopenended/Humanities_SA_Peer

%endif %endif