Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
9b6e053f
Commit
9b6e053f
authored
Jul 28, 2014
by
Justin Riley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
report success/failure in proctor admin reset form
parent
3c07eed7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
common/lib/xmodule/xmodule/proctor_module.py
+6
-3
lms/templates/proctor.html
+24
-3
No files found.
common/lib/xmodule/xmodule/proctor_module.py
View file @
9b6e053f
...
@@ -235,9 +235,12 @@ class ProctorModule(ProctorFields, XModule):
...
@@ -235,9 +235,12 @@ class ProctorModule(ProctorFields, XModule):
return
self
.
child
.
get_icon_class
()
if
self
.
child
else
'other'
return
self
.
child
.
get_icon_class
()
if
self
.
child
else
'other'
def
reset
(
self
,
username
):
def
reset
(
self
,
username
):
pminfo
=
module_tree_reset
.
ProctorModuleInfo
(
self
.
runtime
.
course_id
)
try
:
pminfo
.
get_assignments_attempted_and_failed
(
username
,
do_reset
=
True
)
pminfo
=
module_tree_reset
.
ProctorModuleInfo
(
self
.
runtime
.
course_id
)
return
self
.
status
(
username
)
pminfo
.
get_assignments_attempted_and_failed
(
username
,
do_reset
=
True
)
return
self
.
status
(
username
)
except
Exception
as
exc
:
return
json
.
dumps
({
"error"
:
str
(
exc
)})
def
status
(
self
,
username
):
def
status
(
self
,
username
):
try
:
try
:
...
...
lms/templates/proctor.html
View file @
9b6e053f
...
@@ -36,16 +36,37 @@ proctor_override = function(){
...
@@ -36,16 +36,37 @@ proctor_override = function(){
}
}
$
(
'#proctor_override'
).
click
(
proctor_override
);
$
(
'#proctor_override'
).
click
(
proctor_override
);
$
(
'#proctor_${element_id}_submit'
).
click
(
function
()
{
$
(
'#proctor_${element_id}_reset_form'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
$
(
'#proctor_${element_id}_submit'
).
attr
(
"disabled"
,
true
);
$
(
'#proctor_${element_id}_submit'
).
html
(
'${_("Processing, please wait...")}'
);
$
.
ajax
({
$
.
ajax
({
url
:
'${ajax_url}/reset'
,
url
:
'${ajax_url}/reset'
,
type
:
'POST'
,
type
:
'POST'
,
dataType
:
'json'
,
dataType
:
'json'
,
data
:
$
(
'#proctor_${element_id}_reset_form'
).
serialize
(),
data
:
$
(
'#proctor_${element_id}_reset_form'
).
serialize
(),
success
:
function
(
data
)
{
success
:
function
(
data
)
{
$
(
'#proctor_${element_id}_text'
).
append
(
JSON
.
stringify
(
data
));
var
msg
=
''
;
}
if
(
'error'
in
data
)
{
msg
=
"ERROR: "
+
data
[
'error'
];
}
else
{
var
uname
=
$
(
'#proctor_${element_id}_student_username'
).
val
();
msg
=
"Successfully reset attempts for user: "
+
uname
;
}
$
(
'#proctor_${element_id}_text'
).
html
(
msg
);
},
error
:
function
(
xhr
,
stat
,
error
){
console
.
debug
(
xhr
);
console
.
debug
(
stat
);
console
.
debug
(
error
);
$
(
'#proctor_${element_id}_text'
).
html
(
'FATAL: '
+
error
);
},
complete
:
function
(){
$
(
'#proctor_${element_id}_submit'
).
removeAttr
(
"disabled"
);
$
(
'#proctor_${element_id}_submit'
).
html
(
'${_("Reset Attempts")}'
);
},
});
});
return
false
;
});
});
</script>
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment