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
6f964ace
Commit
6f964ace
authored
May 16, 2013
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added docs and added is_correct to conditional
parent
6f95d21e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
common/lib/xmodule/xmodule/capa_module.py
+8
-2
common/lib/xmodule/xmodule/conditional_module.py
+10
-0
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
6f964ace
...
...
@@ -517,8 +517,14 @@ class CapaModule(CapaFields, XModule):
return
False
def
is_completed
(
self
):
# used by conditional module
# return self.answer_available()
""" Used to decide to show or hide RESET or CHECK buttons.
Actually means that student submitted problem and nothing more.
Problem can be completely wrong.
Pressing RESET button makes this function to return False.
Suggestion: rename it to is_submitted.
# older comment: return self.answer_available()"""
return
self
.
lcp
.
done
def
is_attempted
(
self
):
...
...
common/lib/xmodule/xmodule/conditional_module.py
View file @
6f964ace
...
...
@@ -70,8 +70,18 @@ class ConditionalModule(ConditionalFields, XModule):
# value: <name of module attribute>
conditions_map
=
{
'poll_answer'
:
'poll_answer'
,
# poll_question attr
# problem was submitted (it can be wrong)
# if student will press reset button after that,
# state will be reverted
'completed'
:
'is_completed'
,
# capa_problem attr
# if student attempted problem
'attempted'
:
'is_attempted'
,
# capa_problem attr
# if problem is full points
'correct'
:
'is_correct'
,
'voted'
:
'voted'
# poll_question attr
}
...
...
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