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
0f5af40b
Commit
0f5af40b
authored
Oct 31, 2012
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add self assessment
parent
7fc54dc7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletions
+28
-1
common/lib/xmodule/xmodule/js/src/selfassessment/display.coffee
+0
-0
common/lib/xmodule/xmodule/self_assessment_module.py
+28
-1
No files found.
common/lib/xmodule/xmodule/js/src/selfassessment/display.coffee
0 → 100644
View file @
0f5af40b
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/self_assessment_module.py
View file @
0f5af40b
...
...
@@ -23,7 +23,7 @@ log = logging.getLogger("mitx.courseware")
class
SelfAssessmentModule
(
XModule
):
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/javascript_loader.coffee'
),
resource_string
(
__name__
,
'js/src/collapsible.coffee'
),
resource_string
(
__name__
,
'js/src/
html
/display.coffee'
)
resource_string
(
__name__
,
'js/src/
selfassessment
/display.coffee'
)
]
}
js_module_name
=
"SelfAssessmentModule"
...
...
@@ -38,6 +38,33 @@ class SelfAssessmentModule(XModule):
instance_state
,
shared_state
,
**
kwargs
)
self
.
html
=
self
.
definition
[
'data'
]
def
handle_ajax
(
self
,
dispatch
,
get
):
'''
This is called by courseware.module_render, to handle an AJAX call.
"get" is request.POST.
Returns a json dictionary:
{ 'progress_changed' : True/False,
'progress' : 'none'/'in_progress'/'done',
<other request-specific values here > }
'''
handlers
=
{
'problem_get'
:
self
.
get_problem
,
'problem_check'
:
self
.
check_problem
,
'problem_save'
:
self
.
save_problem
,
}
if
dispatch
not
in
handlers
:
return
'Error'
before
=
self
.
get_progress
()
d
=
handlers
[
dispatch
](
get
)
after
=
self
.
get_progress
()
d
.
update
({
'progress_changed'
:
after
!=
before
,
'progress_status'
:
Progress
.
to_js_status_str
(
after
),
})
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
class
SelfAssessmentDescriptor
(
XmlDescriptor
,
EditingDescriptor
):
...
...
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