Commit Graph

60820 Commits

Author SHA1 Message Date
Michael Terry
656ec5def9 fix: avoid resetting a learner schedule to before a course starts
If a learner changes modes (like upgrades to a verified learner),
we will reset their schedule for them. But if they did this before
the course started, we would accidentally set their schedule to
the current time. So when the course did start, they would already
appear to be behind schedule.

That's silly. So now we always look at course start time when
resetting the learner's schedule.

AA-426
2022-01-28 14:58:36 -05:00
connorhaugh
e5a9ddcd87 feat: encode uri on new editors (#29825)
In order to complete https://openedx.atlassian.net/browse/TNL-9320, we need to better encode the URI of the editor using the block id.
We also need to allow users to navigate out of the editors while it is a new page using the back button for a11y reasons.
2022-01-27 07:59:38 -05:00
Ned Batchelder
513b682005 docs: a better mention of Devstack 2022-01-26 13:32:16 -08:00
Felipe Montoya
c807af628f Merge pull request #29449 from eduNEXT/MJG/1st_filters_batch
[BD-32] feat: add first batch of Open edX Filters
2022-01-26 11:35:00 -05:00
Maria Grimaldi
f29a4eef68 feat: add first batch of Open edX Filters
* Add PreEnrollmentFilter
* Add PreRegisterFilter
* Add PreLoginFilter
2022-01-26 11:45:44 -04:00
Feanil Patel
ca2f950985 Merge pull request #29826 from openedx/feanil/update_logo_urls
chore: Update logo url.
2022-01-26 10:37:13 -05:00
Feanil Patel
1219837540 chore: Update logo url.
Switch from files.edx.org to the logos.openedx.org url for the "Powered
by Open edX" logos.  We should still keep the old url working as many
old versions of Open edX still referer to it.

We're making this change so that for future versions of the edx-platform
the DNS for these logos lives alongside the rest of the Open edX
infrastructure managed by tCRIL.
2022-01-26 10:14:55 -05:00
alangsto
0e7534d730 fix: enrollment should still display if IDV is disabled (#29819)
MST-1317. The enrollment mode of a learner should still display on the course listing, even if IDV is disabled. Right now, all enrollment messaging is disabled if IDV is turned off, as we are no longer returning the verifications status for a learner in that case. We should still return the enrollment mode if IDV is disabled, but exclude any IDV messaging.
2022-01-26 10:14:33 -05:00
Peter Pinch
4f58ed4f25 Merge pull request #29260 from open-craft/jill/BD-13-sandbox
[BD-13] refactor: deprecates ModuleSystem properties related to code sandboxing
2022-01-26 09:57:41 -05:00
Awais Qureshi
5b8cc00964 test: Fixed test failures due to randomization. (#29822)
* test: Fixed test failures due to randomization.
2022-01-26 19:48:55 +05:00
Usama Sadiq
59a0acc768 Revert "feat!: Remove django-admin default login. (#29416)" (#29824)
This reverts commit be2a57902f.
2022-01-26 19:17:45 +05:00
SaadYousaf
739083e301 fix: remove check for default values for video component when exporting. 2022-01-26 18:14:25 +05:00
Awais Qureshi
be2a57902f feat!: Remove django-admin default login. (#29416)
Now redirect the admin-login towards the lms login.
BOM-2855
2022-01-26 17:27:17 +05:00
Attiya Ishaque
60f3623066 fix: [VAN-823] Remove Authn MFE Waffle Flag (#29778) 2022-01-26 16:02:53 +05:00
Tim McCormack
ddc55483da Merge pull request #29768 from openedx/timmc/strict-by-default
feat: Enable ENFORCE_SAFE_SESSIONS by default
2022-01-25 17:19:11 +00:00
Awais Qureshi
c66498db36 test: Fixed test failures due to randomization. (#29816)
* test: Fixed test failures due to randomization.
2022-01-25 22:13:57 +05:00
Tim McCormack
9827a077aa feat: Enable ENFORCE_SAFE_SESSIONS by default; improve docs
This toggle has been shown to work, so enable by default. Will need to be
documented in release notes for deployers.
2022-01-25 16:03:54 +00:00
Tim McCormack
fb1ad76e65 fix: Exempt LTI in safe-sessions enforcement
This LTI call was failing in unit tests when `ENFORCE_SAFE_SESSIONS` was
enabled. I'm not sure why we didn't see failures in production when the
toggle was enabled in config.
2022-01-25 16:03:54 +00:00
Tim McCormack
4624bb7c3e fix: Prevent SafeSessions false alarm in course outline alt-masquerading
The course outline view has a way for a staff user to make a request as if
they are another user, not just by using the masquerade mechanism but also
by setting a request parameter. This can result in false positives in the
safe-sessions middleware, and if `ENFORCE_SAFE_SESSIONS` is enabled the
responses will be 401 errors.

The fix here is to do the same thing that masquerading does in setting a
`real_user` property on the new user object, which the safe-sessions
middleware then undoes (restoring the request.user) before determing
whether there's a mismatch.

(Without this fix, enabling `ENFORCE_SAFE_SESSIONS` also causes some tests
in `test_views.py` to fail.)
2022-01-25 16:03:54 +00:00
Tim McCormack
e6536d0d0e test: Stop sharing API client between users in unit tests
Using the same Client or APIClient instance for multiple users, where
one user has an active session and the other is making an
Authorization header call, results in a Safe Sessions violation.

By using separate clients for different test users, we avoid this
violation, allowing `ENFORCE_SAFE_SESSIONS` to be enabled by default.
2022-01-25 16:03:54 +00:00
Tim McCormack
7fc20e69f4 feat: Allow safe-session exemption even for exceptions
Change `mark_user_change_as_expected` to no longer take the response object
and instead convey the expected-change information via RequestCache.
This requires edx-django-utils 4.4.2, which fixes the bug where
RequestCache was cleared in the exception phase.

Also, no longer mark `ENFORCE_SAFE_SESSIONS` toggle as
temporary. We'll want it as an opt-out.

I was tempted to take this opportunity to move any existing
`mark_user_change_as_expected` calls to be closer to where the actual
change request.user occurs, reducing risk of both false positives and false
negatives, but it would be better to do that one at a time in case a move
breaks something. (Ideally it would be called right after any
`django.contrib.auth` `login` or `logout` call; previously, we were
constrained by having to make the call after a response object had been
created.) These changes can be made later if it becomes necessary.
2022-01-25 16:03:54 +00:00
Dillon Dumesnil
a3c65012af Merge pull request #29818 from openedx/ddumesnil/fix-discount-override-aa-1191
fix: Include course key when checking enabled for COURSEWARE_MFE_MILE…
2022-01-25 06:44:48 -08:00
Dillon Dumesnil
e05122a437 fix: Include course key when checking enabled for COURSEWARE_MFE_MILESTONES_STREAK_DISCOUNT
AA-1191
2022-01-25 09:21:10 -05:00
Michael Terry
a54a7d5605 Merge pull request #29812 from openedx/mikix/enroll-fix-for-staff
fix: don't show broken enroll link for staff on invite courses
2022-01-25 09:00:12 -05:00
edX requirements bot
f4a807572e chore: Updating Python Requirements (#29815) 2022-01-25 12:09:08 +05:00
Jillian Vogel
23a0d9ffb1 test: fixes safe_exec test TestSafeOrNot
so that both tests succeed on local devstack and in CI.
2022-01-25 14:49:31 +10:30
Jillian Vogel
57b390f8e2 refactor: removes calls to deprecated properties from source and tests. 2022-01-25 14:49:21 +10:30
Jillian Vogel
2173a98ef8 refactor: deprecates ModuleSystem properties for code sandboxing and cache
* Deprecates ModuleSystem can_execute_unsafe_code, get_python_lib_zip and cache properties
* Adds a new CacheService and SandboxService to provide the deprecated property
* Adds tests for the added CacheService and SandboxService
* Updates the ModuleSystemShim tests in Lms and Studio
2022-01-25 14:42:39 +10:30
Michael Terry
44e799f60d fix: don't show broken enroll link for staff on invite courses
Non-enrolled staff users were being shown enroll links for courses
that you can't self-enroll for (masters-only, invitation-only, etc).

This fixes the outline page to ignore staff status for that check.

AA-1164
2022-01-24 16:14:14 -05:00
María Fernanda Magallanes
3eea5d9337 fix: unicode submission history (#29338)
Co-authored-by: Constanza Abarca <costi.abarca@gmail.com>
2022-01-24 15:04:58 +00:00
Zainab Amir
6a8585a356 feat: update save_for_later event name (#29811) 2022-01-24 16:43:33 +05:00
Sarina Canelake
36093582ad Merge pull request #29462 from youpsla/youpsla-patch-1
Fix broken link to developer stack in README.rst
2022-01-21 18:04:43 -05:00
Ned Batchelder
cb9fada0bf docs(pr-automerge-open-release): use better description 2022-01-21 14:02:11 -08:00
Simon Chen
895cc10c1b fix: do not validate proctoring_provider if proctoring is disabled (#29803)
Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2022-01-21 12:45:43 -05:00
Ned Batchelder
1a894c578d build: use the reusable pr-automerge-open-release workflow 2022-01-21 09:39:52 -08:00
Alex Dusenbery
22d3e0ec73 fix: enterprise 3.38.5 - link_learners errors on empty payload
Deploys https://github.com/openedx/edx-enterprise/pull/1442
2022-01-21 11:42:29 -05:00
Carlos Muniz
7f2495ddd4 Merge pull request #29804 from openedx/Carlos-Muniz/temp-constraint
temp: Add a constraint on openedx-calc v2.0.1
2022-01-21 10:33:48 -05:00
Ahtisham Shahid
cc6da107a1 feat: Added zoom lti to programs page (#29799)
* feat: Added zoom LTI to the programs page
2022-01-21 20:14:24 +05:00
Carlos Muniz
653870da53 temp: Add a constraint on openedx-calc v2.0.1
`symmath` has been added to `openedx-calc v3.0.0`. Prior to removing
`symmath` from `edx-platform`, a constraint needs to be put on using the
old version of `openedx-calc` so that everything plays nicely.
2022-01-21 10:08:40 -05:00
Awais Ansari
62b7db64bc chore: update lti providers video link (#29802) 2022-01-21 20:00:24 +05:00
John Nagro
ea7323d4a9 fix: release edx-enterprise 3.38.4 (#29801)
- cornerstone missing completion events

ENT-5255
2022-01-21 09:30:01 -05:00
Mubbshar Anwar
615658b18e fix: update key name for save/program api (#29798)
update key name from uuid to program_uuid for save/program/ api.
2022-01-21 14:13:48 +05:00
Ahtisham Shahid
e63fb2e01a feat: Created API for programs live page zoom lti (#29763)
* feat: Created API for programs live page zoom lti

* refactor: Merged similar code by inheritance

* refactor: removed duplicates and resolved tight coupling issues

* refactor: Decoupled views
2022-01-21 12:26:47 +05:00
Muhammad Soban Javed
4e22a38ca5 test: run openedx and common tests with both lms and cms settings (#29676) 2022-01-21 11:58:57 +05:00
Braden MacDonald
003bbe3482 Merge pull request #29517 from open-craft/jill/lx-2365
[LX-2365] allows XBlock API users to optionally use LabXchange block types
2022-01-20 09:41:52 -08:00
John Nagro
07645c2e94 fix: edx-enterprise 3.38.3 (#29790)
- more logging to debug missing completion records

ENT-5255
2022-01-20 09:06:35 -05:00
Awais Jibran
40bb23501a Revert "refactor: Adding some debug logs. (#29639)" (#29791)
This reverts commit 80e12af963.
2022-01-20 12:47:19 +05:00
Jillian Vogel
ef8f841ac2 temp: let XBlock API users optionally use LabXchange block types
when fetching block metadata and rendering blocks while maintaining the
original usage IDs/OLX.

This change is marked temporary because LabXchange need it during the
transition to a custom runtime, but it's not really useful to anyone
else. We will revert this change with a future PR.
2022-01-20 10:35:59 +10:30
Jillian Vogel
5dedba8c8e temp: adds mako templates and dirs to Studio test env
The content library tests were failing to locate templates when
rendering XBlocks, but since these tests are skipped in CI, the issue
went undetected.

This fix is marked temporary because a proper fix involves adding
lms/templates to the cms.envs.test MAKO_TEMPLATE_DIRS_BASE list. This
was tried, and caused unrelated tests to fail, and so we took this
approach instead. See PR for full details.
2022-01-20 10:35:59 +10:30
Bianca Severino
d19c90246d Merge pull request #29788 from openedx/bseverino/honor-code-exclude-masters
[MST-1312] Exclude Master's enrollments from Honor Code check
2022-01-19 15:46:17 -05:00