Commit Graph

118 Commits

Author SHA1 Message Date
0x29a
cf1a7c616a refactor: remove error_descriptor_class and NonStaffErrorBlock
It's safe to remove this because non-staff [1] users cannot access [2]
an `ErrorBlock`. We were able to reproduce this with and without this commit
with the following results:
1. Staff users were seeing the `ErrorBlock`.
2. Non-staff users were getting an empty `<div class="vert-mod"></div>`.

In theory, error blocks should be hidden in the Learning MFE because of this
option [3]. However, when we manually set `hide_access_error_blocks` to
`False`, we kept getting identical results (with and without this commit), so
it looks that the removal `NonStaffErrorBlock` was just omitted at some point.

[1] a4ec4c1b8e/lms/djangoapps/courseware/access.py (L419-L436)
[2] a4ec4c1b8e/lms/djangoapps/courseware/access.py (L150-L151)
[3] 92ca176fde/lms/djangoapps/courseware/views/views.py (L1547-L1551)
2022-06-30 15:53:39 +02:00
Mohammad Ahtasham ul Hassan
44fa09eba5 refactor: refactor discussions_xblock (#30636)
JIRA: https://openedx.atlassian.net/browse/BOM-2580
This PR aims at refactoring the discussion xblock sub project and moving it within the xmodule directory effectively removing its position as a sub project within edx-platform
2022-06-27 17:11:56 +05:00
Muhammad Umar Khan
a389a9ff10 Revert "Revert "refactor: move xmodule folder to root"" 2022-06-20 18:20:06 +05:00
Muhammad Umar Khan
d890f06507 Revert "refactor: move xmodule folder to root" 2022-06-20 16:03:48 +05:00
M Umar Khan
a91df0c40f refactor: move xmodule folder to root
- Moving xmodule folder to root as we're dissolving sub-projects of common folder in edx-platform
    - More info: https://openedx.atlassian.net/browse/BOM-2579
- -e common/lib/xmodule has been removed from the requirements as xmodule has itself become the part of edx-platform and not being installed through requirements
- The test files common/lib/xmodule/test_files/ have been removed as they are not being used anymore
2022-06-20 14:33:45 +05:00
Feanil Patel
b9131ac1af Merge pull request #30299 from raccoongang/depr/remove-course-info
FC-0001: Remove legacy course info page & related code
2022-06-13 08:23:25 -04:00
Kyle McCormick
9f380b9ccd refactor: import common/lib/ modules from canonical locations (#30533)
Unfortunately, some code in edx-platform is imported
relative to sub-projects instead of the repository root.
The only three remaining instances of this are:
* common/lib/xmodule/xmodule (imported as just 'xmodule')
* common/lib/capa/capa (imported as just 'capa')
* openedx/core/lib/xblock_builtin/xblock_discussion
  (imported as just 'xblock_discussion')

For more details on the situation, see:
https://openedx.atlassian.net/browse/BOM-2579
(public, but requires Atlassian account creation).

We would like to get to a point where all edx-platform
import paths match their folder paths, relative to the repo
root. For now, though, all common/lib/capa and common/lib/xmodule
code should be imported as just `from capa` and `from xmodule`,
respectively. Importing using the full `common.lib.xmodule.xmodule...`
path will often work, but it instantiates a second instance of all
modules imported this way, which in the past has led to very
difficult-to-diagnose bugs.  It also confuses tooling such as
import-linter, which we are trying to add to edx-platform
(see https://openedx.atlassian.net/browse/BOM-2576)
2022-06-06 09:54:16 -04:00
Sagirov Eugeniy
92ca176fde refactor: Remove legacy course info page & related code 2022-06-05 19:00:05 +03:00
Ahtisham Shahid
97edc47129 feat: added live lti course tab (#30035)
* feat: added live lti course tab

* fix: resolved test errors

* feat: Moved live tab behind the waffle flag
2022-03-16 11:46:49 +05:00
AsadAzam
533b971d83 feat: added live course app plugin (#29998) 2022-03-07 12:15:45 +05:00
Kshitij Sobti
9f4bc9900b feat: add discussions context to course blocks API (#29300)
Add a new course blocks transformer that adds discussion context for units.
2021-12-07 11:10:48 +05:00
Kshitij Sobti
79cd0b1ef8 feat: Adds discussions settings for new discusions experience [BD-38] [TNL-8621] [BB-4854] (#29131)
* feat: Adds discussions settings for new discusions experience
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.

* fix: tests
2021-10-28 11:56:17 +05:00
David Ormsbee
5d0132305d Revert "feat: Adds discussions settings for new discusions experience (#28749)"
This reverts commit bb0c03123c.
2021-10-27 10:40:12 -04:00
Kshitij Sobti
bb0c03123c feat: Adds discussions settings for new discusions experience (#28749)
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.
2021-10-27 15:41:27 +05:00
Kshitij Sobti
3e05e0f49b feat: add support for enabling/disabling the wiki app (#28889)
Currently the wiki app can't be enabled or configured. This change allows enabling/disabling the wiki app which effectively hides/shows the wiki tab.
2021-10-07 11:04:03 +05: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
mohtamba
9b7d92fe45 Initial Attempt at adding proctored exam settings
Added proctored settings card, however the page doesn't get the legacy link correctly
2021-08-11 08:34:46 -04:00
Kshitij Sobti
d2c2fcdefe feat: Course Apps API [BD-38] [TNL-8103] [BB-2716] (#27542)
* feat: Course Apps API

This adds a new concept called course apps. These are exposed via a new
"openedx.course_app" entrypoint, which helps the LMS and studio discover such
apps and list them in a new rest api for the same.

These course apps will drive the pages and resources view in the course authoring
MFE. This system will track which apps are enabled and which are disabled. It
also allows third-party apps to be listed here by using the plugin entrypoint.

* Apply feedback from review
2021-06-23 21:51:12 +05:00
Diane Kaplan
5ac710995d feat: remove course_home_course_tools upsell link (REV-2131) 2021-05-26 12:02:18 -04:00
jawad khan
15f33dc1b2 revert: show empty container blocks from the course blocks api when called by mobile (#27707)
REVE-52 is merged and mobile
traffic from older app versions is < 5% of the mobile traffic.
Therefore we dont need changes from this PR 325fbe4eb2 (diff-c061bf405edf96531766b26cc2bcc2bb3639d851e5d9f844612c2ea57c35e56e)

LEARNER-8377
2021-05-25 20:30:26 +05:00
stvn
8314971e0b refactor: Convert discussions to pluggable app
This minimizes our footprint outside of the djangoapp, now and moving
forward. Not only can we drop the `lms/envs/common.py` change, but we
can also avoid touching `lms/urls.py` when we add the API. Everything
can stay contained within `openedx/core/djangoapps/discussions`.
2021-02-25 18:51:25 -08:00
Michael Terry
1b9119859e AA-614: Add initial effort estimation block transformer 2021-02-18 08:31:19 -05:00
usamasadiq
e23fa84c37 Applied pylint-amnesty 2021-02-10 16:40:06 +05:00
Kshitij Sobti
6769a280a9 Added a new LTI-based course tab, and LtiDiscussion tab
This PR lays the groundwork for a an LTI tab that can embed any LTI1.1-based
tool as an course tab. It also adds another tab based on this LTI Tab that
offers special support for embedding LTI-based discussion tools in a course
tab. If enabled this will replace the existing discussion tab.
2021-01-20 16:24:55 +05:30
sarina
b8bd4f6310 DEPR-48 Remove CourseTalk integration & Course Reviews functionality 2020-11-17 13:11:54 -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
Calen Pennington
f9619d6cad Add a pluggable CallToAction service for XBlocks
This also has an initial use case for Personalized Learner Schedules
to add CTAs to capa and vertical blocks to allow users to shift their
course deadlines.
2020-08-06 14:38:26 -04:00
Calen Pennington
3e47170470 Revert "Merge pull request #24547 from edx/revert-24503-ora2-dates-reprise"
This reverts commit 21d1f3d5d1, reversing
changes made to 19f82258aa.
2020-07-21 11:54:06 -04:00
Dillon Dumesnil
75db9b2534 Revert "Ora2 dates reprise" 2020-07-20 09:55:02 -07:00
Calen Pennington
03ba0b8331 Revert "Merge pull request #24501 from edx/revert-24421-ora2-dates"
This reverts commit fccb52b6c8, reversing
changes made to a0bc37866d.
2020-07-15 14:29:11 -04:00
Dillon Dumesnil
2601975fd3 Revert "AA-223 - Add ORA2 dates to the dates page" 2020-07-15 10:13:00 -07:00
Calen Pennington
d6bf54b576 Add ORA2 dates to the dates page
ORA2 (openassessment) problems have multiple dates associated with are
not bound to the `due` date that is modified by Personalized Learner
Schedules. We expose the ORA2 dates separately in the dates page
so that learners aren't surprised by the differing deadlines.

[AA-223]
2020-07-15 09:52:22 -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
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
Diane Kaplan
9b8af1493b Kaplan/rev 1136 financial aid- handle missing feature flag (#23957)
Add financial assistance link in course tools where available, so this will be more visible to learners
2020-05-12 10:11:48 -04:00
Farhanah Sheets
d37b333d53 Revert "Add financial assistance link in course tools (#23921)"
This reverts commit cbb4cfb988.
2020-05-10 16:43:39 -04:00
Diane Kaplan
cbb4cfb988 Add financial assistance link in course tools (#23921)
Add financial assistance link in course tools for eligible courses, so it'll be more visible to learners
2020-05-08 10:35:10 -04:00
Simon Chen
f8cc58618a Create a new plugin manager called DynamicPartitionGenerators to remove the dependency of openedx.features.content_type_gating by xmodule.partition_services 2020-05-04 11:16:26 -04:00
Dillon Dumesnil
a59155e83c AA-36: Link to toggle calendar sync 2020-03-10 14:45:29 -04:00
Calen Pennington
a8ba43133f Remove schedules plugin from cms.djangoapps listing 2020-03-04 11:27:07 -05:00
Calen Pennington
d853444229 Schedules is a core part of the LMS, install it by default, rather than through the plugins mechanism 2020-03-04 10:52:17 -05:00
David Ormsbee
8c7dc22dfe Merge pull request #23068 from open-craft/olx-rest-api
REST API to export modulestore XBlocks as OLX
2020-02-25 15:11:08 -05:00
Jeff LaJoie
fa3b1cd835 AA-6: Adds in dates tab and dates dashboard view to courseware 2020-02-25 10:48:45 -05:00
Braden MacDonald
23d649d7e3 REST API to export modulestore XBlocks as OLX.
This was originally a separate plugin called openedx-olx-rest-api.

It provides a Studio API that any user with course authoring permission can use to get the OLX of an individual XBlock or a unit. Without this, the only way to get an XBlock's OLX was to download the tarball of the entire course.

Examples of usage (be logged in to Studio on devstack):

Simple HTML XBlock:
http://localhost:18010/api/olx-export/v1/xblock/block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4/

Exporting a unit:
http://localhost:18010/api/olx-export/v1/xblock/block-v1:edX+DemoX+Demo_Course+type@vertical+block@134df56c516a4a0dbb24dd5facef746e/

Example output for an HTML block:

    { 
       "root_block_id":"block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4",
       "blocks":{ 
          "block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4":{ 
             "olx":"<html display_name=\"Blank HTML Page\"><![CDATA[\n<p><strong>Welcome to the edX Demo Course Introduction.</strong></p>\n]]></html>\n"
          }
       }
    }

The code is designed primarily for use when importing content into Blockstore. So it will:
* Export HTML blocks as a combined OLX/HTML file, with the HTML in a CDATA section
* Convert vertical blocks to unit blocks (unit is like a vertical but has no UI elements)
* Detect static files (such as images) used by the XBlock and list the absolute URL of each static file in the "static_files": {...} JSON element for each XBlock that has at least one static file usage. This can handle static files that are in mongo ("contentstore" / "Files & Uploads") as well as files generated on-the-fly during OLX serialization via the export_fs API (mostly this is video transcripts).
2020-02-21 11:29:21 -08:00
Dave St.Germain
1aa8c9c53d Add a new courseware API Django app to support the courseware micro-frontend. 2020-01-28 14:59:07 -05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Braden MacDonald
ec97387d3e Move new Blockstore key types to external opaque-keys library. 2019-09-13 09:56:44 -07:00
Brian Mesick
75e38fc4fd DEPR-18 Remove deprecated Notes LMS djangoapp (#21008) 2019-09-03 16:49:58 -04:00
Braden MacDonald
d3f6ed09d8 Learning Contexts, New XBlock Runtime, Blockstore API Client + Content Libraries
https://github.com/edx/edx-platform/pull/20645

This introduces:
* A new XBlock runtime that can read and write XBlocks that are persisted using
  Blockstore instead of Modulestore. The new runtime is currently isolated so
  that it can be tested without risk to the current courseware/runtime.
* Content Libraries v2, which store XBlocks in Blockstore not modulestore
* An API Client for Blockstore
* "Learning Context" plugin API. A learning context is a more abstract concept
  than a course; it's a collection of XBlocks that serves some learning purpose.
2019-08-30 10:31:15 -07:00
David Ormsbee
b1f3d2cef2 Revert "Fix the unpredictable order randomization issue with randomized content blocks" 2019-07-25 13:42:20 -04:00