Commit Graph

5943 Commits

Author SHA1 Message Date
=Awais Jibran
30ca1804d6 fix: Update provider features list for discussions
This Pr updates the features list of the discussion providers for,
1. Combines LTI basic configuration and LTI integration into 1 feature.
2.Enables Primary discussion app experience for Yellowdig
3. Hides Automatic learner enrollment from this list

FE changes (in Other PR):
1. Turn edX to Full Support instead of partial support
2. Rename Partial support to Basic support

https://openedx.atlassian.net/browse/TNL-8546
2021-07-29 18:15:10 +05:00
Awais Qureshi
46feea0c4b Merge pull request #28305 from edx/python2_unicode_pr
chore: Django3 has removed python_2_unicode_compatible.
2021-07-29 17:53:52 +05:00
David Ormsbee
dae459bfb4 feat: Rollout override for Learning Sequences API (#28205)
We control rollout of the Learning Sequences REST API with the
USE_FOR_OUTLINES (learning_sequences.use_for_outlines) course waffle
flag. But sometimes we're going to want to be able to take a look at
production data output of this API before explicitly turning the API on
(and switching over to it) for the Courseware MFE. To do this, we're
going to make the availability base itself purely on the waffle flag and
course type (Old Mongo courses are not supported), and allow people to
"peek" at what the API would have given if it was rolled out by passing
an explicit "force_on=1" querystring param.

This is work to support the rollout of TNL-8330.
2021-07-28 11:53:17 -04:00
Awais Qureshi
56466ba329 chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-28 20:38:19 +05:00
sofiayoon
a70e6b101e Merge pull request #28107 from edx/syoon/AA-895
fix: ORA problems' due dates are not set when in a mix of non-ORA problems
2021-07-28 11:01:46 -04:00
Awais Qureshi
85af0753b0 Merge pull request #28293 from edx/python2_unicode_rm_openedx-2
chore: Django3 has removed python_2_unicode_compatible.
2021-07-28 17:26:09 +05:00
Mehak Nasir
80b4dcceb6 Merge pull request #28291 from edx/TNL-8471
fix: description updates for pages and resources
2021-07-28 14:35:34 +05:00
Sofia Yoon
9f2050120c fix: ORA problems' due dates are not set when in a mix of non-ORA problems AA-895 2021-07-27 15:26:52 -04:00
Awais Qureshi
3d528ad590 chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-27 23:25:27 +05:00
Thomas Tracy
2a54a66582 [fix] MB-1391 certificate_available_date cleanup command (#28279)
* [fix] Certificate availability date cleanup

This task will clean out the misconfigured certificate available date. When courses Change their
certificates_display_behavior, the certificate_available_date was not updating properly. This is
command is meant to be ran one time to clean up any courses that were not supposed to have
certificate_available_date
2021-07-27 12:35:46 -04:00
Mehak Nasir
7b29d1bdf2 fix: description updates for pages and resources 2021-07-27 20:32:31 +05:00
sofiayoon
c927e2cebf Merge pull request #28175 from edx/syoon/AA-885
feat: AA-885 show offsets in studio self paced course outline for a subsection
2021-07-27 10:08:00 -04:00
Michael Terry
beb84bb4cb chore: remove unused serialized field 2021-07-27 09:00:04 -04:00
Awais Qureshi
8fe24a4478 Merge pull request #28282 from edx/removing-python_2_unicode
chore: Django3 has removed python_2_unicode_compatible.
2021-07-27 17:11:02 +05:00
Awais Qureshi
e5cbeeb86a chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-27 11:55:00 +05: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
Michael Terry
04babaa6c2 Merge pull request #28280 from edx/mikix/override-notes
feat: add note field to course waffle overrides
2021-07-26 14:48:35 -04:00
Awais Qureshi
b58832c8a6 chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-26 23:43:54 +05:00
Thomas Tracy
666f1dadb8 [fix] Fix certificate available date sync (#28275)
* [fix] Fix certificate available date sync

We were syncing the course available date to every course in
credentials. Since credentials doesn't understand "self-paced" courses,
or course end behaviors, some certificates were time gated incorrectly.
This check make sure to check if the course is not self-paced, and has a
CDB of 'end' before syncing the CA date.
2021-07-26 14:30:06 -04:00
Michael Terry
0170a0e6f0 feat: add note field to course waffle overrides
It's often very useful to note the reason we override a waffle.
Who asked for it and why - is it temporary until a feature is
completed or a complete opt-out of the feature itself, etc.

Now there's a text field to leave such comments for your future
self, much like waffle flags themselves.
2021-07-26 14:15:06 -04:00
Diana Huang
139e7ba48b feat: Allow language preferences to be shared. (#28277)
We are planning on limiting session cookies for LMS, which
will mean that under the old cookie domain, MFEs and other
IDAs would not have access to the language preference of a user.

This moves language preference cookies to use a different setting,
which means that this cookie can be shared.
2021-07-26 13:36:55 -04:00
Michael Terry
789edbe555 Merge pull request #28256 from edx/mikix/course-home-access
feat: send course access error along to course home MFE
2021-07-26 13:34:54 -04:00
Manjinder Singh
19b45069fa feat: adding more parameters (#28264)
* fix: adding more parameters for cookie monitoring

Added: cookies_total_num, cookies_unaccounted_size. 
  -Both are to help us gauge how many cookies we are not collecting data for.
Increased: # of cookies data collected
2021-07-26 09:11:44 -04:00
João Cabrita
0879568023 feat(discussions): Add messages field to provider descriptions
This adds an `messages` field containing messages relevant
for configuring the provider to the DiscussionsConfigurationView.

Related tickets:
* [TNL-8339](https://openedx.atlassian.net/browse/TNL-8339)
* [TNL-8523](https://openedx.atlassian.net/browse/TNL-8523)
* [BB-4249 (OpenCraft Internal)](https://tasks.opencraft.com/browse/BB-4249)
2021-07-26 13:51:23 +05:00
Michael Terry
29159891c3 feat: send course access error along to course home MFE
We previously only sent it to the courseware MFE. Also unify the
naming of this access error to 'course_access' in courseware and
course home APIs.
2021-07-23 14:01:58 -04:00
Usama Sadiq
1795008686 fix: Removed pylint constraint (#28222)
Disabled pylint warnings in pylint_tweaks
2021-07-23 18:35:57 +05:00
Tim McCormack
503e3d1d37 test: Fix safe_sessions comments and add pinning test (#28249)
Add pinning test for SafeCookieData values, and update SafeSessions
middleware comments to match code.

Main comment changes:

- Fix description of cookie structure:
    - Specify hash algorithm (SHA256, not "H")
    - Don't try to describe internals of TimestampSigner; description was
      incorrect in several ways: Did not include string delimiters under
      base64 (there's JSON in there); did not include the actual MAC
      portion. Just describe general effect and shape of output.
    - Add missing trailing pipe delimiter in signed data hash input
- Use phrase "intermediate key" rather than the less familiar term "usage
  key"
2021-07-22 21:09:32 +00:00
Matt Tuchfarber
325629dd25 Merge pull request #28237 from edx/tuchfarber/move_may_certify_2
Move cert display decisions to certificates app
2021-07-22 10:20:13 -04:00
Dillon Dumesnil
f886ced838 Merge pull request #28233 from edx/ddumesnil/hide-content-after-due-progress-aa-912
fix: AA-912: Hide URL after due date if subsection is marked as hide …
2021-07-22 07:17:35 -07:00
Dillon Dumesnil
7dd4f2db99 fix: AA-912: Hide URL after due date if subsection is marked as hide after due
A bug was reported of a learner accessing content that should have been hidden
due to the hide after due setting in Studio by the course team by clicking on
the Progress tab. This takes into account that value and will now hide the URL
on the Progress tab in that scenario.
2021-07-21 17:53:23 -04:00
Binod Pant
33cdf634b4 refactor: Extract core functionality of enrollment api in a python api to avoid REST calls from edx-enterprise (#28202)
* feat: Refactor out non REST portions of enrollment api from enrollment POST method

For use with edx-enterprise to avoid making REST calls for bulk enrollment and other use cases

ENT-4746

* feat: Remove unused test

Testing is covered by test_views

* refactor: isort

isort fixes

* docs: ADR for why this change

ADR

ENT-4746

* test: Fix test failure by restoring course_id to correct object

* test: Test fix

* refactor: pylint fixes

* refactor: raise from to avoid pylint error

* refactor: Start to work toward a util in enterprise_support instead of refactoring this endpoint

* feat: Add util function in enterprise_support to eventually handle enrollment, only used by bulk enrollment for now

* feat: One more revised idea, this time low risk in edx platform and also helps address enterprise specific flow. testing pending

* feat: syntax and unused constant

* feat: Restore view and add new util function to use in edx-enterprise instead

* feat: breakpoint

* unused import

* feat: don't fail on existing enrollment

* docs: ADR update

* docs: docstring minor update

* test: unit test add_user_to_course_cohort

* refactor: imports

* feat: remove unused error classes

* refactor: lint

* test: Test cases

* test: Two more tests for negative cases

* feat: missing init.py file

* test: Fix tests to use correct user mock

* unused import

* refactor: Review feedback, test fixes, needs rebase now

* feat: rebase changes

* feat: keep audit_log with similar logic as in the view

* refactor: Review feedback, test constant usage
2021-07-21 16:59:45 -04:00
Matt Tuchfarber
d16c9a804c refactor: Move cert code to cert app
The `may_certify` function is used to determine whether a learner should
be able to see that their certificate is ready. It is therefore entirely
in the certificates domain. This remove may_certifiy and
may_certify_for_course from the xmodule and course_overview
apps and into the certificates app. The xmodule may_certify was not called
outside of tests prior to this, and the other's were easily moved.

In order to avoid circular imports, this also moved
certificate_info_for_user out of the model code and into an API
2021-07-21 15:56:19 -04:00
Bianca Severino
14c85d9465 feat: pass verified name flag into user api 2021-07-20 16:58:39 -04:00
Michael Terry
e81fcbf5d7 Merge pull request #27879 from open-craft/mtyaka/FAL-1938-support-learning-mfe-on-subpath
Support Learning MFE hosted on subpath.
2021-07-20 13:16:38 -04:00
Bianca Severino
430f1554b4 Revert "feat: pass verified name flag into account settings"
This reverts commit 85dc8c8d67.
2021-07-19 12:06:33 -04:00
David Ormsbee
46f42a1512 perf: reduce calls to get_course_by_id
CoursewareMeta alredy initializes self.course, so there's no need to
separately call get_course_by_id for various attributes. This was
resulting in separate modulestore fetches that would pull down the
structure document and re-do all the expensive top-level course queries
in modulestore.
2021-07-19 11:30:41 -04:00
Bianca Severino
85dc8c8d67 feat: pass verified name flag into account settings 2021-07-19 11:03:24 -04:00
Waheed Ahmed
e203309019 feat: increment lockout counter upon NonCompliantPasswordException (#28218)
Increment lockout counter upon `NonCompliantPasswordException` to prevent further
login attempts after 6 attempts and also to prevent further reset password emails.

Reports from some users receiving 100s of password emails, upon investigation seems
like their password is not compliant with edX and has been compromised.

VAN-192
2021-07-19 18:34:36 +05:00
Zia Fazal
6f6a9e9c0b Merge pull request #27762 from edly-io/ERTE-5
[ERTE-5] feat: Added enterprise uuid in event context for enterprise enrolment events
2021-07-19 10:43:43 +05:00
João Cabrita
7261bc42bd feat: Add legacy_link field to TextBook app
This implements the `legacy_link` method to the TextbooksCourseApp
and makes the `legacy_link` URL absolute in the API response.

Related tickets:
* [TNL-8438](https://openedx.atlassian.net/browse/TNL-8438)
* [BB-4416 (OpenCraft Internal)](https://tasks.opencraft.com/browse/BB-4416)
2021-07-16 19:34:13 +05:00
Dillon Dumesnil
33ccd05df0 Merge pull request #28195 from edx/ddumesnil/update-shift-dates-logic-aa-856
fix: AA-856: update shift dates logic to ignore missed_deadlines
2021-07-16 05:56:00 -07:00
Dillon Dumesnil
3863bdb93b fix: update shift dates logic to ignore missed_deadlines
We ignore the missed_deadlines because this endpoint is used in the Learning MFE for
learners who have remaining attempts on a problem and reset their due dates in order to
submit additional attempts. This can apply for 'completed' (submitted) content that would
not be marked as past_due
2021-07-15 14:20:18 -06:00
Kyle McCormick
caf75dc0d9 feat: allow course staff to view outlines as students
This adds support for course staff masquerading as any other user when
viewing their own course, via user={username} querystring parameter.

Rules:
* Anonymous users are repesented by a blank "user" value.
* If there is no "user" parameter at all, render for the user making the
  request.
* Global staff can view any course as any user.
* Course staff and instructors can view their own course as any user
  (including other staff, the anonymous user, or users not enrolled in
  their course).

This commit supports TNL-8330 (switching the frontend-app-learning MFE
to use the Learning Sequences API instead if Course Blocks).
2021-07-15 13:18:44 -04:00
Awais Qureshi
88b35ba9a9 Merge pull request #28183 from edx/removing-python_2_unicode_compatible
Django3 has removed python_2_unicode_compatible.
2021-07-15 17:55:45 +05:00
Awais Qureshi
695f5dab7a Merge pull request #28184 from edx/removing-python_2_unicode_compatible-2
Django3 has removed python_2_unicode_compatible.
2021-07-15 16:56:42 +05: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
cfe81cd834 Django3 has removed python_2_unicode_compatible.
Execute the codemodes on this file and removed all usage.
2021-07-15 00:37:15 +05:00
Awais Qureshi
0433af537f Django3 has removed python_2_unicode_compatible.
Execute the codemodes on this file and removed all usage.
2021-07-15 00:26:09 +05:00
Mehak Nasir
79181b3db0 fix:link fix for the yellowdig general documentation 2021-07-14 22:54:09 +05:00
Sofia Yoon
e343c78227 feat: basic prototype for custom pacing pls in studio (AA-883) 2021-07-13 13:56:28 -04:00