Commit Graph

38 Commits

Author SHA1 Message Date
Michael Terry
bf2c2ce3c3 fix: when redirecting to the MFE, preserve query flags
This can potentially fix analytics based on query params like
utm_campaign and the like. And generally seems like the correct
thing to do.

AA-1128
2021-12-07 14:10:32 -05:00
uzairr
a7d89aae06 feat: make year of birth compliant with coppa
Adds a check to make the UX in compliant with Coppa suggestions.
After this change only users older than 13 years are able to
cascade between their limited and full profile.

Fixes: VAN-753
2021-10-28 16:55:27 +05:00
Christie Rice
4867535d2d refactor: Use certificates api method instead of the model, and rename whitelist to allowlist. Also move method to certificates app to prevent circular import. (#27532)
MICROBA-1021
2021-05-10 13:02:43 -04:00
Jawayria
4cdf466215 refactor: Removed unused imports
Removed unused imports from openedx/core/{djangolib, lib} and openedx/{tests, features}
2021-04-06 17:24:04 +05:00
Awais Qureshi
ace90d5345 BOM-2442
pyupgrade in leaner-profile, lti-course-tab, personalized-learner
2021-03-11 14:57:20 +05:00
Awais Qureshi
41b50237d3 BOM-2337
Apply pylint-amnesty.
2021-02-08 17:12:55 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
morenol
68d1c7f78c [BD-10] Remove _uses_pattern_library property from EdxFragmentViews (#24536) 2020-07-27 12:01:40 -04:00
Aura Milena Alba
64edd0e686 Remove pattern library of learner_achievements. (#24369) 2020-07-17 12:45:58 -04:00
Daniel Francis
4dc3251af5 render_to_response deprecated in Django 3 (#24141)
Fixing RemovedInDjango30Warnings

**Background:** The `django.shortcuts` method `render_to_response` became deprecated in [Django 1.3](https://docs.djangoproject.com/en/3.0/releases/1.3/), when  `render` was introduced.

Per the documentation:

> render() is the same as a call to render_to_response() with a context_instance argument that forces the use of a RequestContext.

Both return an `HttpResponse` object.

**Context:** We changed two statements: An import line and the call to the method, adding explicit parameter names to improve readability.

**Before:**
```
from django.shortcuts import get_object_or_404, render_to_response
...
return render_to_response("teams/teams.html", context)


```

**After**
```
from django.shortcuts import get_object_or_404, render
...
return render(
            request=request,
            template_name="teams/teams.html",
            context=context
        )

```
2020-06-10 14:25:04 -04:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Waheed Ahmed
442da4a7fe Don't show certificate on profile if no active config.
Stop showing certificate information on profile page if there is no
active certificate configuration.

PROD-1200
2020-01-28 22:30:16 +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
Matt Tuchfarber
2583d317db Remove all references to Journals 2019-07-09 14:19:25 -04:00
uzairr
cefebce67a Anomaly in certs visibility on user profile.
While visiting a profile of another user from a non-staff account,
backend is returning html of its certs in page source.To avoid it,
a check is added in backend so that certs are only added when the
visiting user is itself visiting its profile or it would be a staff.

LEARNER-7057
2019-05-10 16:13:16 +05:00
kill-gear
69584ca573 incr-177 run python-modernize on openedx/features/learner_profile (#20454)
* incr-172

* incr-177 run modernize

* fixed bug due to running modernize
2019-05-08 16:50:04 -04:00
Nimisha Asthagiri
2a168a4e1b Account: Toggle for Microfrontend Redirect
ARCH-636
2019-05-01 11:31:48 -04:00
Nimisha Asthagiri
e780eae04c Merge pull request #20177 from edx/arch/annotate-profile-mfe-toggle
Learner Profile Toggles: Annotate and Remove outdated ones
2019-04-07 23:21:17 -04:00
Nimisha Asthagiri
47759427ba Learner Profile Toggles: Annotate and Remove outdated ones
ARCH-453
2019-04-07 11:30:35 -04:00
Douglas Hall
7ef33dac6c Allow profile microfrontend redirect to be configured per site. 2019-03-13 16:27:36 -04:00
Nimisha Asthagiri
c1cd1058c5 Merge pull request #19797 from edx/arch/redirect-profile-page
Redirect Profile view to Profile Microfrontend
2019-02-19 09:00:37 -05:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
Nimisha Asthagiri
551f07c130 fixup! updated URL config name and value; added DEPR ticket 2019-02-14 09:17:31 -05:00
Nimisha Asthagiri
7848dd737f Redirect Profile view to Profile Microfrontend 2019-02-13 09:32:36 -05:00
Jeremy Bowman
713d64e1e2 TE-2702 Update Read the Docs links to HTTPS 2018-08-15 17:34:01 -04:00
Bill Filler
c746a4e630 Add Journals support
Enable the journal app in LMS. Add support to display Journals on index
and courseware pages and dashboard.
2018-07-23 13:11:26 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Michael Terry
502287b07e Add some links to student records
Add some waffle-guarded connection points to the Credentials service
to start filling out the user flow for Student Records.

Specifically, add a button to the Program Progress Details page if
a certificate exists, and add a link in the Learner Profile page.

Both only appear if the 'student_records' waffle switch is active.

LEARNER-4701
2018-04-27 09:52:01 -04:00
Michael Youngstrom
f4e9f3ac2d Revert "Made the certificates section on the user profile page site aware. WL-1289" 2018-02-13 11:43:33 -05:00
Afzal Wali
134a04ca58 WL-1289
Made the certificates section on the user profile page site aware. Only the certificates earned that the user earned on that site will be visible.
2018-01-11 18:32:07 +05:00
Tasawer Nawaz
d2827b3d8e Fix certificates visiblity to students on the profile page before the issue date set by course teams
LEARNER-3097
2017-11-09 17:10:49 +05:00
Diana Huang
d696677ce8 Merge pull request #15968 from edx/diana/header-updates
LEARNER-2318: As a learner I should have an easy way to get to my learner profile
2017-09-26 10:40:41 -04:00
Diana Huang
1cfefe2457 Modify the header to show the learner profile.
Remove the profile from the user dropdown.

LEARNER-2318
2017-09-25 17:06:08 -04:00
Diana Huang
b5a0d0ce0a Remove waffle flag for showing certs on profile.
Certs are displayed by default to everyone.
2017-09-25 15:38:16 -04:00
Diana Huang
cbfea6515d Add new info message to profile page. 2017-09-21 10:19:40 -04:00
Andy Armstrong
d05b62a283 Only show passing certificates on a learner profile
LEARNER-2486
2017-09-06 12:32:15 -04:00
Andy Armstrong
6f888d6995 Add course certificates on the learner profile
LEARNER-1860
2017-08-31 20:58:35 -04:00