Commit Graph

195 Commits

Author SHA1 Message Date
Maria Grimaldi
809ffc3743 feat: connect teams with content groups using dynamic partition generator (#33788)
Implements the connection from the teams feature to the content groups feature. This implementation uses the dynamic partition generator extension point to associate content groups with the users that belong to a Team.

This implementation was heavily inspired by the enrollment tracks dynamic partitions.
2024-04-25 13:02:49 -04:00
Cristhian Garcia
5a36fa9163 feat: add open_managed team type (#33672)
Ref: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3885760525/Open+Managed+Group+Type
2024-02-14 11:30:19 -04:00
ayesha waris
9f136a4149 feat: added notifications when response is endorsed or answered (#34082)
* feat: added notification when response is endorsed or answered

* test: added and fixed test cases

* fix: fixed lint errors

* refactor: changed method name for readibility

* feat: added notification when my response is endorsed

* test: fixed failed test cases
2024-02-01 13:33:16 +05:00
Muhammad Adeel Tajamul
3aeaec35d9 feat: added notifications in legacy discussion experience (#33280) 2023-09-21 08:04:02 +05:00
Braden MacDonald
9b9b88df52 chore: remove some usages of six (Python2 compat) (#32554)
* get rid of six.text_type(s)
* get rid of six.b()
* get rid of six.string_types
* get rid of six.PY2/six.PY3
* get rid of six.iteritems() and six.viewvalues()
2023-07-17 12:18:43 -07:00
Robert Raposa
0a4bc11d8c test: fix team tests for multiple courses
The original tests looked like helpers,
but we are guessing that they were supposed
to be tests.

Additionally, one test had a small bug as written.
It would be more resilient to actually parse the
JSON, but that work is being left for a later time.
For now, it works, but is not resilient.

The original PR can be found here:
https://github.com/openedx/edx-platform/pull/10804
2023-07-07 09:34:17 -04:00
Robert Raposa
65fc388d71 Revert "test: remove unused helper functions from test_views.py"
This reverts commit ad3b5610f1.

Follow-up commit will convert these helpers to actual
tests so they are run.
2023-07-03 13:36:07 -04:00
Rajendra Kadam
ad3b5610f1 test: remove unused helper functions from test_views.py
Since they were not used anywhere, it is ideal to delete them.

It would be redundant to keep them.
2023-06-28 14:35:53 +05:30
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
Jansen Kantor
c281f32595 fix: allow inactive users access to the teams dashboard and api (#31266)
* fix: allow inactive users access to the teams dashboard and api

* style: quality
2022-11-08 15:31:42 -05:00
Braden MacDonald
dcb7ef8821 feat: Read course indexes from MySQL, not MongoDB (#29184)
Description
This is a follow up to #29058 and #29413. This is the next step in moving part of the modulestore data (the course indexes / "active versions" table) from MongoDB to MySQL.

There are four steps planned in moving course index data to MySQL:

Step 1: create the tables in MySQL, start writing to MySQL + MongoDB  done
Step 2: migrate all remaining courses to MySQL  done
Step 3: switch reads from MongoDB to MySQL (this PR)
Step 4 (much later, once we know this is working well): stop writing to MongoDB altogether.
Supporting information
OpenCraft Jira ticket: MNG-2557

Status
 Tested with a large Open edX instance is in progress.

Testing instructions
Try making changes in Studio and verify that they work fine.

Deadline
None
2022-03-09 10:21:09 -05:00
Jansen Kantor
05b8da5d93 feat: teams csv export split username / external key columns (#29981)
When doing import, we ran into an issue where there was a learner with an external program key that was the
same as an existing, completely unrelated edX account username. Rather than try to guess which learner we want
or do the lookups backwards, it seemed that splitting these columns to avoid any ambiguity would be the most
straightforward and simple approach
2022-03-01 20:04:32 -05:00
Michael Terry
cb1bb7fa64 test: switch default test store to the split store
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
  enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences

In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.

For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.
2022-02-04 14:32:50 -05:00
Nathan Sprenkle
1212e3550c feat: ora staff grader backend (#29828)
- Adds Enhanced Staff Grader (ESG) backend-for-frontend (BFF) in `lms/djangoapps/ora_staff_grader`
    - Adds routing to ESG BFF at `{lms_url}/api/ora_staff_grader/*`
    - Adds mock implementation routing at `{lms_url}/api/ora_staff_grader/mock/*`
    - Adds `ORA_GRADING_MICROFRONTEND_URL` setting for routing to ESG microfrontend (MFE)
- Updates to the teams app:
    - Add`get_teams_in_teamset` to the teams API.
    - Add `get_team_names` to teams service.
- Adds `openassessment.staffgrader` app for appropriate ORA migrations.
- Modifies management commands for creation of users.
- Updates test factory to return display org with course overview.

Co-authored-by: jansenk <jkantor@edx.org>
Co-authored-by: Leangseu Kim <lkim@edx.org>
Co-authored-by: Ben Warzeski <bwarzeski@edx.org>
2022-01-31 11:09:41 -05:00
Jawayria
305bd8ff76 chore: Applied lint-amnesty on lms/djangoapps/{teams, verify_student} 2021-12-20 15:45:00 +05:00
Kshitij Sobti
ff61434893 feat: Add a new way to enable/disable teams [BD-38] [TNL-9175] [BB-5066] (#29099)
* feat: Add a new way to enable/disable teams

Adds a new mechanism for enabling/disabling the team feature in a course using an 'enabled' field to the teams config.
If this field is set to true, teams is enabled (team sets/groups) still need to be defined. If this is set to false then teams is disabled whether or not team sets are defined.

* fix: review feedback
2021-11-01 17:12:06 +05:00
Awais Qureshi
34a1cff178 fix: django32 2021-10-03 01:37:49 +05:00
Awais Qureshi
b3459b3589 fix: Fixing test due to the change in django32.
Objects assigned to class attributes in TestCase.setUpTestData() are now isolated for each test method.

https://docs.djangoproject.com/en/3.2/releases/3.2/#tests

BOM-2866
2021-10-02 17:04:03 +05:00
Awais Qureshi
c5f3d75c2b fix: Fixing test due to the change in django32.
Objects assigned to class attributes in TestCase.setUpTestData() are now isolated for each test method.

https://docs.djangoproject.com/en/3.2/releases/3.2/#tests

BOM-2866
2021-10-02 16:15:32 +05:00
Awais Qureshi
7eb00d63c5 fix: Fixing test due to the change in django32.
Objects assigned to class attributes in TestCase.setUpTestData() are now isolated for each test method.

https://docs.djangoproject.com/en/3.2/releases/3.2/#tests

BOM-2866
2021-10-02 00:45:38 +05:00
Awais Qureshi
aa16142659 fix: Fixing test due to the change in django32.
Objects assigned to class attributes in TestCase.setUpTestData() are now isolated for each test method.

https://docs.djangoproject.com/en/3.2/releases/3.2/#tests

BOM-2866
2021-10-02 00:45:18 +05:00
Tim McCormack
c0bed87954 Revert "ENT-4361 | Added user's "id" and "email" as public fields in ACCOUNT_VISIBILITY_CONFIGURATION." (#27942) 2021-06-11 22:53:41 +00:00
Usama Sadiq
3ff951940d refactor: pyupgrade second iteration 2021-05-03 14:55:37 +05:00
stvn
2fa36fb0cf refactor: Move StaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
HammadAhmadWaqas
3aa9248dcf * Added user's "id" and "email" as public fields in ACCOUNT_VISIBILITY_CONFIGURATION.
* Updated api/user/v1/accounts list view to search based on multiple emails as well.
2021-04-12 21:13:53 +05:00
Jawayria
10e9fc5b13 BOM-2352: Removed unused imports from lms/djangoapps/{lti_provider, mobile_api, teams} 2021-02-23 17:23:47 +05:00
M. Zulqarnain
0fdb3fce9a pyupgrade on survey, teams and tests apps (#26647) 2021-02-23 15:50:22 +05:00
Aarif
c828beb5d1 replaced unittest assertions pytest assertions (#26549) 2021-02-23 10:24:42 +05:00
M. Zulqarnain
feaf5011c8 BOM-2287 : Pylint amnesty in teams,tests,survey and verify_student (#26305)
* lint amnesty in teams,tests,survey and verify_student
2021-02-03 18:15:03 +05:00
Nathan Sprenkle
0e194bf517 Add team protection tests for CSV team management (#26019) 2021-01-11 10:42:50 -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
Jansen Kantor
54f6cbdec9 EDUCATOR-5312: Learners unable to create new Teams if 0 teams currently exist (#24948)
* reproduce

* Prevent 404 for empty non-private teamset

* add another teamset to teams view tests

* don't return 404 for staff querying empty private teamset
2020-09-10 12:34:57 -04:00
Jansen Kantor
f0ae71ab76 add get_team_by_team_id to teams service (#24783) 2020-08-17 16:04:34 -04:00
Justin Lapierre
1c57bf1be5 Merge pull request #24348 from edx/EDUCATOR-5080
Educator 5080 - Refactor, rename and update docscript to reflect current teamset driven functionality
2020-07-14 13:57:38 -04:00
Justin Lapierre
6efa2c8f94 EDUCATOR-5080 - Removed repeat argument from test method 2020-07-10 08:58:39 -04:00
Mat Carter
5a90bf7f40 EDUCATOR-5088 - updated test to ensure record is stored. 2020-07-09 14:24:19 -04:00
Justin Lapierre
d5a01142a8 EDUCATOR-5080 - All tests passing, all code review comments addressed 2020-07-08 08:27:04 -04:00
Justin Lapierre
6797c9c0fa EDUCATOR-5080 - Fixing tests 2020-07-08 07:52:29 -04:00
Justin Lapierre
70f5c98fb7 EDUCATOR-5080 - Updated views test case to account for teamset_id as opposed to topic_id 2020-07-01 09:40:46 -04:00
Justin Lapierre
7d47bc39dc EDUCATOR-5080 - Fixed test according to linting rules 2020-07-01 09:28:43 -04:00
Justin Lapierre
8735f8aa0d EDUCATOR-5080 - Fixed linting issue in the tests 2020-07-01 09:07:44 -04:00
Justin Lapierre
ae848f9830 EDUCATOR-5080 - Responding to code review comments, removed deprecated test, updated docstrings, fixed linting issue 2020-07-01 08:39:43 -04:00
Justin Lapierre
6980a996c1 Merge branch 'master' of github.com:edx/edx-platform into EDUCATOR-5080 2020-07-01 06:26:56 -04:00
atesker
d70303a893 EDUCATOR-5127 - update message 2020-06-30 11:55:21 -04:00
Justin Lapierre
638a740625 EDUCATOR-5080 - Removed unused course logic, renamed method to refer to teamsets, updated docstrings, api and tests 2020-06-29 09:35:18 -04:00
Nathan Sprenkle
835ccafa5d Fix team size validation issue (#24290)
* Edit team manage to check sizes at end of import

* Fix size validation to take new teams into account

* Remove redundant max size check

* Consolidate team membership counters

* Remove unused user_ids_by_teamset_id set

* Fix team removal to only occur after validation

* Update team full error message

* Prefetch users when looking up team counts
2020-06-26 11:55:36 -04:00
Jansen Kantor
5c0fd63f13 emit an event when removing users from teams via csv (#24271) 2020-06-22 14:25:05 -04:00
atesker
34171e6d6e Disallow the condition of trying to add a master's learner to a non-protected team. 2020-06-22 09:20:32 -04:00
Nathan Sprenkle
5cedc64f41 Correct team count for private team-sets in Teams tab (#24216)
* Hide private team-sets from users not on a team

* Modify add team count to factor in team visibility

* Fix bug that broke search w/in private team-sets
2020-06-18 15:21:58 -04:00
Jansen Kantor
7e459c7228 EDUCATOR-5069: Display student key in csv export (#24235)
* use external_user_key in teams csv download
2020-06-18 12:13:06 -04:00