Commit Graph

9572 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
Awais Ansari
f59397e63f fix: update hover state for textbooks breadcrumbs (#28690) 2021-09-09 15:11:15 +05:00
Matt Hughes
7089a3fbb4 build: man. comm. fails more loudly when nothing to do
JIRA:EDUCATOR-5112
2021-09-08 13:51:14 -04:00
Tinuade Adeleke
5b9e84d321 feat: created custom pages course app plugin (#28579)
created CustomPagesCourseApp class

feat: created custom pages course app plugin

created CustomPagesCourseApp class
added CUSTOM_PAGES_HELP_URL to lms and cms settings
added entry point to setup.py

feat: added toggle to ENABLE_CUSTOM_PAGES in lms and cms settings

feat: removed the option to enable/disable the availability of custom pages course apps.
2021-09-08 12:44:37 +05:00
Jawayria
caf95002a2 Merge pull request #28403 from edx/jawayria/django32-settings
chore: Updated lms and cms settings
2021-09-07 19:27:10 +05:00
Awais Ansari
ffa492f258 Merge pull request #28629 from edx/aansari/TNL-8606
feat: Add breadcrumbs for textbooks screen
2021-09-07 13:08:47 +05:00
edX Transifex Bot
15b965c201 fix(i18n): update translations 2021-09-06 02:50:49 +05:00
Adolfo R. Brandes
d7d6df5498 fix: fetch commons.js from the correct URL [SE-4785]
This mirrors a fix in
[frontend-app-library-authoring](https://github.com/edx/frontend-app-library-authoring/pull/25/files#diff-4102b1726b612b7813106191ef87849273f5d89da904f5ab69fb1974a31987d5R307).
2021-09-03 09:27:42 -07:00
Awais Ansari
ca8c10096e refactor: remove an extra call for getting waffle flag 2021-09-03 18:33:25 +05:00
Awais Ansari
125ed250ed feat: Add breadcrumbs for textbooks screen 2021-09-03 18:33:25 +05:00
0x29a
586add5f7d fix: don't cache ajax request on course details page in Studio
Caching this was making the browser render a JSON with this request because of
the Backbone.js router.
2021-09-02 18:31:01 +02:00
Awais Qureshi
32053c6ab4 Merge pull request #28588 from edx/loading-cors-origins-with-shceme
feat: `djang-cor-headers` need schemes with urls. Condition added for future.
2021-09-02 16:45:49 +05:00
J. Victor Martins
14e2f29516 feat: Make content libraries an LTI 1.3 tool
Offers blockstore-based content through content libraries acting as an
LTI 1.3 tool:

- Content Library support LTI 1.3 launches offering blockstore-based
  content through resource links.

- Content Library support LTI 1.3. AGS, allowing gradebook updates from
  graded assignments.
2021-09-01 11:56:51 -07:00
edX requirements bot
5e84e3761f feat: djang-cor-headers need schemes with urls. Adding condition to switch lists with different version.
With the PR it will load the old `CORS_ORIGIN_WHITELIST` since there is no change in `djang-cor-headers` version. In next PR this version will get upgraded.
2021-09-01 23:02:45 +05:00
Tim McCormack
3e13441cab feat: Enable CookieNameChange in Studio in prep for session cookie rename (#28602)
ref: ARCHBOM-1887
2021-08-31 21:19:53 +00:00
Kshitij Sobti
8cf751a405 feat: Add REST APIs for course advanced settings and course tabs
This commit adds new APIs that allow MFEs to modify a course's advanced settings
and to update tab settings to show/hide/move tabs.
2021-08-31 11:11:46 +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
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
Tim McCormack
90b48d68b6 feat: Activate Studio SSO for devstack (#28534)
This also requires using different session cookie names in devstack for
LMS and Studio so that we can properly use the OAuth flow locally, rather
than just sharing a session cookie on the localhost domain. (Note that
ports are not used for cookie segmentation in browsers.)

This depends on the following provisioning PR:
https://github.com/edx/devstack/pull/825
2021-08-25 20:37:05 +00:00
Tim McCormack
f75ae33580 feat: Implement (but don't activate) LMS OAuth2 SSO login for Studio (#28533)
Once LOGIN_URL is changed for an environment, the OAuth flow will be
activated. (See included temporary doc.)

This is for ARCHBOM-1860: Convert Studio to use LMS OAuth login.
2021-08-25 16:16:48 +00: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
edX Transifex Bot
11eee8ff5c fix(i18n): update translations 2021-08-24 00:39:21 +05:00
Ahtisham Shahid
377dec74aa feat: Added pages&resources url to missing pages (#28472)
* feat: Removed extra pages by using waffle flag

* refactor:moved pages_and_resources_url context in header file

* refactor: cleanup of header file

* refactor: removed redundant instances of mfe url from context

* fix: fixed pylint issues
2021-08-20 12:44:40 +05:00
Bianca Severino
1b1637f33f Merge pull request #28463 from edx/bseverino/proctoring-settings-url
[MST-859] Update proctored exam settings URL
2021-08-18 09:20:42 -04:00
Bianca Severino
1255bd8535 fix: update proctored exam settings URL
The proctored exam settings link now directs to a new modal view, rather
than the old exam settings page.
2021-08-17 15:06:53 -04:00
Dillon Dumesnil
09bc2d11e6 fix: Updating the branding/api.py to use unicode copyright
This is really just the change to use the unicode copyright symbol
and then rerunning the pull translations logic (minus the transifex step)
to update the eo files. The other changes were just picked up as part of
running those scripts
2021-08-16 09:43:26 -04:00
edX Transifex Bot
fb161be624 fix(i18n): update translations 2021-08-15 20:47:16 +00: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
Saad Yousaf
933edd27e5 Merge pull request #233 from edx/TNL-8593/security-fix
fix: update lxml parser for celery tasks to be more secure
2021-08-11 14:07:28 +05:00
Julia Eskew
7fc109ebcb fix: ES 7.10 is now the default ES version for devstack, so change the
default address for testing ES using integration tests in devstack.
2021-08-09 11:37:51 -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
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
SaadYousaf
bb80192f1c fix: update lxml parser for celery tasks to be more secure 2021-08-05 10:56:28 -04:00
Jawayria
f8d44650d3 chore: Updated lms and cms settings 2021-08-05 15:15:19 +05:00
Kshitij Sobti
6cbb9cbca3 feat: Supply documentation links for course apps from the backend (#28327)
Instead of hard-coding the "Learn More" and potentially other links for course
apps in the course authoring  MFEs this change loads those URLs from the
django settings as part of each individual course app.
2021-08-04 15:04:13 +05:00
Hamza Farooq
4a2549f49a fix: making LOGIN_REDIRECT_WHITELIST configurable through env files (#26760)
LOGIN_REDIRECT_WHITELIST has been used to filter redirect-url while processing logout requests but its configurations were not picked through environment files like lms.yml or studio.yml. This PR fixes that bug.
2021-08-03 08:29:23 -04:00
Matt Tuchfarber
4b254c16f9 fix: Fix translation string for studio settings (#28361) 2021-08-02 14:29:27 -04:00
sofiayoon
1ad615ef59 Merge pull request #28329 from edx/syoon/AA-945
fix: wrong start date is displayed in susbection modal
2021-08-02 11:50:03 -04:00
Matt Tuchfarber
622d56026c Certificate Display Settings revamp (round 2) (#28286)
feat: reimagine certificate display settings

The course settings `certificate_available_date` (CAD) and
`certificates_display_behavior` (CDB) were previously
acting indedependantly of one another. They now work in
tandem. This change:
- limits CDB to a dropdown
- removes "early_with_info" and adds "end_with_date"
- only takes CAD into account if "end_with_date" is selected
- Moves CDB to the main course schedule settings page
- updates CourseOverview model and CourseDetails objects to
validate these fields and choose sane defaults if they aren't
expected values

This work was previously done in bd9e7dd (complete with bugs), so this
version is toggleable via the ENABLE_V2_CERT_DISPLAY_SETTINGS setting
2021-08-02 11:30:15 -04:00
Sofia Yoon
a272dd54cf fix: wrong start date is displayed in susbection modal with xblock's start date so use course context's start date (AA-945) 2021-08-02 10:05:50 -04:00
Sofia Yoon
1ee80d8640 fix: display relative due date on limited time assigments (AA-943) 2021-07-29 15:37:21 -04:00
Sofia Yoon
9a555eb02c feat: log event for custom pacing when user submits relative date for self paced course (AA-921) 2021-07-29 09:51:25 -04:00
Sofia Yoon
898684287a feat: AA-885 show offsets in studio self paced course outline for a subsection
feat: AA-883 basic prototype for custom pacing pls in studio

refactor: merge with basic prototype for self paced courses from AA-844

feat: add due date estimate message in self paced courses studio modal

refactor: merge with main that has up to date self paced custom pls editor and tests

fix: only display projected date if start date exists

fix: tests to check grading date in outline

fix: only one warning message show at a time

fix: do not show projected date when it is before the start date
2021-07-26 16:26:22 -04:00
connorhaugh
0d26738fce fix: Prevent Transcripts from Failing Export, Edit (#28242)
Instead of having json errors in transcript acquisition and conversion cause errors, have transcription conversion and acquisition simply return an error message in the transcription which can prompt a change from the user.

Although not uploading a transcript is handled, transcripts can often cause errors in edit, export, and other activities due to json errors. These errors block the entire use of these features, so to allow for reupload, etc, we add an error message instead of transcript and log the event.

In response to [TNL-8539](https://openedx.atlassian.net/secure/RapidBoard.jspa?rapidView=580&projectKey=TNL&modal=detail&selectedIssue=TNL-8539)

Testing: Unit tests coverage is included in the PR. Upload, import, and export of courses with transcriptions is also easily hand-testable. Just create a video in studio, add an irrelevant transcript. Then try to import, export, and edit the problem. Expected behavior is success.
2021-07-21 15:52:54 -04:00
Jansen Kantor
32d2e75c88 fix(add teams config service to previewmodulesystem) (#28210)
(AU-48) Team ORAs rely on the Teams Config Service to render both the student_view and studio_view in studio.
We added the service in e0d57fe1a7, but that appears to only provide it in studio_view.
This adds it for student_view.
2021-07-21 09:49:34 -04:00
Sofia Yoon
60493757e6 fix: webpack loader config to display error 2021-07-15 17:06:01 -04:00
Awais Qureshi
251fcaa586 Django3 has removed python_2_unicode_compatible.
Execute the codemodes on this file and removed all usage.
2021-07-15 12:28:06 +05:00
Awais Qureshi
2ed834a36a Django3 has removed python_2_unicode_compatible.
Execute the codemodes on this file and removed all usage.
2021-07-15 00:33:45 +05:00
Kshitij Sobti
689d2084f5 Review feedback 2021-07-14 13:19:12 +05:00
Aayush Agrawal
ffe3ee3869 feat: Adds additional data and filters to discussions API
This change adds three new filters to the threads API. They are:
* Filtering only threads that are flagged for abuse
* Filtering by the thread type (discussion or question)
* Filtering by the thread author

In addition it also adds a new ``abuse_flagged_count`` field for threads. It
returns a count of the number of comments in a thread that are flagged for abuse.
This is only visible to users that have moderator privileges or higher.

Finally it also adds a ``abuse_flagged_any_user`` field that is set if any user
has flagged a thread. This field too, is only visible to moderators or above.

Co-authored-by: Kshitij Sobti <kshitij@opencraft.com>
2021-07-14 13:19:12 +05:00