Commit Graph

295 Commits

Author SHA1 Message Date
M. Zulqarnain
41e5403f4e BOM-2369 (D): pyupgrade on contentstore/views (#26767)
* pyupgrade on contentstore/views

* Apply suggestions from code review

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-05 14:55:14 +05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
Michael Terry
74887aa216 feat: turn on schedule creation by default
This commit removes several waffle toggles that have been enabled
on edx.org for years. It's time to remove the rollout gating for
these features and enable them by default.

This doesn't directly change any behavior. But it does create new
database objects by default now and allows for enabling other
schedule based features more easily.

Specifically, the following toggles were affected.

schedules.create_schedules_for_course
- Waffle flag removed as always-enabled
- We now always create a schedule when an enrollment is created

schedules.send_updates_for_course
- Waffle flag removed as always-enabled
- Course update emails are sent as long as the ScheduleConfig
  allows it.
- This is not a change in default behavior, because ScheduleConfig
  is off by default.

dynamic_pacing.studio_course_update
- Waffle switch removed as always-enabled
- Course teams can now always edit course updates directly in Studio

ScheduleConfig.create_schedules
ScheduleConfig.hold_back_ratio
- Model fields for rolling out the schedules feature
- Schedules are now always created
- This commit only removes references to these fields, they still
  exist in the database. A future commit will remove them entirely

This commit also adds a new has_highlights field to CourseOverview.
This is used to cache whether a course has highlights, used to
decide which course update email behavior they get. Previously every
enrollment had to dig into the modulestore to determine that.
2021-02-23 12:34:02 -05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Ned Batchelder
eb82e64b51 Merge pull request #25809 from raccoongang/rg/fix/bookmarks_deletion
In the LMS, bookmarks associated to deleted units are not deleted
2020-12-09 06:19:27 -05:00
Max Sokolski
22a88de1ea In the LMS, bookmarks associated to deleted units are not deleted 2020-12-09 04:51:09 +02:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01: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
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Régis Behmo
87b5463d42 Use SettingDictToggle to document ENTRANCE_EXAMS 2020-10-29 11:11:02 +01:00
Kyle McCormick
a3deb6e317 Sort imports in cms/
Command: `isort --recursive cms/`
2020-10-19 09:34:31 -04:00
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04:00
Feanil Patel
d264490fb7 Merge pull request #24952 from regisb/regisb/simplify-waffle-module-name
[BD-21] Simplify hack to obtain waffle module names
2020-09-15 11:19:43 -04:00
Usman Khalid
8546fa6b6f Convert LibraryContentModule to LibraryContentBlock. (#24611) 2020-09-15 08:41:29 -04:00
Régis Behmo
307457a255 Simplify hack to obtain waffle module names
Instead of going up the stacktrace to find the module names of waffle
flags and switches, we manually pass the module __name__ whenever the
flag is created. This is similar to `logging.getLogger(__name__)`
standard behaviour.

As the waffle classes are used outside of edx-platform, we make the new
module_name argument an optional keyword argument. This will change once
we pull waffle_utils outside of edx-platform.

Note that the module name is normally only required to view the list of
existing waffle flags and switches. The module name should not be
necessary to verify if a flag is enabled. Thus, maybe it would make
sense to create a `add` class methor similar to:

    class WaffleFlag:
        @classmethod
        def add(cls, namespace, flag, module):
            instance = cls(namespace, flag)
            cls._class_instances.add((instance, module))
2020-09-14 09:30:24 +02:00
Sid Verma
99220e0967 Add "Source from library" XBlock
This lets the user import a block from a blockstore-based content library into a (modulestore based) course, by copying the block into the course.
2020-07-24 13:32:37 +05:30
Sid Verma
c609451d2e [BD-14] Limit number of blocks allowed in content libraries (#24276)
* Enforce limit on number of blocks allowed in library (blockstore)

* Enforce limit on number of blocks allowed in library (modulestore)

* Changes from review feedback
2020-07-13 15:49:47 -04:00
Kyle McCormick
4857bd5d1e Disable changing special exam type after release date (#24118)
* Disable changing special exam type after release date

Do some client-side validation to make sure that exams
that *are* or *ever were* special may not be changed
to a special exam type (other than the current one)
after release date.

MST-258

Co-authored-by: Zach Hancock <zhancock@edx.org>
2020-06-11 10:45:04 -04:00
asadazam93
86d7725f26 fixed visibility state for self paced 2020-06-03 14:06:54 +05:00
Kyle McCormick
7e3470db42 Expose was_ever_proctored_exam dict entry on xblock_info (#24040)
In a follow-up PR, this entry will be used to validate
on the client-side that a block that *is* or *ever was*
a proctored/practice/onboarding exam cannot be configured
as a different proctored/practice/onboarding exam, as that
has led to problematic exam configuration states between
edX and proctoring providers.

MST-258
2020-06-02 09:44:12 -04:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +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
atesker
e0d57fe1a7 EDUCATOR-4846 - added team config service for xblocks.
Quality / encoding

Remove comments

remove debug

Changed service implementation to make unit testing easier

Corrected service

code style

unit test cleanup

Clean up imports
2019-12-20 09:57:30 -05:00
Feanil Patel
3fe207f9f1 Make sure the content is a string for json response. 2019-12-18 11:47:29 -05:00
Dave St.Germain
3e73ba3879 TNL-6929:
Improves navigation within Studio for Learning Sequences, speeding up authors who want to see how a learner progresses through content without needing to jump over to the LMS.

This adds a dropdown section navigator to the breadcrumbs on the unit page and copies the sequence navigator from LMS to the studio unit page.
2019-11-07 09:13:00 -05:00
Ayub khan
b3c062be1b BOM-848 Different Hash Values
hashlib produces different md5 hash in python3 against same values as
compared to python2.
2019-10-21 14:02:49 +05:00
aarif
9301ec38f3 python 3 fixes 2019-09-12 17:29:34 +05:00
Ayub khan
588243f959 BOM-371
py3 test fix
2019-08-28 16:32:39 +05:00
arbisoft
bf6cbe7f6b BOM-356
None type comparison with int was not working in python3.
There was an issue with previous condition also. with Nonetype it was not coming into error part.
2019-08-24 02:47:24 +05:00
Feanil Patel
3c33f6c30f Fix another quality issue. 2019-08-21 07:44:06 -04:00
Dave St.Germain
3bb7d0f61a unicode -> text_type 2019-08-19 16:42:20 -04:00
atesker
817de2b215 Potential fix for review rules - EDUCATOR-4262 2019-06-10 10:56:13 -04:00
atesker
6ed1bb72cc Potential fix for review rules - EDUCATOR-4262 2019-06-10 09:54:11 -04:00
atesker
b5acb55dcc Potential fix for review rules - EDUCATOR-4262 2019-06-10 09:32:22 -04:00
atesker
5eeb423372 waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py
Updated JS UT and acceptance

Move common/djangoapps/enrollment to openedx/core/djangoapps/enrollments

Fix Pylint for enrollments

README for enrollments app

Move command arguments to common settings

Move command parameter arguments, resend-days and days-range, to
common settings. This will help in creating a consistency when the
default values are changed in the future.

LEARNER-7313

Bumped edx-enterprise version and added cornerstone app

Updating Bokchoy testing database cache (#20713)

complete waiting enrollments. fixed

Remove microsites from user_authn
DEPR-30

Remove microsites from certificates
DEPR-26

Remove microsites from shoppingcart
DEPR-27

Updating Bokchoy testing database cache (#20715)

add arch decision of computation of course-user discount

Mark missing string for internationalization

Remove microsites from static_template_view
DEPR-28

README for commerce and shoppingcart

README for certificates

README for course_experience

geoip2: update maxmind geolite country database

user existence check updated to use email only

Bumped edx-when

Use our fork of this repo instead of the mitocw one.

Make platform bootstrap footer match other footer

Changes:
- Add logo back
- Fix up spacing
- Change font sizes and color

Mark alt text for translation

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py
Updated JS UT and acceptance

Move common/djangoapps/enrollment to openedx/core/djangoapps/enrollments

Fix Pylint for enrollments

README for enrollments app

Move command arguments to common settings

Move command parameter arguments, resend-days and days-range, to
common settings. This will help in creating a consistency when the
default values are changed in the future.

LEARNER-7313

Bumped edx-enterprise version and added cornerstone app

Updating Bokchoy testing database cache (#20713)

complete waiting enrollments. fixed

Remove microsites from user_authn
DEPR-30

Remove microsites from certificates
DEPR-26

Remove microsites from shoppingcart
DEPR-27

Updating Bokchoy testing database cache (#20715)

add arch decision of computation of course-user discount

Mark missing string for internationalization

Remove microsites from static_template_view
DEPR-28

README for commerce and shoppingcart

README for certificates

README for course_experience

geoip2: update maxmind geolite country database

user existence check updated to use email only

Bumped edx-when

Use our fork of this repo instead of the mitocw one.

Make platform bootstrap footer match other footer

Changes:
- Add logo back
- Fix up spacing
- Change font sizes and color

Mark alt text for translation
2019-05-31 10:01:51 -04:00
Michael Roytman
af319f3c9a Update version of edx-proctoring and update copy to refer to onboarding exams in Studio for proctoring backends that support onboarding exams. 2019-02-07 14:29:26 -05:00
Matthew Piatetsky
7df30938c4 fix unicode strings in cms/ 2019-02-04 13:01:51 -05:00
Michael Roytman
f3888c0020 add a proctoring settings button to course outline in Studio for each proctored subsection for a course using a provider that supports a dashboard 2019-01-16 11:29:27 -05:00
Diana Huang
6572d99e76 Remove all references to datadog from our code. 2019-01-08 15:41:24 -05:00
Gavin Sidebottom
3dad2be55d Refactored XBlockAside rendering and added support for student view 2018-12-11 12:27:03 +05:00
DawoudSheraz
05663098fd EDUCATOR-3140 prevent saving pre-1900 subsection due dates 2018-12-04 10:19:06 +05:00
Ned Batchelder
6f0b007ae3 Remove a mistaken trailing comma 2018-11-02 06:19:45 -04:00
Jeremy Bowman
68902a2f3f TE-2689 Remove useless pylint suppressions part 3 2018-08-16 09:57:01 -04:00
Zia Fazal
53cf5638b6 added radio input fields to pre-requisite selection
Initial changes to gate section based on completion percentage

code refactoring and added evaluation of completion milestone

Fixed broken unit tests and added new tests

Fixed broken tests and quality violations

Fixed Pep8 violation

Fixed eslint quality violations

Test changes as suggested by reviewer

changes after feedbacy from reviewer

Update the docstring with suggested changes

excluding chapter from the blocks

Disallow empty values for min score and min completion

Changes afte feedback from UX/Accessibility

removed blank line
2018-05-30 11:25:59 +05:00
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
Jeremy Bowman
113e8dde61 PLAT-1885 Stop using deprecated BlockUsageLocator properties 2018-01-12 16:40:21 -05:00
Jeremy Bowman
f8e5e38cc4 PLAT-1884 Replace deprecated xblock.fragment usage 2018-01-11 14:20:12 -05:00
Tyler Hallada
9f74e70589 Course Highlights Setting in Studio Course Outline
fixup! trying to "fix" underscore syntax error

add cancel modal test

Fix quality issues.

Apply Nimisha's suggestions for my quality fixes.

Skip test_drop_unit_in_collapsed_subsection

Fix quality error
2017-11-27 17:23:55 -05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00