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
7c1e6d83
Commit
7c1e6d83
authored
May 09, 2014
by
Carson Gee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix message handling to be more internationalizable
parent
b3ec4d1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
common/test/acceptance/tests/test_staff_view.py
+2
-2
lms/static/js/staff_debug_actions.js
+11
-11
No files found.
common/test/acceptance/tests/test_staff_view.py
View file @
7c1e6d83
...
...
@@ -108,7 +108,7 @@ class StaffDebugTest(UniqueCourseTest):
msg
=
staff_debug_page
.
idash_msg
[
0
]
# Since we aren't running celery stuff, this will fail badly
# for now, but is worth excercising that bad of a response
self
.
assertEqual
(
u'
Unsuccessfully rescored
problem. '
self
.
assertEqual
(
u'
Failed to rescore
problem. '
'Unknown Error Occurred.'
,
msg
)
def
test_student_state_delete
(
self
):
...
...
@@ -147,5 +147,5 @@ class StaffDebugTest(UniqueCourseTest):
staff_debug_page
=
staff_page
.
open_staff_debug_info
()
staff_debug_page
.
delete_state
(
'INVALIDUSER'
)
msg
=
staff_debug_page
.
idash_msg
[
0
]
self
.
assertEqual
(
u'
Unsuccessfully deleted
student state. '
self
.
assertEqual
(
u'
Failed to delete
student state. '
'User does not exist.'
,
msg
)
lms/static/js/staff_debug_actions.js
View file @
7c1e6d83
...
...
@@ -31,11 +31,8 @@ var StaffDebug = (function(){
data
:
pdata
,
success
:
function
(
data
){
var
text
=
_
.
template
(
gettext
(
'Successfully {action} for user {user}'
),
{
action
:
action
.
description
,
user
:
data
.
student
},
action
.
success_msg
,
{
user
:
data
.
student
},
{
interpolate
:
/
\{(
.+
?)\}
/g
}
)
var
html
=
_
.
template
(
...
...
@@ -53,10 +50,10 @@ var StaffDebug = (function(){
response_json
=
{
error
:
gettext
(
'Unknown Error Occurred.'
)
};
}
var
text
=
_
.
template
(
gettext
(
'Unsuccessfully {action}. {error}'
)
,
'{error_msg} {error}'
,
{
error
:
response_json
.
error
,
action
:
action
.
description
error
_msg
:
action
.
error_msg
,
error
:
response_json
.
error
},
{
interpolate
:
/
\{(
.+
?)\}
/g
}
)
...
...
@@ -75,7 +72,8 @@ var StaffDebug = (function(){
this
.
do_idash_action
({
location
:
locname
,
method
:
'reset_student_attempts'
,
description
:
gettext
(
'reset the attempts'
),
success_msg
:
gettext
(
'Successfully reset the attempts for user {user}'
),
error_msg
:
gettext
(
'Failed to reset attempts.'
),
delete_module
:
false
});
}
...
...
@@ -84,7 +82,8 @@ var StaffDebug = (function(){
this
.
do_idash_action
({
location
:
locname
,
method
:
'reset_student_attempts'
,
description
:
gettext
(
'deleted student state'
),
success_msg
:
gettext
(
'Successfully deleted student state for user {user}'
),
error_msg
:
gettext
(
'Failed to delete student state.'
),
delete_module
:
true
});
}
...
...
@@ -93,7 +92,8 @@ var StaffDebug = (function(){
this
.
do_idash_action
({
location
:
locname
,
method
:
'rescore_problem'
,
description
:
gettext
(
'rescored problem'
),
success_msg
:
gettext
(
'Successfully rescored problem for user {user}'
),
error_msg
:
gettext
(
'Failed to rescore problem.'
),
delete_module
:
false
});
}
...
...
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