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
a9749f38
Commit
a9749f38
authored
Jul 18, 2013
by
Miles Steele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add reset attempts all button click handler, increase polling interval, add slick grid refresh
parent
b44e8fe8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
lms/static/coffee/src/instructor_dashboard/analytics.coffee
+12
-1
lms/static/coffee/src/instructor_dashboard/student_admin.coffee
+15
-1
No files found.
lms/static/coffee/src/instructor_dashboard/analytics.coffee
View file @
a9749f38
...
...
@@ -9,6 +9,8 @@ std_ajax_err = -> window.InstructorDashboard.util.std_ajax_err.apply this, argum
# Analytics Section
class
Analytics
constructor
:
(
@
$section
)
->
@
$section
.
data
'wrapper'
,
@
# gather elements
@
$display
=
@
$section
.
find
'.distribution-display'
@
$display_text
=
@
$display
.
find
'.distribution-display-text'
...
...
@@ -99,7 +101,6 @@ class Analytics
console
.
warn
(
"unable to show distribution
#{
feature_res
.
type
}
"
)
@
$display_text
.
text
'Unavailable Metric Display
\n
'
+
JSON
.
stringify
(
feature_res
)
# fetch distribution data from server.
# `handler` can be either a callback for success
# or a mapping e.g. {success: ->, error: ->, complete: ->}
...
...
@@ -116,6 +117,16 @@ class Analytics
$
.
ajax
settings
# slickgrid's layout collapses when rendered
# in an invisible div. use this method to reload
# the AuthList widget
refresh
:
->
@
on_selector_change
()
# handler for when the section title is clicked.
onClickTitle
:
->
@
refresh
()
# export for use
# create parent namespaces if they do not already exist.
...
...
lms/static/coffee/src/instructor_dashboard/student_admin.coffee
View file @
a9749f38
...
...
@@ -215,6 +215,19 @@ class StudentAdmin
error
:
std_ajax_err
=>
@
$request_response_error_all
.
text
"Error starting a task to reset attempts for all students on this problem."
# start task to rescore problem for all students
@
$btn_reset_attempts_all
.
click
=>
send_data
=
all_students
:
true
problem_to_reset
:
@
$field_problem_select_all
.
val
()
$
.
ajax
dataType
:
'json'
url
:
@
$btn_reset_attempts_all
.
data
'endpoint'
data
:
send_data
success
:
@
clear_errors_then
->
console
.
log
'started reset attempts task'
error
:
std_ajax_err
=>
@
$request_response_error_all
.
text
"Error starting a task to reset attempts on this problem for all students."
# start task to rescore problem for all students
@
$btn_rescore_problem_all
.
click
=>
send_data
=
all_students
:
true
...
...
@@ -255,7 +268,8 @@ class StudentAdmin
start_refresh_running_task_poll_loop
:
->
@
reload_running_tasks_list
()
if
@
$section
.
hasClass
'active-section'
plantTimeout
5000
,
=>
@
start_refresh_running_task_poll_loop
()
# poll every 20 seconds
plantTimeout
20000
,
=>
@
start_refresh_running_task_poll_loop
()
# wraps a function, but first clear the error displays
clear_errors_then
:
(
cb
)
->
...
...
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