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
5125d8b0
Commit
5125d8b0
authored
Apr 16, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat code
parent
d82ac2b7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
+12
-11
common/lib/xmodule/xmodule/combined_open_ended_module.py
+4
-4
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
+2
-2
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
+5
-4
common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py
+1
-1
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
+0
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
5125d8b0
...
...
@@ -106,10 +106,10 @@ class CombinedOpenEndedModule(CombinedOpenEndedFields, XModule):
icon_class
=
'problem'
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/combinedopenended/display.coffee'
),
resource_string
(
__name__
,
'js/src/collapsible.coffee'
),
resource_string
(
__name__
,
'js/src/javascript_loader.coffee'
),
]}
[
resource_string
(
__name__
,
'js/src/combinedopenended/display.coffee'
),
resource_string
(
__name__
,
'js/src/collapsible.coffee'
),
resource_string
(
__name__
,
'js/src/javascript_loader.coffee'
),
]}
js_module_name
=
"CombinedOpenEnded"
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/combinedopenended/display.scss'
)]}
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py
View file @
5125d8b0
...
...
@@ -461,7 +461,7 @@ class CombinedOpenEndedV1Module():
last_response_dict
=
{
'response'
:
last_response
,
'score'
:
last_score
,
'all_scores'
:
all_scores
,
'all_scores'
:
all_scores
,
'post_assessment'
:
last_post_assessment
,
'type'
:
task_type
,
'max_score'
:
max_score
,
...
...
@@ -750,7 +750,7 @@ class CombinedOpenEndedV1Module():
score
=
last_response
.
get
(
'all_scores'
,
None
)
if
score
is
not
None
:
#Convert none scores and weight scores properly
for
z
in
xrange
(
0
,
len
(
score
)):
for
z
in
xrange
(
0
,
len
(
score
)):
if
score
[
z
]
is
None
:
score
[
z
]
=
0
score
[
z
]
*=
float
(
self
.
weight
)
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
View file @
5125d8b0
...
...
@@ -72,7 +72,8 @@ class OpenEndedChild(object):
try
:
instance_state
=
json
.
loads
(
instance_state
)
except
:
log
.
error
(
"Could not load instance state for open ended. Setting it to nothing.: {0}"
.
format
(
instance_state
))
log
.
error
(
"Could not load instance state for open ended. Setting it to nothing.: {0}"
.
format
(
instance_state
))
else
:
instance_state
=
{}
...
...
@@ -81,8 +82,8 @@ class OpenEndedChild(object):
# element.
# Scores are on scale from 0 to max_score
self
.
child_history
=
instance_state
.
get
(
'child_history'
,
[])
self
.
child_state
=
instance_state
.
get
(
'child_state'
,
self
.
INITIAL
)
self
.
child_history
=
instance_state
.
get
(
'child_history'
,
[])
self
.
child_state
=
instance_state
.
get
(
'child_state'
,
self
.
INITIAL
)
self
.
child_created
=
instance_state
.
get
(
'child_created'
,
False
)
self
.
child_attempts
=
instance_state
.
get
(
'child_attempts'
,
0
)
...
...
@@ -166,7 +167,7 @@ class OpenEndedChild(object):
"""None if not available"""
if
not
self
.
child_history
:
return
None
return
[
self
.
child_history
[
i
]
.
get
(
'score'
)
for
i
in
xrange
(
0
,
len
(
self
.
child_history
))]
return
[
self
.
child_history
[
i
]
.
get
(
'score'
)
for
i
in
xrange
(
0
,
len
(
self
.
child_history
))]
def
latest_post_assessment
(
self
,
system
):
"""Empty string if not available"""
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py
View file @
5125d8b0
...
...
@@ -291,7 +291,7 @@ class SelfAssessmentDescriptor():
template_dir_name
=
"selfassessment"
def
__init__
(
self
,
system
):
self
.
system
=
system
self
.
system
=
system
@classmethod
def
definition_from_xml
(
cls
,
xml_object
,
system
):
...
...
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
View file @
5125d8b0
This diff is collapsed.
Click to expand it.
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