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
0e81f916
Commit
0e81f916
authored
Jan 04, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move open ended module file
parent
dabb5ee7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
common/lib/xmodule/xmodule/combined_open_ended_module.py
+2
-2
common/lib/xmodule/xmodule/open_ended_module.py
+9
-10
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
0e81f916
...
...
@@ -12,6 +12,7 @@ import sys
from
pkg_resources
import
resource_string
from
.capa_module
import
only_one
,
ComplexEncoder
from
common.lib.xmodule.xmodule
import
open_ended_module
from
.editing_module
import
EditingDescriptor
from
.html_checker
import
check_html
from
progress
import
Progress
...
...
@@ -20,7 +21,6 @@ from .x_module import XModule
from
.xml_module
import
XmlDescriptor
from
xmodule.modulestore
import
Location
import
self_assessment_module
import
open_ended_module
log
=
logging
.
getLogger
(
"mitx.courseware"
)
...
...
@@ -122,7 +122,7 @@ class CombinedOpenEndedModule(XModule):
else
:
self
.
current_task
=
self_assessment_module
.
SelfAssessmentModule
(
self
.
system
,
self
.
location
,
self
.
current_task_parsed_xml
,
self
.
current_task_descriptor
,
instance_state
=
current_task_state
)
elif
current_task_type
==
"openended"
:
self
.
current_task_descriptor
=
open_ended_module
.
OpenEndedDescriptor
(
self
.
system
)
self
.
current_task_descriptor
=
open_ended_module
.
OpenEndedDescriptor
(
self
.
system
)
self
.
current_task_parsed_xml
=
self
.
current_task_descriptor
.
definition_from_xml
(
etree
.
fromstring
(
self
.
current_task_xml
),
self
.
system
)
if
current_task_state
is
None
and
self
.
current_task_number
==
0
:
self
.
current_task
=
open_ended_module
.
OpenEndedModule
(
self
.
system
,
self
.
location
,
self
.
current_task_parsed_xml
,
self
.
current_task_descriptor
)
...
...
common/lib/xmodule/open_ended_module.py
→
common/lib/xmodule/
xmodule/
open_ended_module.py
View file @
0e81f916
...
...
@@ -544,18 +544,17 @@ class OpenEndedModule():
})
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
def
get_problem
:
def
get_problem
(
self
,
get
)
:
return
self
.
get_html
()
def
reset_problem
:
def
reset_problem
(
self
,
get
)
:
self
.
change_state
(
self
.
INITIAL
)
return
{
'success'
:
True
}
def
save_problem
:
def
save_problem
(
self
,
get
):
pass
def
update_score
:
def
update_score
(
self
,
get
)
:
"""
Delivers grading response (e.g. from asynchronous code checking) to
the capa problem, so its score can be updated
...
...
@@ -602,10 +601,10 @@ class OpenEndedModule():
return
html
def
change_state
(
self
,
new_state
):
"""
A centralized place for state changes--allows for hooks. If the
current state matches the old state, don't run any hooks.
"""
"""
A centralized place for state changes--allows for hooks. If the
current state matches the old state, don't run any hooks.
"""
if
self
.
state
==
new_state
:
return
...
...
@@ -639,7 +638,7 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor):
stores_state
=
True
has_score
=
True
template_dir_name
=
openended
"
template_dir_name
=
"
openended"
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/html/edit.coffee'
)]}
js_module_name
=
"HTMLEditingDescriptor"
...
...
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