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
d0749f53
Commit
d0749f53
authored
Jun 16, 2013
by
jinpa
Committed by
Joe Blaylock
Jun 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change text of button from 'final check' to 'submit'
parent
f5658e27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
common/lib/xmodule/xmodule/capa_module.py
+2
-2
common/lib/xmodule/xmodule/tests/test_capa_module.py
+4
-4
lms/djangoapps/courseware/features/problems.feature
+1
-1
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
d0749f53
...
...
@@ -263,14 +263,14 @@ class CapaModule(CapaFields, XModule):
"""
Determine the name for the "check" button.
Usually it is just "Check", but if this is the student's
final attempt, change the name to "
Final Check
"
final attempt, change the name to "
Submit
"
"""
if
self
.
max_attempts
is
not
None
:
final_check
=
(
self
.
attempts
>=
self
.
max_attempts
-
1
)
else
:
final_check
=
False
return
"
Final Check
"
if
final_check
else
"Check"
return
"
Submit
"
if
final_check
else
"Check"
def
should_show_check_button
(
self
):
"""
...
...
common/lib/xmodule/xmodule/tests/test_capa_module.py
View file @
d0749f53
...
...
@@ -657,18 +657,18 @@ class CapaModuleTest(unittest.TestCase):
def
test_check_button_name
(
self
):
# If last attempt, button name changes to "
Final Check
"
# If last attempt, button name changes to "
Submit
"
# Just in case, we also check what happens if we have
# more attempts than allowed.
attempts
=
random
.
randint
(
1
,
10
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
1
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final Check
"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Submit
"
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final Check
"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Submit
"
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
+
1
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final Check
"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Submit
"
)
# Otherwise, button name is "Check"
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
2
,
max_attempts
=
attempts
)
...
...
lms/djangoapps/courseware/features/problems.feature
View file @
d0749f53
...
...
@@ -106,7 +106,7 @@ Feature: Answer problems
When
I answer a
"multiple choice"
problem
"incorrectly"
And
I reset the problem
Then
I should see
"You have used 2 of 3 submissions"
somewhere in the page
And
The
"
Final Check
"
button does appear
And
The
"
Submit
"
button does appear
When
I answer a
"multiple choice"
problem
"correctly"
Then
The
"Reset"
button does not appear
...
...
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