Commit Graph

293 Commits

Author SHA1 Message Date
Ahmad Bilal Khalid
53fe1dd7bc Adds Enrollment Processor which is responsible for respecting course's outline access.
Moved data.py out into the parent's dirctory i.e learning_sequences directory to avoid circular import issue which is occuring when we try to import data.py from models.py.

A new CourseContext model is created, which is responsible for housing course specific fields e.g course_visibility.
2020-07-30 12:44:19 +05:00
Patrick Cockwell
58789e0f99 TNL-7260 Learning Sequences Course Outline makes sequences with hide_after_due inaccessible after due date 2020-07-13 13:55:50 +07:00
Aarif
9e34cb3df9 Removed deprecated future imports (#24295) 2020-06-28 23:40:03 +05:00
Calen Pennington
aef3a20e5d Prioritize access denials in block transformers from groups that have messages associated with them 2020-06-25 09:51:50 -04:00
Aarif
27480cdd2f Removed deprecated future imports 2020-06-23 18:51:43 +05:00
Calen Pennington
c6695e0b6f Only actually reset user schedule if they have missed deadlines and not missed any gated content deadlines 2020-06-10 15:18:53 -04:00
David Ormsbee
5d1b24988e Create learning_sequences app, Course Outline API.
Introduces the learning_sequences app, intended to provide metadata for
sequences and course outlines. The short term goal is to provide faster
source of this information for the new Courseware microfrontend
(frontend-app-learning). The medium term goal is to provide an in-proc
API that is useful to other parts of the platform that need fast access
to course outline information customized for a user. The long term
goals are outlined in the README.rst.

This first iteration of the API only lays out the basic structure for
how we'd arrange the pieces, with enough of an implementation to feel
"real" (simple schedules, staff_only content hiding). It's not ready to
be turned on, and is not currently plugged into the publish-flow. The
only way to get data into this new API is via the update_course_outline
management command. The REST endpoint is also currently limited to
global staff only, though it's possible to get the outline for a student
by using the ?username= query parameter.

TNL-7122
2020-06-02 15:31:21 -04:00
Jeff LaJoie
972c7f3bc1 Merge pull request #23954 from edx/jlajoie/AA-163
AA-163: Fixes duplicate dates tab issue
2020-05-12 09:08:54 -04:00
Jeff LaJoie
ee0f4567a8 AA-163: Fixes duplicate dates tab issue 2020-05-12 08:38:14 -04:00
Calen Pennington
ce6c9383d9 Merge pull request #23958 from cpennington/fix-case-collision-course-keys
Fix case collision course keys
2020-05-11 14:29:40 -04:00
Calen Pennington
bf16155c0f Make sure that case collisions don't propagate into the CourseOverview data 2020-05-11 13:55:27 -04:00
Leonardo Martinez
03c6a46e33 Update the LibraryLocator attribute from 'course' to 'library' (#23924)
This PR solves the deprecation warning found here:
https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

Change:
(LibraryLocator(org='org', course='course'), False)
To:
(LibraryLocator(org='org', library='course'), False)
In the file:
openedx/core/djangoapps/content/block_structure/tests/test_signals.py

* LibraryLocator is from the opaque_keys.edx.locator module

See documentation:
https://pythonhosted.org/edx-opaque-keys/opaque_keys.edx.html#opaque_keys.edx.locator.LibraryLocator
2020-05-08 12:19:59 -04:00
Dave St.Germain
2def3f427d Fixes hidden tabs showing up in courseware MFE. TNL-7149
Refactors courseware metadata code.
Enables masquerading in the courseware metadata API.
2020-04-30 12:19:43 -04:00
Dave St.Germain
1f71b7dc4b TNL-7148
This adds another field to the CourseOverviewTab model to support external links.
2020-04-21 12:16:24 -04:00
Dave St.Germain
543611fbb7 Added edxnotes information to the courseware API.
Added notes visibility toggle support for courseware MFE.
Removed notes and calculator from chromeless view when rendered in courseware MFE.
2020-04-09 13:59:01 -04:00
hunytalk
42503dd736 Add writes to new field 2020-04-06 14:13:20 -04:00
adeelehsan
82bf1d744a Revert "Added logs for investigation" 2020-03-30 19:15:26 +05:00
adeelehsan
c04341f863 Merge pull request #23509 from edx/aehsan/prod-1222/added_logs_for_investigation
Added logs for investigation
2020-03-27 18:21:21 +05:00
adeelehsan
da875856c8 Added logs for investigation 2020-03-27 17:37:37 +05:00
Dave St.Germain
d0914ef40c Added 'show calculator' to courseware metadata 2020-03-23 12:00:11 -04:00
Dave St.Germain
5a4d03b7b2 Add another attribute to CourseOverview to support the Teams tab 2020-03-09 15:12:44 -04:00
Dave St.Germain
b166788a8d Fixes TNL-7113 and TNL-7112, related to missing attributes in course tabs 2020-03-09 10:47:00 -04:00
Dave St.Germain
8bedb4283d Add url_slug to the CourseOverviewTab, to support serializing StaticTabs. 2020-02-26 10:56:36 -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
Dave St.Germain
a5b0f71108 Several optimizations for improving vertical rendering performance. 2020-02-20 11:41:21 -05:00
Dave St.Germain
9da8ff0f0b Allow anonymous access to courseware API, and return error message if user is unenrolled. 2020-02-14 11:03:15 -05: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
Kyle McCormick
b8a38bd8c2 Improve logging for CourseOverview creation 2020-01-27 11:17:06 -05:00
Kyle McCormick
28c0433352 Reinstate "Remove CourseOverview.get_from_id[s]_if_exists (#22918)"
This reverts commit cdb0619846,
which itself reverted 3ca006214e.

The original commit (3ca006) was reverted because it was suspected
that it was causing unexpectedly-increased memcached usage and
500s in the Gradebook API. It is not clear whether that is actually
the case. We are optimistically reinstating 3ca006 and will monitor
production to see if there is an adverse effect.

MST-105
2020-01-27 11:17:06 -05:00
Kyle McCormick
cdb0619846 Revert "Remove CourseOverview.get_from_id[s]_if_exists (#22918)" (#22926)
This reverts commit 3ca006214e.
2020-01-23 13:52:11 -05:00
Kyle McCormick
3ca006214e Remove CourseOverview.get_from_id[s]_if_exists (#22918)
The functions `CourseOverview.get_from_id_if_exists`
and `CourseOverview.get_from_ids if exists` are bug-
prone, in that they do not go to the modulestore
when a CourseOverview is out-of-date or uncached.
The docstrings spell this out, but callers seem
not to understand the implications.

So, in this commit, we:
* Remove both functions
* Add `CourseOverview.get_from_ids` for almost-as-fast
  yet safer bulk-fetching of overviews
* Update call sites to use `course_exists` or `get_from_ids`
  in place of the old functions.
* Add tests for @verify_course_exists.
This PR should specifically fix an issue where
the program_enrollments API was breaking when the CourseOverview
version was bumped.

CR-1708
2020-01-23 09:41:55 -05:00
Calen Pennington
2abfc665da Rather than deleting CourseOverviews to update their version numbers, just reload them from the modulestore 2020-01-15 13:30:41 -05:00
hunytalk
ef7350f375 Add comment 2020-01-13 19:09:15 +05:00
hunytalk
8374d111c1 Add start_date, end_date for renaming start, end field to CourseOverview 2020-01-13 18:59:51 +05:00
David Ormsbee
db30d8f447 Merge pull request #22631 from appsembler/omar/iexact__in
Safer CourseOverview.org filed matching
2019-12-30 14:59:13 -05:00
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
Omar Al-Ithawi
99960d7001 Safer CourseOverview.org filed matching
Regular expressions are harder to read and debug
2019-12-30 11:01:50 +03:00
Hassan Javeed
b699308933 Added management command to add history from snapshot. 2019-12-19 15:41:29 +05:00
Feanil Patel
f485ff450d Deal with pylint. 2019-12-09 11:03:22 -05:00
Feanil Patel
bf482f4989 Respond to code review. 2019-12-06 15:02:22 -05:00
Feanil Patel
48e9724808 Handle other places where we might be unpickling things.
We use pickling in conjunction with caches in these cases so we should
be able to fallback to the uncached behavior if the pickled data is
corrupt in some way.

eg. it's a python 2 pickle we don't know how to read.
2019-12-05 17:06:12 -05:00
Stu Young
9ec9d45bc4 remove backfill history management command (#22267) 2019-11-07 15:03:31 -05:00
Stu Young
cb9f6b4a1b fix example in history backfill command (#22224) 2019-11-01 17:32:47 -04:00
Hassan Javeed
86f0f42520 Replace 'NULL' with None. 2019-10-28 16:05:45 +05:00
Manjinder Singh
7f3045cf75 BOM-933: Fix type mismatches in various migrations 4 (#22146)
* fix type mismatch in course_goals  migrations

* fix type mismatch in experiments  migrations

* fix type mismatch in xblock_django  migrations

* fix type mismatch in catalog  migrations

* fix type mismatch in static_replace  migrations

* fix type mismatch in bulk_email  migrations

* fix type mismatch in course_overviews migrations
2019-10-24 13:47:51 -04:00
Hassan Javeed
edb732d83a Added management command to populate history as of 06/29. 2019-10-23 01:43:13 +05:00