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
b9056f96
Commit
b9056f96
authored
Jul 13, 2016
by
Cliff Dyer
Committed by
GitHub
Jul 13, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12951 from edx/release
Release
parents
c72d2b56
e6c88a24
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
15 deletions
+48
-15
common/test/acceptance/tests/studio/test_studio_help.py
+3
-0
lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py
+34
-7
lms/djangoapps/course_blocks/transformers/user_partitions.py
+5
-1
lms/static/js/views/fields.js
+5
-4
lms/static/sass/shared/_footer-edx.scss
+0
-2
themes/edx.org/lms/templates/emails/activation_email.txt
+1
-1
No files found.
common/test/acceptance/tests/studio/test_studio_help.py
View file @
b9056f96
...
...
@@ -2,6 +2,8 @@
Test the Studio help links.
"""
from
flaky
import
flaky
from
.base_studio_test
import
StudioCourseTest
from
...pages.studio.index
import
DashboardPage
from
...pages.studio.utils
import
click_studio_help
,
studio_help_links
...
...
@@ -10,6 +12,7 @@ from ...pages.studio.utils import click_studio_help, studio_help_links
class
StudioHelpTest
(
StudioCourseTest
):
"""Tests for Studio help."""
@flaky
# TODO: TNL-4954
def
test_studio_help_links
(
self
):
"""Test that the help links are present and have the correct content."""
page
=
DashboardPage
(
self
.
browser
)
...
...
lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py
View file @
b9056f96
...
...
@@ -5,6 +5,7 @@ Tests for UserPartitionTransformer.
from
collections
import
namedtuple
import
ddt
from
nose.plugins.attrib
import
attr
import
string
from
openedx.core.djangoapps.course_groups.partition_scheme
import
CohortPartitionScheme
from
openedx.core.djangoapps.course_groups.tests.helpers
import
CohortFactory
,
config_course_cohorts
...
...
@@ -25,7 +26,7 @@ class UserPartitionTestMixin(object):
"""
TRANSFORMER_CLASS_TO_TEST
=
UserPartitionTransformer
def
setup_groups_partitions
(
self
,
num_user_partitions
=
1
,
num_groups
=
4
):
def
setup_groups_partitions
(
self
,
num_user_partitions
=
1
,
num_groups
=
4
,
active
=
True
):
"""
Sets up groups and user partitions for testing.
"""
...
...
@@ -42,7 +43,8 @@ class UserPartitionTestMixin(object):
name
=
'Partition '
+
unicode
(
user_partition_num
),
description
=
'This is partition '
+
unicode
(
user_partition_num
),
groups
=
self
.
groups
,
scheme
=
CohortPartitionScheme
scheme
=
CohortPartitionScheme
,
active
=
active
,
)
user_partition
.
scheme
.
name
=
"cohort"
self
.
user_partitions
.
append
(
user_partition
)
...
...
@@ -72,15 +74,16 @@ class UserPartitionTransformerTestCase(UserPartitionTestMixin, CourseStructureTe
"""
UserPartitionTransformer Test
"""
def
set
Up
(
self
):
def
set
up_partitions_and_course
(
self
,
active
=
True
):
"""
Setup course structure and create user for user partition
transformer test.
Args:
active: boolean representing if the user partitions are
active or not
"""
super
(
UserPartitionTransformerTestCase
,
self
)
.
setUp
()
# Set up user partitions and groups.
self
.
setup_groups_partitions
()
self
.
setup_groups_partitions
(
active
=
active
)
self
.
user_partition
=
self
.
user_partitions
[
0
]
# Build course.
...
...
@@ -89,7 +92,9 @@ class UserPartitionTransformerTestCase(UserPartitionTestMixin, CourseStructureTe
self
.
course
=
self
.
blocks
[
'course'
]
# Enroll user in course.
CourseEnrollmentFactory
.
create
(
user
=
self
.
user
,
course_id
=
self
.
course
.
id
,
is_active
=
True
)
CourseEnrollmentFactory
.
create
(
user
=
self
.
user
,
course_id
=
self
.
course
.
id
,
is_active
=
True
)
# Set up cohorts.
self
.
setup_cohorts
(
self
.
course
)
...
...
@@ -199,6 +204,7 @@ class UserPartitionTransformerTestCase(UserPartitionTestMixin, CourseStructureTe
)
@ddt.unpack
def
test_transform
(
self
,
group_id
,
expected_blocks
):
self
.
setup_partitions_and_course
()
if
group_id
:
cohort
=
self
.
partition_cohorts
[
self
.
user_partition
.
id
-
1
][
group_id
-
1
]
add_user_to_cohort
(
cohort
,
self
.
user
.
username
)
...
...
@@ -213,6 +219,27 @@ class UserPartitionTransformerTestCase(UserPartitionTestMixin, CourseStructureTe
self
.
get_block_key_set
(
self
.
blocks
,
*
expected_blocks
)
)
def
test_transform_on_inactive_partition
(
self
):
"""
Tests UserPartitionTransformer for inactive UserPartition.
"""
self
.
setup_partitions_and_course
(
active
=
False
)
# we expect to find all blocks because the UserPartitions are all
# inactive
expected_blocks
=
(
'course'
,)
+
tuple
(
string
.
ascii_uppercase
[:
15
])
trans_block_structure
=
get_course_blocks
(
self
.
user
,
self
.
course
.
location
,
self
.
transformers
,
)
self
.
assertSetEqual
(
set
(
trans_block_structure
.
get_block_keys
()),
self
.
get_block_key_set
(
self
.
blocks
,
*
expected_blocks
)
)
@attr
(
'shard_3'
)
@ddt.ddt
...
...
lms/djangoapps/course_blocks/transformers/user_partitions.py
View file @
b9056f96
...
...
@@ -42,7 +42,11 @@ class UserPartitionTransformer(FilteringTransformerMixin, BlockStructureTransfor
# Because user partitions are course-wide, only store data for
# them on the root block.
root_block
=
block_structure
.
get_xblock
(
block_structure
.
root_block_usage_key
)
user_partitions
=
getattr
(
root_block
,
'user_partitions'
,
[])
or
[]
user_partitions
=
[
user_partition
for
user_partition
in
getattr
(
root_block
,
'user_partitions'
,
[])
if
user_partition
.
active
]
block_structure
.
set_transformer_data
(
cls
,
'user_partitions'
,
user_partitions
)
# If there are no user partitions, this transformation is a
...
...
lms/static/js/views/fields.js
View file @
b9056f96
...
...
@@ -60,7 +60,7 @@
HtmlUtils
.
HTML
(
'<span class="fa fa-plus placeholder" aria-hidden="true"></span><span class="sr">'
),
gettext
(
"Placeholder"
),
HtmlUtils
.
HTML
(
'</span>'
)
)
)
,
},
messages
:
{
...
...
@@ -98,8 +98,8 @@
return
(
this
.
modelValue
()
===
true
);
},
title
:
function
(
t
ext
)
{
return
this
.
$
(
'.u-field-title'
).
text
(
text
);
title
:
function
(
t
itle
)
{
return
HtmlUtils
.
setHtml
(
this
.
$
(
'.u-field-title'
),
title
);
},
getMessage
:
function
(
message_status
)
{
...
...
@@ -528,7 +528,8 @@
placeholderValue
:
this
.
options
.
placeholderValue
}));
this
.
delegateEvents
();
this
.
title
((
this
.
modelValue
()
||
this
.
mode
===
'edit'
)
?
this
.
options
.
title
:
this
.
indicators
[
'plus'
]
+
this
.
options
.
title
);
this
.
title
((
this
.
modelValue
()
||
this
.
mode
===
'edit'
)
?
this
.
options
.
title
:
HtmlUtils
.
joinHtml
(
this
.
indicators
.
plus
,
this
.
options
.
title
));
if
(
this
.
editable
===
'toggle'
)
{
this
.
showCanEditMessage
(
this
.
mode
===
'display'
);
...
...
lms/static/sass/shared/_footer-edx.scss
View file @
b9056f96
...
...
@@ -135,8 +135,6 @@ footer#footer-edx-v3 {
}
.app-link
{
position
:
absolute
;
top
:
0
;
&
:first-of-type
{
@include
left
(
0
);
...
...
themes/edx.org/lms/templates/emails/activation_email.txt
View file @
b9056f96
<%! from django.utils.translation import ugettext as _ %>
${_("Thank you for creating an account with {platform_name}!").format(platform_name=settings.PLATFORM_NAME)}
"There’
s just one more step before you can enroll in a course: "
${_("There'
s just one more step before you can enroll in a course: "
"You need to activate your {platform_name} account. To activate "
"your account, click the following link. If that doesn't work, "
"copy and paste the link into your browser's address bar.").format(
...
...
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