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
4381ccd4
Commit
4381ccd4
authored
Jan 15, 2015
by
Adam Palay
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release' into merge-release-into-master
parents
adc64122
c281096f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
lms/djangoapps/instructor_task/tasks_helper.py
+1
-2
lms/djangoapps/instructor_task/tests/test_tasks_helper.py
+17
-0
lms/templates/shoppingcart/receipt.html
+3
-0
No files found.
lms/djangoapps/instructor_task/tasks_helper.py
View file @
4381ccd4
...
...
@@ -572,8 +572,7 @@ def upload_grades_csv(_xmodule_instance_args, _entry_id, course_id, _task_input,
# We were able to successfully grade this student for this course.
task_progress
.
succeeded
+=
1
if
not
header
:
# Encode the header row in utf-8 encoding in case there are unicode characters
header
=
[
section
[
'label'
]
.
encode
(
'utf-8'
)
for
section
in
gradeset
[
u'section_breakdown'
]]
header
=
[
section
[
'label'
]
for
section
in
gradeset
[
u'section_breakdown'
]]
rows
.
append
(
[
"id"
,
"email"
,
"username"
,
"grade"
]
+
header
+
cohorts_header
+
group_configs_header
)
...
...
lms/djangoapps/instructor_task/tests/test_tasks_helper.py
View file @
4381ccd4
...
...
@@ -139,6 +139,23 @@ class TestInstructorGradeReport(TestReportMixin, InstructorTaskCourseTestCase):
_groups
=
[
group
.
name
for
group
in
self
.
course
.
user_partitions
[
0
]
.
groups
]
self
.
assertEqual
(
_groups
,
user_groups
)
@patch
(
'instructor_task.tasks_helper._get_current_task'
)
@patch
(
'instructor_task.tasks_helper.iterate_grades_for'
)
def
test_unicode_in_csv_header
(
self
,
mock_iterate_grades_for
,
_mock_current_task
):
"""
Tests that CSV grade report works if unicode in headers.
"""
# mock a response from `iterate_grades_for`
mock_iterate_grades_for
.
return_value
=
[
(
self
.
create_student
(
'username'
,
'student@example.com'
),
{
'section_breakdown'
:
[{
'label'
:
u'
\u8282\u540e\u9898
01'
}],
'percent'
:
0
},
'Cannot grade student'
)
]
result
=
upload_grades_csv
(
None
,
None
,
self
.
course
.
id
,
None
,
'graded'
)
self
.
assertDictContainsSubset
({
'attempted'
:
1
,
'succeeded'
:
1
,
'failed'
:
0
},
result
)
@ddt.ddt
class
TestStudentReport
(
TestReportMixin
,
InstructorTaskCourseTestCase
):
...
...
lms/templates/shoppingcart/receipt.html
View file @
4381ccd4
...
...
@@ -5,6 +5,7 @@ from django.utils.translation import ungettext
from
django
.
core
.
urlresolvers
import
reverse
from
courseware
.
courses
import
course_image_url
,
get_course_about_section
,
get_course_by_id
%
>
<
%!
from
microsite_configuration
import
microsite
%
>
<
%
block
name=
"billing_details_highlight"
>
% if order_type == 'business':
...
...
@@ -371,6 +372,8 @@ from courseware.courses import course_image_url, get_course_about_section, get_c
<span
class=
"pull-right"
>
${_("Total")}:
<b>
${currency_symbol}${"{0:0.2f}".format(order.total_cost)} ${currency.upper()}
</b></span>
</div>
</div>
## Allow for a microsite to be able to insert additional text at the bottom of the page
<
%
include
file=
"${microsite.get_template_path('receipt_custom_pane.html')}"
/>
</section>
</div>
</
%
block>
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