Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
6f964ace
Commit
6f964ace
authored
11 years ago
by
Alexander Kryklia
Browse files
Options
Downloads
Patches
Plain Diff
added docs and added is_correct to conditional
parent
6f95d21e
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/lib/xmodule/xmodule/capa_module.py
+8
-2
8 additions, 2 deletions
common/lib/xmodule/xmodule/capa_module.py
common/lib/xmodule/xmodule/conditional_module.py
+10
-0
10 additions, 0 deletions
common/lib/xmodule/xmodule/conditional_module.py
with
18 additions
and
2 deletions
common/lib/xmodule/xmodule/capa_module.py
+
8
−
2
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
):
...
...
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/conditional_module.py
+
10
−
0
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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment