Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-activetable
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
xblock-activetable
Commits
04b9e98a
Commit
04b9e98a
authored
Oct 20, 2015
by
Sven Marnach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add README.md file.
parent
b11d2bfc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
README.md
+37
-0
activetable/activetable.py
+4
-3
No files found.
README.md
0 → 100644
View file @
04b9e98a
ActiveTable XBlock
==================
This XBlock provides a tabular problem type, where students have to fill in some of the cells of a
table.
The table definition
--------------------
The table definition is entered in a Python-like syntax (actually in a strict subset of Python). It
must be a list of lists, with all inner lists having the same lengths. The elements of the inner
lists correspond to the cells of the table. The first line contains the column headers and can only
contain string literals. All further lines represent the table body. Cells can be either string
literals, e.g.
`'a string'`
, numbers, e.g.
`6.23`
, or response cell declarations. There are two
types of response cells:
Numeric(answer=<correct_answer>, tolerance=<tolerance in percent>,
min_significant_digits=<number>, max_significant_digits=<number>)
A cell that expects a numeric answer. The tolerance is optional, and will default to the default
tolerance specified above. The restrictions for the number of significant digits are optional as
well. Significant digits are counted started from the first non-zero digit specified by the
student, and include trailing zeros.
String(answer='<correct answer>')
A cell that expects a string answer.
An example of a table definition:
[
['Event', 'Year'],
['French Revolution', Numeric(answer=1789)],
['Krakatoa volcano explosion', Numeric(answer=1883)],
["Proof of Fermat's last theorem", Numeric(answer=1994)],
]
activetable/activetable.py
View file @
04b9e98a
...
@@ -36,12 +36,13 @@ class ActiveTableXBlock(StudioEditableXBlockMixin, XBlock):
...
@@ -36,12 +36,13 @@ class ActiveTableXBlock(StudioEditableXBlockMixin, XBlock):
)
)
help_text
=
String
(
help_text
=
String
(
display_name
=
'Help text'
,
display_name
=
'Help text'
,
help
=
'The text that gets displayed when clicking the "+help" button. If you
do not
'
help
=
'The text that gets displayed when clicking the "+help" button. If you
remove the
'
'
specify a
text, the help feature is disabled.'
,
'
help
text, the help feature is disabled.'
,
scope
=
Scope
.
content
,
scope
=
Scope
.
content
,
multiline_editor
=
True
,
multiline_editor
=
True
,
resettable_editor
=
False
,
resettable_editor
=
False
,
default
=
''
,
default
=
'Fill in the cells highlighted in yellow with the correct answers. '
'When you are done, you can check your answers using the button below the table.'
,
)
)
column_widths
=
String
(
column_widths
=
String
(
display_name
=
'Column widths'
,
display_name
=
'Column widths'
,
...
...
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