Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DoneXBlock
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
DoneXBlock
Commits
115cae1f
Commit
115cae1f
authored
May 29, 2014
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added LMS magic
parent
92e6ae6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
done/done.py
+40
-0
No files found.
done/done.py
View file @
115cae1f
...
@@ -26,6 +26,8 @@ class DoneXBlock(XBlock):
...
@@ -26,6 +26,8 @@ class DoneXBlock(XBlock):
default
=
"left"
default
=
"left"
)
)
has_score
=
True
def
resource_string
(
self
,
path
):
def
resource_string
(
self
,
path
):
"""Handy helper for getting resources from our kit."""
"""Handy helper for getting resources from our kit."""
data
=
pkg_resources
.
resource_string
(
__name__
,
path
)
data
=
pkg_resources
.
resource_string
(
__name__
,
path
)
...
@@ -78,3 +80,41 @@ class DoneXBlock(XBlock):
...
@@ -78,3 +80,41 @@ class DoneXBlock(XBlock):
</vertical_demo>
</vertical_demo>
"""
),
"""
),
]
]
## Everything below is stolen from https://github.com/edx/edx-ora2/blob/master/apps/openassessment/xblock/lms_mixin.py
## It's needed to keep the LMS+Studio happy.
## It should be included as a mixin.
display_name
=
String
(
default
=
"Completion"
,
scope
=
Scope
.
settings
,
help
=
"Display name"
)
start
=
DateTime
(
default
=
None
,
scope
=
Scope
.
settings
,
help
=
"ISO-8601 formatted string representing the start date of this assignment. We ignore this."
)
due
=
DateTime
(
default
=
None
,
scope
=
Scope
.
settings
,
help
=
"ISO-8601 formatted string representing the due date of this assignment. We ignore this."
)
weight
=
Float
(
display_name
=
"Problem Weight"
,
help
=
(
"Defines the number of points each problem is worth. "
"If the value is not set, the problem is worth the sum of the "
"option point values."
),
values
=
{
"min"
:
0
,
"step"
:
.
1
},
scope
=
Scope
.
settings
)
def
has_dynamic_children
(
self
):
"""Do we dynamically determine our children? No, we don't have any.
"""
return
False
def
max_score
(
self
):
"""The maximum raw score of our problem.
"""
return
1
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