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
3dc97913
Commit
3dc97913
authored
May 21, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update xblock, start Selenium.
parent
bb699f48
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
11 deletions
+8
-11
common/lib/xmodule/xmodule/combined_open_ended_module.py
+3
-6
common/lib/xmodule/xmodule/peer_grading_module.py
+2
-3
common/lib/xmodule/xmodule/tests/test_xml_module.py
+1
-2
common/lib/xmodule/xmodule/x_module.py
+2
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
3dc97913
...
...
@@ -59,16 +59,13 @@ class CombinedOpenEndedFields(object):
attempts
=
StringyInteger
(
display_name
=
"Maximum Attempts"
,
help
=
"The number of times the student can try to answer this problem."
,
default
=
1
,
scope
=
Scope
.
settings
,
values
=
{
"min"
:
1
})
# 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
}])
is_graded
=
Boolean
(
display_name
=
"Graded"
,
help
=
"Whether or not the problem is graded."
,
default
=
False
,
scope
=
Scope
.
settings
)
accept_file_upload
=
Boolean
(
display_name
=
"Allow 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
}])
help
=
"Whether or not the student can submit files as a response."
,
default
=
False
,
scope
=
Scope
.
settings
)
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 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
}]
)
default
=
False
,
scope
=
Scope
.
settings
)
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
,
scope
=
Scope
.
settings
)
...
...
common/lib/xmodule/xmodule/peer_grading_module.py
View file @
3dc97913
...
...
@@ -31,15 +31,14 @@ class PeerGradingFields(object):
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 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
)
help
=
'Whether the student gets credit for grading this problem. Only used when "Show Single Problem" is True.'
,
default
=
IS_GRADED
,
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 receive for this problem."
,
default
=
MAX_SCORE
,
...
...
common/lib/xmodule/xmodule/tests/test_xml_module.py
View file @
3dc97913
...
...
@@ -32,8 +32,7 @@ class TestFields(object):
# Used for testing float type
float_non_select
=
StringyFloat
(
scope
=
Scope
.
settings
,
default
=.
999
,
values
=
{
'min'
:
0
,
'step'
:
.
3
})
# Used for testing that Booleans get mapped to select type
# TODO: move default value into xblock!
boolean_select
=
Boolean
(
scope
=
Scope
.
settings
,
values
=
[{
'display_name'
:
"True"
,
"value"
:
True
},
{
'display_name'
:
"False"
,
"value"
:
False
}])
boolean_select
=
Boolean
(
scope
=
Scope
.
settings
)
class
EditableMetadataFieldsTest
(
unittest
.
TestCase
):
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
3dc97913
...
...
@@ -649,6 +649,8 @@ class XModuleDescriptor(XModuleFields, HTMLSnippet, ResourceTemplates, XBlock):
# 3. A generic string editor for anything else (editing JSON representation of the value).
type
=
"Generic"
values
=
[]
if
field
.
values
is
None
else
copy
.
deepcopy
(
field
.
values
)
if
isinstance
(
values
,
tuple
):
values
=
list
(
values
)
if
isinstance
(
values
,
list
):
if
len
(
values
)
>
0
:
type
=
"Select"
...
...
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