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
5d4e84eb
Commit
5d4e84eb
authored
Feb 13, 2015
by
Muzaffar yousaf
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6984 from edx/muzaffar/studio-group-config-tnl1446
Applying unicode to the content experiment display name.
parents
29c769bc
bff20557
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
3 deletions
+34
-3
cms/djangoapps/contentstore/views/course.py
+1
-1
cms/djangoapps/contentstore/views/tests/test_group_configurations.py
+33
-2
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
5d4e84eb
...
@@ -1460,7 +1460,7 @@ class GroupConfiguration(object):
...
@@ -1460,7 +1460,7 @@ class GroupConfiguration(object):
validation_summary
=
split_test
.
general_validation_message
()
validation_summary
=
split_test
.
general_validation_message
()
usage_info
[
split_test
.
user_partition_id
]
.
append
({
usage_info
[
split_test
.
user_partition_id
]
.
append
({
'label'
:
'{} / {}'
.
format
(
unit
.
display_name
,
split_test
.
display_name
),
'label'
:
u"{} / {}"
.
format
(
unit
.
display_name
,
split_test
.
display_name
),
'url'
:
unit_url
,
'url'
:
unit_url
,
'validation'
:
validation_summary
.
to_json
()
if
validation_summary
else
None
,
'validation'
:
validation_summary
.
to_json
()
if
validation_summary
else
None
,
})
})
...
...
cms/djangoapps/contentstore/views/tests/test_group_configurations.py
View file @
5d4e84eb
#-*- coding: utf-8 -*-
"""
"""
Group Configuration Tests.
Group Configuration Tests.
"""
"""
...
@@ -35,7 +36,7 @@ class HelperMethods(object):
...
@@ -35,7 +36,7 @@ class HelperMethods(object):
"""
"""
Mixin that provides useful methods for Group Configuration tests.
Mixin that provides useful methods for Group Configuration tests.
"""
"""
def
_create_content_experiment
(
self
,
cid
=-
1
,
name_suffix
=
''
):
def
_create_content_experiment
(
self
,
cid
=-
1
,
name_suffix
=
''
,
special_characters
=
''
):
"""
"""
Create content experiment.
Create content experiment.
...
@@ -53,7 +54,7 @@ class HelperMethods(object):
...
@@ -53,7 +54,7 @@ class HelperMethods(object):
category
=
'split_test'
,
category
=
'split_test'
,
parent_location
=
vertical
.
location
,
parent_location
=
vertical
.
location
,
user_partition_id
=
cid
,
user_partition_id
=
cid
,
display_name
=
'Test Content Experiment {}'
.
format
(
name_suffix
),
display_name
=
u"Test Content Experiment {}{}"
.
format
(
name_suffix
,
special_characters
),
group_id_to_child
=
{
"0"
:
c0_url
,
"1"
:
c1_url
,
"2"
:
c2_url
}
group_id_to_child
=
{
"0"
:
c0_url
,
"1"
:
c1_url
,
"2"
:
c2_url
}
)
)
ItemFactory
.
create
(
ItemFactory
.
create
(
...
@@ -491,6 +492,36 @@ class GroupConfigurationsUsageInfoTestCase(CourseTestCase, HelperMethods):
...
@@ -491,6 +492,36 @@ class GroupConfigurationsUsageInfoTestCase(CourseTestCase, HelperMethods):
self
.
assertEqual
(
actual
,
expected
)
self
.
assertEqual
(
actual
,
expected
)
def
test_can_get_usage_info_when_special_characters_are_used
(
self
):
"""
Test if group configurations json updated successfully when special
characters are being used in content experiment
"""
self
.
_add_user_partitions
(
count
=
1
)
vertical
,
__
=
self
.
_create_content_experiment
(
cid
=
0
,
name_suffix
=
'0'
,
special_characters
=
u"JOSÉ ANDRÉS"
)
actual
=
GroupConfiguration
.
get_split_test_partitions_with_usage
(
self
.
course
,
self
.
store
)
expected
=
[{
'id'
:
0
,
'name'
:
'Name 0'
,
'scheme'
:
'random'
,
'description'
:
'Description 0'
,
'version'
:
UserPartition
.
VERSION
,
'groups'
:
[
{
'id'
:
0
,
'name'
:
'Group A'
,
'version'
:
1
},
{
'id'
:
1
,
'name'
:
'Group B'
,
'version'
:
1
},
{
'id'
:
2
,
'name'
:
'Group C'
,
'version'
:
1
},
],
'usage'
:
[{
'url'
:
'/container/{}'
.
format
(
vertical
.
location
),
'label'
:
u"Test Unit 0 / Test Content Experiment 0JOSÉ ANDRÉS"
,
'validation'
:
None
,
}],
}]
self
.
assertEqual
(
actual
,
expected
)
def
test_can_use_one_configuration_in_multiple_experiments
(
self
):
def
test_can_use_one_configuration_in_multiple_experiments
(
self
):
"""
"""
Test if multiple experiments are present in usage info when they use same
Test if multiple experiments are present in usage info when they use same
...
...
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