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
df6d8fd2
Commit
df6d8fd2
authored
Mar 27, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues with progress page and open ended grading
parent
4443afec
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
2 deletions
+19
-2
common/lib/xmodule/xmodule/combined_open_ended_module.py
+3
-1
common/lib/xmodule/xmodule/open_ended_grading_classes/xblock_field_types.py
+12
-0
common/lib/xmodule/xmodule/peer_grading_module.py
+2
-1
common/lib/xmodule/xmodule/templates/combinedopenended/default.yaml
+1
-0
common/lib/xmodule/xmodule/templates/peer_grading/default.yaml
+1
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
df6d8fd2
...
...
@@ -6,9 +6,10 @@ from pkg_resources import resource_string
from
xmodule.raw_module
import
RawDescriptor
from
.x_module
import
XModule
from
xblock.core
import
Integer
,
Scope
,
BlockScope
,
ModelType
,
String
,
Boolean
,
Object
,
Float
,
List
from
xblock.core
import
Integer
,
Scope
,
BlockScope
,
ModelType
,
String
,
Boolean
,
Object
,
List
from
xmodule.open_ended_grading_classes.combined_open_ended_modulev1
import
CombinedOpenEndedV1Module
,
CombinedOpenEndedV1Descriptor
from
collections
import
namedtuple
from
xmodule.open_ended_grading_classes.xblock_field_types
import
StringyFloat
log
=
logging
.
getLogger
(
"mitx.courseware"
)
...
...
@@ -68,6 +69,7 @@ class CombinedOpenEndedFields(object):
scope
=
Scope
.
settings
)
version
=
VersionInteger
(
help
=
"Current version number"
,
default
=
DEFAULT_VERSION
,
scope
=
Scope
.
settings
)
data
=
String
(
help
=
"XML data for the problem"
,
scope
=
Scope
.
content
)
weight
=
StringyFloat
(
help
=
"How much to weight this problem by"
,
scope
=
Scope
.
settings
)
class
CombinedOpenEndedModule
(
CombinedOpenEndedFields
,
XModule
):
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/xblock_field_types.py
0 → 100644
View file @
df6d8fd2
from
xblock.core
import
Integer
,
Float
class
StringyFloat
(
Float
):
"""
A model type that converts from string to floats when reading from json
"""
def
from_json
(
self
,
value
):
try
:
return
float
(
value
)
except
:
return
None
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
df6d8fd2
...
...
@@ -13,6 +13,7 @@ from xmodule.modulestore import Location
from
xmodule.modulestore.django
import
modulestore
from
.timeinfo
import
TimeInfo
from
xblock.core
import
Object
,
Integer
,
Boolean
,
String
,
Scope
from
xmodule.open_ended_grading_classes.xblock_field_types
import
StringyFloat
from
xmodule.open_ended_grading_classes.peer_grading_service
import
PeerGradingService
,
GradingServiceError
,
MockPeerGradingService
...
...
@@ -26,7 +27,6 @@ IS_GRADED = True
EXTERNAL_GRADER_NO_CONTACT_ERROR
=
"Failed to contact external graders. Please notify course staff."
class
PeerGradingFields
(
object
):
use_for_single_location
=
Boolean
(
help
=
"Whether to use this for a single location or as a panel."
,
default
=
USE_FOR_SINGLE_LOCATION
,
scope
=
Scope
.
settings
)
link_to_location
=
String
(
help
=
"The location this problem is linked to."
,
default
=
LINK_TO_LOCATION
,
scope
=
Scope
.
settings
)
...
...
@@ -35,6 +35,7 @@ class PeerGradingFields(object):
grace_period_string
=
String
(
help
=
"Amount of grace to give on the due date."
,
default
=
None
,
scope
=
Scope
.
settings
)
max_grade
=
Integer
(
help
=
"The maximum grade that a student can receieve for this problem."
,
default
=
MAX_SCORE
,
scope
=
Scope
.
settings
)
student_data_for_location
=
Object
(
help
=
"Student data for a given peer grading problem."
,
default
=
json
.
dumps
({}),
scope
=
Scope
.
student_state
)
weight
=
StringyFloat
(
help
=
"How much to weight this problem by"
,
scope
=
Scope
.
settings
)
class
PeerGradingModule
(
PeerGradingFields
,
XModule
):
...
...
common/lib/xmodule/xmodule/templates/combinedopenended/default.yaml
View file @
df6d8fd2
...
...
@@ -7,6 +7,7 @@ metadata:
display_name
:
Open Ended Response
skip_spelling_checks
:
False
accept_file_upload
:
False
weight
:
"
"
data
:
|
<combinedopenended>
<rubric>
...
...
common/lib/xmodule/xmodule/templates/peer_grading/default.yaml
View file @
df6d8fd2
...
...
@@ -6,6 +6,7 @@ metadata:
link_to_location
:
None
is_graded
:
False
max_grade
:
1
weight
:
"
"
data
:
|
<peergrading>
</peergrading>
...
...
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