Commit Graph

68 Commits

Author SHA1 Message Date
Dillon Dumesnil
1614fb2956 fix: AA-724: Updating the HiddenContentTransformer
We heard about a bug where learners granted extensions would still
lose access to content if it was marked as "hidden after due date".
This was caused by the HiddenContentTransformer using the due date
from collection time (publish time) rather than the user date returned
from the edx-when DateOverrideTransformer.

A small subtletly of these PRs is that Transformers with the
FilteringTransformerMixin are executed before those without it so
part of the fix was to make the HiddenContentTransformer not use the
FilteringTransformerMixin to ensure the DateOverrideTransformer had
run first.

Part 2/3 - Updating transform method + updating Read version
2021-03-26 14:05:53 -07:00
usamasadiq
3d1f3cea64 Ran pyupgrade on lms/djangoapps/course_blocks
Ran pyupgrade on lms/djangoapps/course_goals
Ran pyugprade on lms/djangoapps/course_home_api
2021-02-19 16:29:52 +05:00
Aarif
d2a147bb47 replaced unittest assertions pytest assertions (#26542) 2021-02-18 19:14:41 +05:00
M. Zulqarnain
a5f6f682ee added pylint amnesty for bulk_enroll and course apps (#26246) 2021-02-01 13:58:59 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Guruprasad Lakshmi Narayanan
149ebfec58 Fix the order randomization behaviour of Randomized Content Block
The Randomized Content Block XBlock only randomizes the selection of
the children blocks and has unpredictable randomization of
the order of the selected child blocks due to the usage of sets, which
are unordered, for storing the selected blocks. This becomes apparent
when all the available child blocks in a library are chosen for a
Randomized Content Block, to randomize just the order of the child
blocks and not just the selection of the blocks. The order of the
selected blocks ends up being similar for multiple learners.

This change modifies the XBlock to store the selected child blocks in
a list, instead of a set, after randomly shuffling them.

A new block structure transformer, ContentLibraryOrderTransformer has
been added to transform the order of the selected children XBlocks to
match the order of the selections made in the
ContentLibraryTransformer. This ensures that same correct randomized order
of blocks is also returned by the course blocks API.
2020-08-11 11:46:49 -04:00
David Ormsbee
4f3a45f444 Revert "[BB-112] Fix the unpredictable order randomization issue with randomized content blocks" 2020-06-08 16:47:35 -04:00
Guruprasad Lakshmi Narayanan
c739151a27 Select children again when current children don't match the selections
This prevents errors when the current children do not match the
selected children any more.
2020-05-20 13:07:57 +05:30
Guruprasad Lakshmi Narayanan
5a2b607ea6 Fix the order randomization behaviour of Randomized Content Block
The Randomized Content Block XBlock only randomizes the selection of
the children blocks and has unpredictable randomization of
the order of the selected child blocks due to the usage of sets, which
are unordered, for storing the selected blocks. This becomes apparent
when all the available child blocks in a library are chosen for a
Randomized Content Block, to randomize just the order of the child
blocks and not just the selection of the blocks. The order of the
selected blocks ends up being similar for multiple learners.

This change modifies the XBlock to store the selected child blocks in
a list, instead of a set, after randomly shuffling them.
2020-05-20 13:07:57 +05:30
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
David Ormsbee
b1f3d2cef2 Revert "Fix the unpredictable order randomization issue with randomized content blocks" 2019-07-25 13:42:20 -04:00
Guruprasad Lakshmi Narayanan
d7647c66e3 Select children again when current children don't match the selections
This prevents errors when the current children do not match the
selected children any more.
2019-07-25 00:58:11 +05:30
Guruprasad Lakshmi Narayanan
df4aee23b9 Fix the order randomization behaviour of Randomized Content Block
The Randomized Content Block XBlock only randomizes the selection of
the children blocks and has unpredictable randomization of
the order of the selected child blocks due to the usage of sets, which
are unordered, for storing the selected blocks. This becomes apparent
when all the available child blocks in a library are chosen for a
Randomized Content Block, to randomize just the order of the child
blocks and not just the selection of the blocks. The order of the
selected blocks ends up being similar for multiple learners.

This change modifies the XBlock to store the selected child blocks in
a list, instead of a set, after randomly shuffling them.
2019-07-25 00:58:11 +05:30
DawoudSheraz
b37e679c39 remove staff exemption from the library_content transformer 2019-06-24 11:05:11 +05:00
Stu Young
1b2f061b73 incr-299 (#20628)
* run python modernize
* run isort
2019-05-15 21:08:02 -04:00
David Ormsbee
d2af1d4c5b Revert "Fix the unpredictable order randomization issue with randomized content blocks" 2019-05-08 12:42:44 -04:00
Guruprasad Lakshmi Narayanan
73ab30e342 Fix the order randomization behaviour of Randomized Content Block
The Randomized Content Block XBlock only randomizes the selection of
the children blocks and has unpredictable randomization of
the order of the selected child blocks due to the usage of sets, which
are unordered, for storing the selected blocks. This becomes apparent
when all the available child blocks in a library are chosen for a
Randomized Content Block, to randomize just the order of the child
blocks and not just the selection of the blocks. The order of the
selected blocks ends up being similar for multiple learners.

This change modifies the XBlock to store the selected child blocks in
a list, instead of a set, after randomly shuffling them.
2019-04-25 10:23:46 +05:30
Matthew Piatetsky
1f6cd7aa5a Revert "Revert "REVMI-62 Return gated blocks in the course blocks API response with an authorization denial reason"" 2019-03-28 14:44:05 -04:00
Matthew Piatetsky
8eae694566 Revert "REVMI-62 Return gated blocks in the course blocks API response with an authorization denial reason" 2019-03-27 16:30:37 -04:00
Matthew Piatetsky
4bb539c9aa update user partition and access_denied_message_filter transformers 2019-03-26 15:26:59 -04:00
DawoudSheraz
24d63f25ce add staff exemption for content access in library access 2019-02-18 12:17:19 +05:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Cali Stenson
4dcda2858e Add group partitions information to user metadata in the dom.
This information will inform our A/B testing and experiments.

REV-612
2018-11-16 16:34:17 -05:00
Ned Batchelder
59d78031d8 Fix trailing-comma-tuple warnings 2018-11-02 11:06:59 -04:00
J Eskew
0e76d04819 Merge pull request #17682 from mitodl/fix_overrideing_due_date_issue
Fixed override due date by limiting scope to selected users
2018-10-12 17:37:32 -04:00
Calen Pennington
72f556c1a9 Import courseware module from fully-qualified module name 2018-10-10 15:34:33 -04:00
Ned Batchelder
93d4af35bd No need for superstitious kwargs 2018-09-17 17:01:11 -04:00
Jeremy Bowman
1a5bf35357 TE-2689 Remove useless pylint suppressions part 2 2018-08-14 17:39:02 -04:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
Amir Qayyum Khan
5ae5a531f4 Fixed override due date by limiting scope to selected users
Added selected user tests

updated my email
2018-07-19 14:25:34 +05:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Amir Qayyum Khan
aa6f88382d Fixed edX block structure api to load override data 2018-02-16 11:10:17 +05:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
John Eskew
3b57542ab0 Revert "Merge pull request #15170 from edx/jeskew/PLAT_1316_partitions_inheritance"
This reverts commit f97f052591, reversing
changes made to 800bcd8e20.
2017-05-30 12:42:54 -04:00
John Eskew
76389d8678 Run all files touched in inheritance/partition work through isort. 2017-05-25 13:24:08 -04:00
John Eskew
66f3aa5ccf Move fields.py, inheritance.py, and partitions to openedx/core. 2017-05-25 13:24:08 -04:00
Nimisha Asthagiri
00d466224e Consolidate Block Structure folders
TNL-6518
2017-03-01 21:19:28 -05:00
Nimisha Asthagiri
b99e9ae252 Block Transformers: Transformers Version Hash
TNL-6519
2017-02-14 11:34:29 -05:00
Nimisha Asthagiri
b90c21b138 Ensure selected blocks get saved into StudentModule when running
transform phase

TNL-6198
2016-12-21 15:58:41 -05:00
Eric Fischer
31953c5e0c Update correct persistent score
* First take at forcing a subsection's grade to update when a signal is
  sent that a problem's score has changed
* Refactor signal handler connection.
* Expand bokchoy tests to cover progress page
* Add some grading unit tests

TNL-5394
TNL-5364
2016-09-08 15:09:05 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Nimisha Asthagiri
9616ac99f8 Expose course_version from Split Modulestore;
Support subtree_edited_on and course_version fields in BlockStructures
TNL-5010
2016-07-26 13:40:53 -04:00
Nimisha Asthagiri
37b8e6360c HiddenContentTransformer to check for hide_after_due 2016-07-19 21:13:14 -04:00
Qubad786
92ed01ef4f filter inactive user partitions in user partition transformer. 2016-07-05 16:34:23 -04:00