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
52156893
Commit
52156893
authored
Nov 13, 2015
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MA-1624 Unit tests for User Partition Transformer.
parent
222bdd98
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py
+0
-0
lms/djangoapps/course_blocks/transformers/user_partitions.py
+9
-7
No files found.
lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py
View file @
52156893
This diff is collapsed.
Click to expand it.
lms/djangoapps/course_blocks/transformers/user_partitions.py
View file @
52156893
...
...
@@ -161,19 +161,21 @@ class _MergedGroupAccess(object):
for
merged_parent_access
in
merged_parent_access_list
:
# pylint: disable=protected-access
if
partition
.
id
in
merged_parent_access
.
_access
:
# Since this parent has group access
restrictions,
#
merge it with the running list of
# parent-introduced restrictions.
# Since this parent has group access
#
restrictions, merge it with the running list
#
of
parent-introduced restrictions.
merged_parent_group_ids
.
update
(
merged_parent_access
.
_access
[
partition
.
id
])
else
:
# Since at least one parent chain has no group
# access restrictions for this partition, allow
# unfettered group access or this partition.
# Since this parent chain has no group access
# restrictions for this partition, allow
# unfettered group access for this partition
# and don't bother checking the rest of the
# parents.
merged_parent_group_ids
=
None
break
# Group access for this partition as stored on the xblock
xblock_partition_access
=
set
(
xblock_group_access
.
get
(
partition
.
id
,
[])
)
or
None
xblock_partition_access
=
set
(
xblock_group_access
.
get
(
partition
.
id
)
or
[]
)
or
None
# Compute this block's access by intersecting the block's
# own access with the merged access from its parent chains.
...
...
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