Commit Graph

19113 Commits

Author SHA1 Message Date
Farhaan Bukhsh
48ad7effb1 feat: grant course/library creation rights by organization (#26616)
Current State (before this commit):

  Studio, as of today doesn't have a way to restrict a user to
  create a course in a particular organization. What Studio
  provides right now is a CourseCreator permission which gives
  an Admin the power to grant a user the permission to create
  a course.

  For example: If the Admin has given a user Spiderman the
  permission to create courses, Spiderman can now create courses
  in any organization i.e Marvel as well as DC.
  There is no way to restrict Spiderman from creating courses
  under DC.

Purpose of this commit:

  The changes done here gives Admin the ability to restrict a
  user on an Organization level from creating courses via the
  Course Creators section of the Studio Django administration
  panel.

  For example: Now, the Admin can give the user Spiderman the
  privilege of creating courses only under Marvel organization.
  The moment Spiderman tries to create a course under some
  other organization(i.e DC), Studio will show an error message.

  This change is available to all Studio instances that
  enable the FEATURES['ENABLE_CREATOR_GROUP'] flag.
  Regardless of the flag, it will not affect any instances that choose
  not to use it.

BB-3622
2021-09-10 12:43:26 -04:00
Michael Terry
d5bacad86f Merge pull request #28698 from edx/mikix/hide-after-due-mfe
feat: notify MFE when a sequence is hidden-after-due
2021-09-10 09:12:57 -04:00
Michael Terry
cd7d13cd6d feat: notify MFE when a sequence is hidden-after-due
Currently, if a learner manually loads a sequence page that would
normally be skipped for them because it is hidden-after-due, the
sequence renders anyway.

This commit tells the frontend when it should not show a sequence
because it's hidden.

AA-1000
2021-09-09 14:43:00 -04:00
edX Transifex Bot
58d6173479 geoip2: update maxmind geolite country database 2021-09-09 02:09:25 +05:00
Bianca Severino
bdc8653cca fix: use pending name change in IDV post_save signal 2021-09-08 12:25:29 -04:00
Zainab Amir
bf76fb3f7f move send_activation_email celery task (#28666)
- moved send_activation_email to user_authn app
- registered task under both new and old name
- exposed the old name for task invocation

VAN-417
2021-09-08 10:44:54 +05:00
Jawayria
e6ce376105 Merge pull request #28654 from edx/jawayria/bom-2766
chore: Removed django.utils.six as not supported in Django3
2021-09-07 18:06:53 +05:00
Syed Muhammad Dawoud Sheraz Ali
ea6cd613fd Merge pull request #28643 from edx/dsheraz/PROD-2447
refactor: move course location util to common djangoapp instead of xm…
2021-09-03 19:28:26 +05:00
Jawayria
506d61101f chore: Removed django.utils.six as not supported in Django3 2021-09-03 19:18:36 +05:00
Usama Sadiq
d075fc8033 fix: remove the created flag for user profile creation (#28645) 2021-09-03 16:29:00 +05:00
DawoudSheraz
e986d360c9 refactor: move course location util to common djangoapp instead of xmodule 2021-09-03 12:40:28 +05:00
Bianca Severino
2497adf22b Merge pull request #28546 from edx/bseverino/pending-name-change
[MST-803] Update account API to allow pending name changes
2021-09-02 14:45:00 -04:00
mariagrimaldi
c0618592d2 feat: add 1st batch of Open edX events
* Add STUDENT_REGISTRATION_COMPLETED event after the user's registration
* Add SESSION_LOGIN_COMPLETED event after the user's login session
* Add COURSE_ENROLLMENT_CREATED event after the user's enrollment creation
2021-09-02 10:05:23 -04:00
Mahyar Damavand
4efa9b5590 fix: log a single line warning in case of video_transcrip NotFound instead of long detailed exception (#28552) 2021-09-02 07:14:20 -04:00
Usama Sadiq
fe20509d4e fix: Remove deprecated django.utils.decorator.available_attrs (#28597) 2021-09-02 12:12:01 +05:00
edX Transifex Bot
5b6e79b671 geoip2: update maxmind geolite country database 2021-09-02 02:09:23 +05:00
Bianca Severino
65905a01ec feat: update account API to allow pending name changes 2021-09-01 11:26:43 -04:00
Jhony Avella
95a6abcd1f revert: removing read_committed argument from outer_atomic function (#28161)
In the PR https://github.com/edx/edx-platform/pull/10659 the outer_atomic decorator/context manager was created to prevent nested atomic blocks. This method received a boolean parameter read_committed to enforce read-committed MySQL isolation level. From Django 2, the default isolation level Django sets is read-committed, so the aforementioned parameter for outer_atomic can be removed
2021-08-31 16:39:35 -04:00
Felipe Montoya
6e48ffd9f6 Merge pull request #28547 from eduNEXT/MJG/fix_missing_profile_for_tests
refactor: replace User.objects.create_user for UserFactory p2
2021-08-30 10:33:29 -05:00
Maria Grimaldi
54627e1101 refactor: replace User for UserFactory and its methods
This change is done so the profile is automatically created for tests users
2021-08-30 11:03:49 -04:00
Régis Behmo
6b1700803c fix: Milestones app feature flag docs
The feature flag that should be set is not ENABLE_MILESTONES_APP but
MILESTONES_APP.
2021-08-30 16:40:48 +02:00
David Ormsbee
8b17afc818 fix: prefer HTML5 video when youtube support is deprecated.
In the case where a server/course has both:

* YouTube deprecated (waffle flag: videos.deprecate_youtube = True)
* HLS enabled (ConfigModel: HLSPlaybackEnabledFlag, in video_config)

Prior to this commit, we would prefer the HLS source if one of the
HTML5 video sources specified a .m3u8 file. However it looks like this
file isn't always guaranteed to be produced.

This fix always prefers HTML5 video sources to YouTube if the server or
course is configured to deprecate YouTube, as long as at least one
non-YouTube source is found. TNL-8594.

Note that this may confuse users because we're essentially bypassing
their Studio-specified preferred primary source with a server-wide
setting.
2021-08-30 10:12:12 -04:00
Usama Sadiq
cde050618e build: Moved user and group management commands and unit tests to edx-django-utils
- Removed manage_user and manage_group commands and their unit tests from edx-platform and added then to edx-django-utils.
- Modified User.post_save signal to ensure the user profile is created when manage_user management command is run to create a user.
- Added edx-django-utils to INSTALLED_APPS for LMS and Studio.
- Moved generate_password from openedx.core.djangoapps.user_authn.utils to edx_django_utils.user along with its unit test.
2021-08-30 12:03:37 +05:00
julianajlk
646245508a fix: format audit deadline in Track Selection (#28558)
REV-2133
2021-08-27 13:45:03 -04:00
edX Transifex Bot
83e2d46dc9 geoip2: update maxmind geolite country database 2021-08-26 02:04:21 +05:00
julianajlk
f427828361 Update waffle flag for Value Prop Track Selection (#28536)
REV-2133
2021-08-25 13:26:40 -04:00
Maria Grimaldi
2ee52ea96c refactor: replace some create_user with UserFactory to avoid non-existent profile errors 2021-08-24 15:49:21 -04:00
julianajlk
572965b742 Add waffle flag settings for new Track Selection template (#28523)
REV-2133
2021-08-24 13:02:30 -04:00
alangsto
6fa89e610a fix: Allow masquerading users to see content (#28458)
If a user with staff access is masquerading as a specific student, they should be able to see content that would normally be gated for that student.
2021-08-24 09:14:01 -04:00
Azan Bin Zahid
1cce2e952d feat: add pact verification method 2021-08-24 14:59:46 +05:00
julianajlk
32d17c8810 Add audit_access_deadline to context and connect Value Prop Track Selection template (#28373)
REV-2133
2021-08-20 15:36:18 -04:00
edX cache uploader bot
f7d41c4afc Updating Bokchoy testing database cache (#28493) 2021-08-20 20:50:56 +05:00
edX Transifex Bot
d66d544ca2 geoip2: update maxmind geolite country database 2021-08-19 02:14:22 +05:00
Andy Shultz
97a5094efc chore: bump name affirmation to complete column removal
This is the last PR removing verified name is_verified,
so we can bring back the test.
2021-08-18 12:49:01 -04:00
Andy Shultz
9e05538573 chore: update 2/3 of proctoring library for is_verified removal
This update removes the field, but not yet the column, so it
includes the test skip.

MST-969
2021-08-18 09:31:52 -04:00
Michael Terry
012ffc3969 Merge pull request #28462 from edx/mikix/banner-style
fix: modernize look of in-xblock shift-dates banner
2021-08-16 09:51:53 -04:00
Michael Terry
033497d1d7 fix: modernize look of in-xblock shift-dates banner
Specifically, use our standard warning-banner colors and add a
drop shadow. Also, updates the text to match the text used
elsewhere.

AA-835
2021-08-16 09:18:05 -04:00
kenclary
a201a36726 Merge pull request #28447 from edx/TNL-7752-b
feat: add explicit courserun_key parameter to /event endpoint
2021-08-13 11:02:31 -04:00
edX Transifex Bot
259a3b5cd1 geoip2: update maxmind geolite country database 2021-08-12 02:14:24 +05:00
Ken Clary
8c8450f6dc feat: add explicit courserun_key parameter to /event endpoint
We add 'courserun_key' (aka "course_id" though that's technically a
misnomer) as an optional parameter to the /event endpoint url. If it
is not present, it will still be parsed out of the url, if the url is
of the right format.

Additionally, Logger.log() in js adds this parameter to its /event
call, pulling it from the $$course_id global.

This provides opportunity for MFEs to (separately) provide the key
without concern about url parsing.

TNL-7752
2021-08-11 14:40:25 -04:00
Thomas Tracy
af82c6270a MB-1192: [feat] Add course ended, not passing (#28438)
* MB-1192: [feat] Add course ended, not passing

If a student has not passed a course, the course has ended, and they have a verified seat, we want to show them a message at a glance on the
dashboard.
2021-08-11 11:35:15 -04:00
Matt Tuchfarber
d53d8e45a5 refactor: Merge the openedx certs app with lms one (#28435)
* refactor: Merge the openedx certs app with lms one

Move the certs API from openedx into the lms certificates app.
Functionally, this is a no-op. Cleanup will happen in a subsequent
commit. This is simply a move.
2021-08-11 10:25:55 -04:00
Christie Rice
cf3a6c16d6 fix: Stop showing course certificate buttons to beta testers (#28416)
Beta testers can’t earn course certificates, so they should not see a “Request Certificate” button or other info describing how they can earn a cert.

MICROBA-992
2021-08-10 09:06:14 -04:00
Robert Raposa
036a1a835c Revert "MB-1192: [feat] Add course ended, not passing certificate status to dashboard messaging (#28405)" (#28426)
This reverts commit 35d9330c19.
2021-08-09 12:38:14 -04:00
Thomas Tracy
35d9330c19 MB-1192: [feat] Add course ended, not passing certificate status to dashboard messaging (#28405)
* [feat] Add course over, not passing status to dash

If a student has not passed a course, the course has ended, and they
have a verified seat, we want to show them a message at a glance on the
dashboard.
2021-08-09 10:03:49 -04:00
Manjinder Singh
f7c5a109d4 Revert "feat: add explicit courserun_key parameter to /event endpoint" (#28410) 2021-08-05 18:05:20 -04:00
Braden MacDonald
da09bcadc5 refactor: run modulestore tests in common/lib/... using Django
Does 3 things:
(1) Use django for modulestore tests
(2) Use normal LMS settings for modulestore tests instead of openedx/tests/settings.py
(3) Simplify some TestCase subclasses by converting them to use ModuleStoreTestCase


Details and rationale:

(1) Currently parts of the modulestore test suite are designed to run "without django", although there is still a lot of django functionality imported at times, and many of the tests do in fact use django. But for the upcoming PR #27565 (moving split's course indexes from MongoDB to MySQL), we will need to always have Django enabled. So this commit paves the way for that change.

(2) The previous tests that did use Django used a special settings file, openedx/tests/settings.py which made some debugging confusing because those tests had quite different django settings than other tests. This change deletes that file and runs the tests using the LMS test settings.

(3) The test suite also contains many different ways of initializing and testing a modulestore, with significant differences in their configuration, and also a lot of repetition. I find this makes understanding, debugging and writing tests more difficult. So this commit also reduces the number of different "test case using modulestore" base classes:

* Simplifies MixedWithOptionsTestCase and MixedSplitTestCase by making them simple subclasses of ModuleStoreTestCase.
* Removes PureModulestoreTestCase.
2021-08-05 12:20:19 -07:00
kenclary
e14ceaab3f Merge pull request #28333 from edx/TNL-7752
feat: add explicit courserun_key parameter to /event endpoint
2021-08-05 13:59:42 -04:00
Braden MacDonald
9ce7d57556 refactor: remove unused methods from split modulestore 2021-08-05 10:27:41 -07:00
Braden MacDonald
188e9fb15e fix: use integer user IDs consistently for modulestore APIs/tests
Some actions in split modulestore record the user ID who requested the action. Currently, split modulestore doesn't care what data type you use for those user IDs. Most of the codebase uses integers, but some tests used username or email address strings.

My upcoming PR #27565 will move split modulestore's "course index" data from MongoDB into MySQL. In doing so, it requires that user IDs are always numeric. So this PR paves the way for that one by using numeric IDs consistently in all test cases. I believe the actual non-test code was already consistently using integer IDs.
2021-08-05 10:26:43 -07:00