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
a6c5e699
Commit
a6c5e699
authored
May 16, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update combined open ended and peer grading per conversation with Vik.
parent
01ff8396
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
25 deletions
+26
-25
common/lib/xmodule/xmodule/combined_open_ended_module.py
+10
-10
common/lib/xmodule/xmodule/peer_grading_module.py
+16
-12
common/lib/xmodule/xmodule/templates/peer_grading/default.yaml
+0
-3
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
a6c5e699
...
...
@@ -5,10 +5,10 @@ from pkg_resources import resource_string
from
xmodule.raw_module
import
RawDescriptor
from
.x_module
import
XModule
from
xblock.core
import
Integer
,
Scope
,
String
,
Boolean
,
List
from
xblock.core
import
Scope
,
String
,
Integer
,
Boolean
,
List
from
xmodule.open_ended_grading_classes.combined_open_ended_modulev1
import
CombinedOpenEndedV1Module
,
CombinedOpenEndedV1Descriptor
from
collections
import
namedtuple
from
.fields
import
Date
,
StringyFloat
from
.fields
import
Date
,
StringyFloat
,
StringyInteger
log
=
logging
.
getLogger
(
"mitx.courseware"
)
...
...
@@ -56,18 +56,18 @@ class CombinedOpenEndedFields(object):
scope
=
Scope
.
user_state
)
ready_to_reset
=
Boolean
(
help
=
"If the problem is ready to be reset or not."
,
default
=
False
,
scope
=
Scope
.
user_state
)
attempts
=
Integer
(
display_name
=
"Maximum Attempts"
,
help
=
"
Specifies t
he number of times the student can try to answer this problem."
,
default
=
1
,
attempts
=
Stringy
Integer
(
display_name
=
"Maximum Attempts"
,
help
=
"
T
he number of times the student can try to answer this problem."
,
default
=
1
,
scope
=
Scope
.
settings
)
# TODO: move values to Boolean in xblock.
is_graded
=
Boolean
(
display_name
=
"Graded"
,
help
=
"Whether or not the problem is graded."
,
default
=
False
,
scope
=
Scope
.
settings
,
values
=
[{
'display_name'
:
"True"
,
"value"
:
True
},
{
'display_name'
:
"False"
,
"value"
:
False
}])
accept_file_upload
=
Boolean
(
display_name
=
"A
ccept File Upload
"
,
help
=
"
If disabled, students cannot upload images to be graded with this problem
."
,
default
=
False
,
scope
=
Scope
.
settings
,
accept_file_upload
=
Boolean
(
display_name
=
"A
llow File Uploads
"
,
help
=
"
Whether or not the student can submit files as a response
."
,
default
=
False
,
scope
=
Scope
.
settings
,
values
=
[{
'display_name'
:
"True"
,
"value"
:
True
},
{
'display_name'
:
"False"
,
"value"
:
False
}])
skip_spelling_checks
=
Boolean
(
display_name
=
"
Basic
Quality Filter"
,
skip_spelling_checks
=
Boolean
(
display_name
=
"
Disable
Quality Filter"
,
# TODO: passing of text failed with "won't". Need to make our code more robust.
help
=
"If
enabled
, submissions with poor spelling, short length, or poor grammar will not be peer reviewed."
,
help
=
"If
False
, submissions with poor spelling, short length, or poor grammar will not be peer reviewed."
,
default
=
False
,
scope
=
Scope
.
settings
,
values
=
[{
'display_name'
:
"True"
,
"value"
:
True
},
{
'display_name'
:
"False"
,
"value"
:
False
}])
due
=
Date
(
help
=
"Date that this problem is due by"
,
default
=
None
,
scope
=
Scope
.
settings
)
graceperiod
=
String
(
help
=
"Amount of time after the due date that submissions will be accepted"
,
default
=
None
,
...
...
@@ -75,8 +75,8 @@ class CombinedOpenEndedFields(object):
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
(
display_name
=
"Problem Weight"
,
help
=
"
Specifies the number of points the problem is worth. By default, each response field in the
problem is worth one point."
,
scope
=
Scope
.
settings
)
help
=
"
The number of points the problem is worth. By default, each
problem is worth one point."
,
scope
=
Scope
.
settings
,
values
=
{
"min"
:
0
,
"step"
:
".1"
}
)
class
CombinedOpenEndedModule
(
CombinedOpenEndedFields
,
XModule
):
...
...
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
a6c5e699
...
...
@@ -22,28 +22,33 @@ USE_FOR_SINGLE_LOCATION = False
LINK_TO_LOCATION
=
""
TRUE_DICT
=
[
True
,
"True"
,
"true"
,
"TRUE"
]
MAX_SCORE
=
1
IS_GRADED
=
Tru
e
IS_GRADED
=
Fals
e
EXTERNAL_GRADER_NO_CONTACT_ERROR
=
"Failed to contact external graders. Please notify course staff."
class
PeerGradingFields
(
object
):
use_for_single_location
=
StringyBoolean
(
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
)
use_for_single_location
=
StringyBoolean
(
display_name
=
"Show Single Problem"
,
help
=
'When True, only the single problem specified by "Link to Problem Location" is shown. '
'When False, a panel is displayed with all problems available for peer grading.'
,
values
=
[{
'display_name'
:
"True"
,
"value"
:
True
},
{
'display_name'
:
"False"
,
"value"
:
False
}],
default
=
USE_FOR_SINGLE_LOCATION
,
scope
=
Scope
.
settings
)
link_to_location
=
String
(
display_name
=
"Link to Problem Location"
,
help
=
'The location of the problem being graded. Only used when "Show Single Problem" is True.'
,
default
=
LINK_TO_LOCATION
,
scope
=
Scope
.
settings
)
# TODO: move boolean default into xfields
is_graded
=
StringyBoolean
(
display_name
=
"Graded"
,
help
=
"Whether or not this module is scored."
,
default
=
IS_GRADED
,
is_graded
=
StringyBoolean
(
display_name
=
"Graded"
,
help
=
'Whether the student gets credit for grading this problem. Only used when "Show Single Problem" is True.'
,
default
=
IS_GRADED
,
values
=
[{
'display_name'
:
"True"
,
"value"
:
True
},
{
'display_name'
:
"False"
,
"value"
:
False
}],
scope
=
Scope
.
settings
)
due_date
=
Date
(
help
=
"Due date that should be displayed."
,
default
=
None
,
scope
=
Scope
.
settings
)
grace_period_string
=
String
(
help
=
"Amount of grace to give on the due date."
,
default
=
None
,
scope
=
Scope
.
settings
)
max_grade
=
StringyInteger
(
help
=
"The maximum grade that a student can recei
e
ve for this problem."
,
default
=
MAX_SCORE
,
scope
=
Scope
.
settings
)
max_grade
=
StringyInteger
(
help
=
"The maximum grade that a student can receive for this problem."
,
default
=
MAX_SCORE
,
scope
=
Scope
.
settings
,
values
=
{
"min"
:
0
}
)
student_data_for_location
=
Object
(
help
=
"Student data for a given peer grading problem."
,
scope
=
Scope
.
user_state
)
weight
=
StringyFloat
(
display_name
=
"Problem Weight"
,
help
=
"Specifies the number of points the problem is worth. By default, each
response field in the
problem is worth one point."
,
scope
=
Scope
.
settings
)
help
=
"Specifies the number of points the problem is worth. By default, each problem is worth one point."
,
scope
=
Scope
.
settings
,
values
=
{
"min"
:
0
,
"step"
:
".1"
}
)
class
PeerGradingModule
(
PeerGradingFields
,
XModule
):
...
...
@@ -596,7 +601,6 @@ class PeerGradingDescriptor(PeerGradingFields, RawDescriptor):
def
non_editable_metadata_fields
(
self
):
non_editable_fields
=
super
(
PeerGradingDescriptor
,
self
)
.
non_editable_metadata_fields
non_editable_fields
.
extend
([
PeerGradingFields
.
due_date
,
PeerGradingFields
.
grace_period_string
,
PeerGradingFields
.
link_to_location
,
PeerGradingFields
.
max_grade
,
PeerGradingFields
.
use_for_single_location
])
PeerGradingFields
.
max_grade
])
return
non_editable_fields
common/lib/xmodule/xmodule/templates/peer_grading/default.yaml
View file @
a6c5e699
---
metadata
:
display_name
:
Peer Grading Interface
use_for_single_location
:
False
link_to_location
:
None
is_graded
:
False
max_grade
:
1
data
:
|
<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