Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hantkovskyi/lint fix #2566

Closed
wants to merge 86 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
bf1c434
fix: share certificate in FB
DmytroAlipov May 15, 2023
e48a132
Merge branch 'open-release/palm.master' into fix-FB-share-Palm
e0d Jun 28, 2023
9141a63
chore: upgrade Django to 3.2.20 (#32739)
magajh Jul 14, 2023
3efcd50
Merge pull request from GHSA-3q74-3rfh-g37j (#32838)
jesperhodge Jul 25, 2023
08f6fa6
fix: Incorrect symbols on wiki create article page for Palm (#32701)
DmytroAlipov Jul 25, 2023
085987e
fix: discussion errors in the demo course for Palm (#32464)
DmytroAlipov Aug 1, 2023
d660d0c
autofilling user details from sso pipeline (#33051)
mubbsharanwar Aug 22, 2023
6f9fc23
fix: TypeError during student.send_activation_email task (#32743)
DmytroAlipov Aug 24, 2023
d59db28
feat: add the default enrollment start date on course creation (#33150)
dyudyunov Sep 5, 2023
bbd7e28
fix: for the wiki page translation (#33050)
DmytroAlipov Sep 5, 2023
1699d14
fix: float " " symbol in the preview_body (#32489)
DmytroAlipov Sep 5, 2023
ee748be
chore: upgrade Django to 3.2.21 (#33210)
magajh Sep 11, 2023
5c53971
fix: get registration fields from site configuration for palm (#33162)
DmytroAlipov Sep 21, 2023
176d0d8
fix: replace py2neo with forked package (#33453) (#33459)
cmltaWt0 Oct 10, 2023
ebc830b
[JR-30] create basic theme
May 27, 2020
02a4388
[JuniperOeX-149] Extra "Instructor" part for viewing course as learner
Oct 15, 2020
a4b560b
[JuniperOeX-283] added request parameter
mykola-s Oct 27, 2020
5dfe859
[JuniperOeX-272] Drop-down list "Назва курсу" works incorrectly on th…
mykola-s Oct 30, 2020
401cdc3
[JuniperOeX-319] Change getting link for templates related to current…
vladhrech Nov 13, 2020
0195301
[JuniperOeX-140] adding a translation "Markdown syntax is allowed. " …
mykola-s Oct 22, 2020
bc1effd
Add RG_CHANGELOG and base RG-LMS Merge Request template.
idegtiarov Jan 29, 2021
6a74052
docs: Update CHANGELOG with the Lilac Release section.
idegtiarov Jun 18, 2021
b9d0b2b
fix: pass required context to bulk enrollment emails
cmltaWt0 Jun 18, 2021
d22146c
feat!: Adding fall back method for `sha1` in case default algo is `sh…
awais786 Oct 11, 2023
882ab74
feat!: update DEFAULT_HASHING_ALGORITHM to sha256
Oct 13, 2023
71f5463
test: update hash value with hash from sha256
Oct 13, 2023
3dff065
fix: email templates caching and account activation email site logo
dyudyunov Jan 28, 2022
058ef22
ci: add basic quality checks
cmltaWt0 Dec 29, 2021
f340618
feat: [RGOeX-391] Cookie policy banner
Lunyachek Feb 7, 2022
dcdfa1c
feat: add the enable_programs command
dyudyunov May 20, 2021
8a8e0de
fix: emails theming
dyudyunov Feb 23, 2022
53d2252
Update CHANGELOG with Maple Release note
idegtiarov May 9, 2022
8df54af
feat: add ability to notify credentials about honor certificates
dyudyunov Jun 21, 2022
b256e9a
refactor: Change RG-LMS MR template with the Default template
idegtiarov Jul 25, 2022
fdf1234
docs: Update RG_CHANGELOG preparing to nutmeg-rg.1 release
idegtiarov Sep 27, 2022
db89fc8
feat: [RGOeX-25142] Certificate exception message visibility fix
Lunyachek Feb 2, 2023
7e13e67
docs: update CHANGELOG with olive-rg.1 release
idegtiarov Apr 14, 2023
4b19324
feat: change the exclude behaviour for search page
dyudyunov May 12, 2023
6fbe322
feat: wysiwyg editor for course overview
dyudyunov May 17, 2023
8be7282
ci: update commitlint job
dyudyunov Jul 14, 2023
633fc16
fix: [RGOeX-25965] validation error for empty field enrollment
DmytroAlipov Jul 7, 2023
bb164a8
Resolve RGOeX-26017 "Lytvynenko//olive header help link cherry picked"
Inferato Oct 12, 2023
6517d84
Merge pull request #32236 from DmytroAlipov/fix-FB-share-Palm
cmltaWt0 Oct 25, 2023
9259411
fix: User retirement 404 for state RETIRING_FORUMS
DmytroAlipov Aug 16, 2023
96ec8d0
Merge pull request #33025 from DmytroAlipov/fix-user-retirement-palm
cmltaWt0 Oct 27, 2023
959b212
feat: [RGOeX-26048] Overridden view for adding EdX Info Pages
DmytroAlipov Oct 31, 2023
df16833
Merge branch 'override-render-for-info-pages' into 'palm-rg'
idegtiarov Oct 31, 2023
df983c9
build: bump palm-rg.1 release
idegtiarov Nov 1, 2023
364d1e1
Merge branch 'palm-rg.1' into 'palm-rg'
idegtiarov Nov 1, 2023
d6f8dc0
feat: [RGOeX-26145] caching was removed
Inferato Nov 13, 2023
efbd1ef
Merge branch 'lytvynenko/RGOeX-26145/learners_count_gradebook' into '…
dyudyunov Nov 13, 2023
cf6e266
Merge pull request #33487 from openedx/backport-hash-commit-palm
cmltaWt0 Nov 15, 2023
c2633ed
Resolve RGOeX-26076 Max name len override cherry pick
Inferato Nov 20, 2023
7c3af18
Merge branch 'lytvynenko/RGOeX-26076/max_name_len_override_cherry_pic…
dyudyunov Nov 20, 2023
f576a41
fix:[RGOeX-26082] override for profile link parsing
Inferato Nov 28, 2023
6eeae51
Merge branch 'lytvynenko/RGOeX-26082/url_with_params_in_profile_parsi…
idegtiarov Nov 28, 2023
8b048bf
Merge branch 'open-release/palm.master' into palm-rg.2
idegtiarov Nov 30, 2023
97ebee9
build: bump palm-rg.2 release
idegtiarov Nov 30, 2023
12daebb
Merge branch 'palm-rg.2' into 'palm-rg'
idegtiarov Nov 30, 2023
f237510
Merge branch 'palm-rg' into 'palm-rg'
idegtiarov Dec 6, 2023
c62cdd1
docs: update the mr template with dor
dyudyunov Dec 7, 2023
497bfff
Merge branch 'update-mr-template-with-dor' into 'palm-rg'
dyudyunov Dec 19, 2023
147f6fc
build: upgrade django version
dyudyunov Feb 12, 2024
9c04571
Merge branch 'upgrade-django-version' into 'palm-rg'
idegtiarov Feb 19, 2024
6f6e5c7
Merge branch 'palm-rg' into 'palm-rg'
dyudyunov Feb 20, 2024
f0845f0
Delete .gitlab-ci.yml file
rackshase-rg Mar 27, 2024
4900100
Added .gitlab-ci.yml file
rackshase-rg Mar 27, 2024
00206fe
feat: [AsPu-73] Add login override
sendr Apr 23, 2024
9bf91f8
Merge branch 'marenych/AsPu-73' into 'main'
sendr Apr 23, 2024
1bfbdaf
fix: [AsPu-235] The user can't log in using ACS credentials
sendr Apr 23, 2024
a2a22fa
Merge branch 'marenych/AsPu-235' into 'main'
sendr Apr 23, 2024
c08c7c0
feat: [AsPu-202] Sync user entitlements with Open edX system
Apr 23, 2024
b50578b
Merge branch 'sagirov/AsPu-202' into 'main'
sendr Apr 24, 2024
038b18e
fix: [AsPu-249] 500 error message when trying to login to LMS with ne…
sendr Apr 25, 2024
5eb8b2b
Merge branch 'marenych/AsPu-249' into 'main'
sendr Apr 25, 2024
50ccb12
feat: apply override for discussions and allow file upload on forum
GlugovGrGlib Apr 25, 2024
f3a02b5
Merge branch 'g-glugovskiy/override_discussions_file_upload' into 'main'
GlugovGrGlib Apr 25, 2024
712248a
patch: add missing function import in certificate template (#33904)
sendr Apr 26, 2024
f944e19
Merge branch 'marenych/patch' into 'main'
sendr Apr 26, 2024
86c749f
feat: create Course Limited Staff role
Agrendalath Jun 21, 2023
853405a
fix: cohorts fix and max threads in inline discussions fix
GlugovGrGlib May 24, 2024
d0f2f55
Merge branch 'g-glugovskiy/fix_discussions_and_gradebook' into 'main'
GlugovGrGlib May 24, 2024
3096d54
fix: lint fix
May 29, 2024
8a727d4
merge
May 29, 2024
1374df2
fix: lint fix
May 29, 2024
a3af382
merge
May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ image: python:latest
stages:
- quality
- conventions
- deploy

variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
Expand Down Expand Up @@ -38,15 +39,20 @@ lint:

commit_convention:
stage: conventions
image: node:16
before_script: []
image:
name: auterion/commitlint
entrypoint: [""]
needs: []
cache:
key: commitlint-node_modules
paths:
- node_modules/
before_script:
- bash -c "[[ -d node_modules/ ]] || npm install @commitlint/cli @commitlint/config-conventional; exit 0;"
script:
- npx --quiet commitlint --from="$CI_MERGE_REQUEST_DIFF_BASE_SHA" --help-url 'https://raccoongang.atlassian.net/wiki/spaces/PSC/pages/2662006787/RG+Delivery+Solutions+Conventional+Commits'
- commitlint
--from="$CI_MERGE_REQUEST_DIFF_BASE_SHA"
--help-url 'https://raccoongang.atlassian.net/wiki/spaces/PSC/pages/2662006787/RG+Delivery+Solutions+Conventional+Commits'
rules:
- if: "$CI_MERGE_REQUEST_EVENT_TYPE != 'merge_train' && $CI_MERGE_REQUEST_DIFF_BASE_SHA"

deploy-dev:
stage: deploy
trigger: hippoteam/aspen-courses/deployment
only:
- "main"
22 changes: 15 additions & 7 deletions .gitlab/merge_request_templates/Default.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
**Description:**
## Description:

A few sentences describing the overall goals of `merge request`.

**Youtrack:**
## Definition of Readiness (DoR):
Use the DRAFT status if there any blockers.
List any blockers for the review/merge here.

- [ ]

## Youtrack:

https://youtrack.raccoongang.com/issue/XXXXX

**Configuration instructions:**
## Configuration instructions:

List any non-trivial configuration instructions (if any).

**Reviewers:**
## Reviewers:
- [ ] @idegtiarov
- [ ] @dyudyunov
- [ ] @alipov_dmytro


**Related Confluence|Other documents:**
## Related Confluence|Other documents:
- < URL to Confluence document 1 >
- < URL to Confluence document 2 >

**Pre-Merge Checklist:**
## Pre-Merge Checklist:

- [ ] Demo status: OK
- [ ] DoRs are closed
- [ ] All related documentation is updated
- [ ] Described your changes in RG_CHANGELOG.rst
base changlog on https://keepachangelog.com/en/1.0.0/
Expand All @@ -32,5 +40,5 @@ List any non-trivial configuration instructions (if any).
- [ ] Confirmed Gitlab reports all automated tests/checks are passing.
- [ ] Approved by at least one additional reviewer.

**Post merge:**
## Post merge:
- [ ] Delete the working branch (if not needed anymore)
80 changes: 46 additions & 34 deletions RG_CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,54 @@ The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`
[Unreleased]
************

[palm-rg.3] 2024-02-12
**********************

Changed
=======

* Upgrade django version to apply security patches `RGOeX-263464 https://youtrack.raccoongang.com/issue/RGOeX-26364`_
* Update the MR template with DoR section `OX-3406 https://youtrack.raccoongang.com/issue/OX-3406`_

[palm-rg.2] 2023-12-01
**********************

Sync:
=====
Update on upstream open-release/palm.4

Changed
=======

* Added ability to add social links with params in profile `RGOeX-26082 <https://youtrack.raccoongang.com/issue/RGOeX-26082>`_

* Changes should be reverted when upstream PR is merged (`master#33565 <https://github.com/openedx/edx-platform/pull/33565>`_, `quince#33610 <https://github.com/openedx/edx-platform/pull/33610>`_)

* "Twitter.com" changed to "x.com" `RGOeX-26082 <https://youtrack.raccoongang.com/issue/RGOeX-26083>`_

* Must be dropped when `Upstream MR <https://github.com/openedx/edx-platform/pull/33613>`_ is merged.

[palm-rg.1] 2023-11-03 (Palm RG release)
****************************************

Changed
=======

* Overridden view for validate user full name length `RGOeX-26076 <https://youtrack.raccoongang.com/issue/RGOeX-26076>`_

* Should be dropped when upstream PR (`master#33501 <https://github.com/openedx/edx-platform/pull/33501>`_, `quince#33615 <https://github.com/openedx/edx-platform/pull/33615>`_) will be merged
* Overridden view for disable user count caching `RGOeX-26145 <https://youtrack.raccoongang.com/issue/RGOeX-26145>`_

* Should be dropped when upstream PR (`master <https://github.com/openedx/edx-platform/pull/33617>`_, `quince <https://github.com/openedx/edx-platform/pull/33618>`_) will be merged

* Overridden view for adding EdX Info Pages `RGOeX-26048 <https://youtrack.raccoongang.com/issue/RGOeX-26048>`_
* Updated doc link for programms `RGOeX-26017 <https://youtrack.raccoongang.com/issue/RGOeX-26017>`_

Fixes
=====

* Fix cleaned version of the thread's body in the preview_body `RGOeX-25633 <https://youtrack.raccoongang.com/issue/RGOeX-25633>`_
* Hot fix validation error for "empty" Batch Enrollment and "empty" Batch Beta Tester Addition (deployment error related to ES6) `RGOeX-25965 <https://youtrack.raccoongang.com/issue/RGOeX-25965>`_
* Fix validation error for "empty" Batch Enrollment and "empty" Batch Beta Tester Addition `RGOeX-25965 <https://youtrack.raccoongang.com/issue/RGOeX-25965>`_

Added
=====
Expand All @@ -31,7 +75,6 @@ Fixes

* This commit should be skipped when we start the sync process with the Quince branch if the `master PR <https://github.com/openedx/edx-platform/pull/31668>`_ will be merged by then

* Fix for the course overview editing field in the Studio
* Course search used wrong import, so search results were empty on the Discover New page.
Fixed import, removed duplicated exclude_dictionary values

Expand All @@ -44,17 +87,9 @@ Changed
* RG-LMS gitlab MR template renamed to the Default template, some minor
changes to the template were also added.

* Remove RG-specific settings that were moved to deployment `RGOeX-1713 <https://youtrack.raccoongang.com/issue/RGOeX-1713>`_

* This reverts changes from the `RGOeX-687 <https://youtrack.raccoongang.com/issue/RGOeX-687>`_

Added
=====

* Add modified favicon redirect view to be able to use the themed version `RGOeX-771 <https://youtrack.raccoongang.com/issue/RGOeX-771>`_ `RGOeX-1564 <https://youtrack.raccoongang.com/issue/RGOeX-1564>`_

* This requires modifications in nginx configurations because favicon url was redifined there for some reason

* Add ability to notify Credentials about received honor course certificate `RGOeX-1413 <https://youtrack.raccoongang.com/issue/RGOeX-1413>`_

* Added the new WaffleFlag `course_modes.extend_certificate_relevant_modes_with_honor`
Expand All @@ -64,8 +99,6 @@ Added
Fixes
=====

* Fix error for the CMS logistration `RGOeX-1597 <https://youtrack.raccoongang.com/issue/RGOeX-1597>`_

* Fix empty signature added after every certificate saving `RGOeX-1659 <https://youtrack.raccoongang.com/issue/RGOeX-1659>`_


Expand All @@ -79,12 +112,6 @@ Fixes
* pass the right site to the email context
* https://youtrack.raccoongang.com/issue/RGOeX-933

[Feature] - 2022-02-15
~~~~~~~~~~~~~~~~~~
* Add default xblock to the requirements

* https://youtrack.raccoongang.com/issue/RGOeX-935

[Fix] - 2022-02-15
~~~~~~~~~~~~~~~~~~
* Fix text mistakes on the cookie policy page
Expand All @@ -97,21 +124,10 @@ Fixes
* `ProgramsApiConfig` doesn’t have the marketing path by default
* removed the `--site-domain` arg, updating site configurations for all sites instead

[Fix] - 2022-02-02
~~~~~~~~~~~~~~~~~~
* Add settings needed for the Studio SSO logins

* Details: https://youtrack.raccoongang.com/issue/RGOeX-687

[Fix] - 2022-01-28
~~~~~~~~~~~~~~~~~~
* Avoid django loaders template caching
* Account activation email site logo theming fix
* Details: https://youtrack.raccoongang.com/issue/RGOeX-411
* Keep localize course dates after user logout
* Details: https://youtrack.raccoongang.com/issue/RGOeX-609
* Upstream MR to master https://github.com/openedx/edx-platform/pull/29772
* Upstream MR to open-release/maple.master https://github.com/openedx/edx-platform/pull/29773
* Details: https://youtrack.raccoongang.com/issue/RGOeX-411

[Fix] - 2022-01-26
~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -155,10 +171,6 @@ Fixes
~~~~~~~~~~~~~~~~
‘enable_programs’ command is added.

[Fix] 2021-04-26
~~~~~~~~~~~~~~~~
‘Linked accounts’ tab is hidden if there are no SSO provider are installed

[Documentation|Enhancement] - 2021-02-24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* RG_CHANGELOG is added!
Expand Down
29 changes: 28 additions & 1 deletion cms/djangoapps/contentstore/views/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
CourseInstructorRole,
CourseStaffRole,
GlobalStaff,
UserBasedRole
UserBasedRole,
OrgStaffRole
)
from common.djangoapps.util.course import get_link_for_about_page
from common.djangoapps.util.date_utils import get_default_time_display
Expand Down Expand Up @@ -597,6 +598,7 @@ def format_in_process_course_view(uca):
'optimization_enabled': optimization_enabled,
'active_tab': 'courses',
'allowed_organizations': get_allowed_organizations(user),
'allowed_organizations_for_libraries': get_allowed_organizations_for_libraries(user),
'can_create_organizations': user_can_create_organizations(user),
})

Expand Down Expand Up @@ -624,6 +626,7 @@ def library_listing(request):
'split_studio_home': split_library_view_on_dashboard(),
'active_tab': 'libraries',
'allowed_organizations': get_allowed_organizations(request.user),
'allowed_organizations_for_libraries': get_allowed_organizations_for_libraries(request.user),
'can_create_organizations': user_can_create_organizations(request.user),
}
return render_to_response('index.html', data)
Expand Down Expand Up @@ -1943,13 +1946,37 @@ def get_allowed_organizations(user):
return []


def get_allowed_organizations_for_libraries(user):
"""
Helper method for returning the list of organizations for which the user is allowed to create libraries.
"""
if settings.FEATURES.get('ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES', False):
return get_organizations_for_non_course_creators(user)
elif settings.FEATURES.get('ENABLE_CREATOR_GROUP', False):
return get_organizations(user)
else:
return []


def user_can_create_organizations(user):
"""
Returns True if the user can create organizations.
"""
return user.is_staff or not settings.FEATURES.get('ENABLE_CREATOR_GROUP', False)


def get_organizations_for_non_course_creators(user):
"""
Returns the list of organizations which the user is a staff member of, as a list of strings.
"""
orgs_map = set()
orgs = OrgStaffRole().get_orgs_for_user(user)
# deduplicate
for org in orgs:
orgs_map.add(org)
return list(orgs_map)


def get_organizations(user):
"""
Returns the list of organizations for which the user is allowed to create courses.
Expand Down
14 changes: 8 additions & 6 deletions cms/djangoapps/contentstore/views/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@
from common.djangoapps.student.roles import (
CourseInstructorRole,
CourseStaffRole,
LibraryUserRole
LibraryUserRole,
OrgStaffRole,
UserBasedRole,
)
from common.djangoapps.util.json_request import JsonResponse, JsonResponseBadRequest, expect_json

from ..config.waffle import REDIRECT_TO_LIBRARY_AUTHORING_MICROFRONTEND
from ..utils import add_instructor, reverse_library_url
from .component import CONTAINER_TEMPLATES, get_component_templates
from .helpers import is_content_creator
from .block import create_xblock_info
from .user import user_with_role

Expand Down Expand Up @@ -79,10 +80,11 @@ def user_can_create_library(user, org=None):
elif user.is_staff:
return True
elif settings.FEATURES.get('ENABLE_CREATOR_GROUP', False):
has_course_creator_role = True
if org:
has_course_creator_role = is_content_creator(user, org)
return get_course_creator_status(user) == 'granted' and has_course_creator_role
is_course_creator = get_course_creator_status(user) == 'granted'
has_org_staff_role = OrgStaffRole().get_orgs_for_user(user).exists()
has_course_staff_role = UserBasedRole(user=user, role=CourseStaffRole.ROLE).courses_with_role().exists()

return is_course_creator or has_org_staff_role or has_course_staff_role
else:
# EDUCATOR-1924: DISABLE_LIBRARY_CREATION overrides DISABLE_COURSE_CREATION, if present.
disable_library_creation = settings.FEATURES.get('DISABLE_LIBRARY_CREATION', None)
Expand Down
12 changes: 6 additions & 6 deletions cms/djangoapps/contentstore/views/tests/test_course_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,13 @@ def check_index_page(self, separate_archived_courses, org):

@ddt.data(
# Staff user has course staff access
(True, 'staff', None, 0, 20),
(False, 'staff', None, 0, 20),
(True, 'staff', None, 0, 21),
(False, 'staff', None, 0, 21),
# Base user has global staff access
(True, 'user', ORG, 2, 20),
(False, 'user', ORG, 2, 20),
(True, 'user', None, 2, 20),
(False, 'user', None, 2, 20),
(True, 'user', ORG, 2, 21),
(False, 'user', ORG, 2, 21),
(True, 'user', None, 2, 21),
(False, 'user', None, 2, 21),
)
@ddt.unpack
def test_separate_archived_courses(self, separate_archived_courses, username, org, mongo_queries, sql_queries):
Expand Down
Loading
Loading