Commit Graph

127 Commits

Author SHA1 Message Date
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
M. Zulqarnain
0fdb3fce9a pyupgrade on survey, teams and tests apps (#26647) 2021-02-23 15:50:22 +05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +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
Diana Huang
afeea75d9e Add changes to support ES7 and edx-search 2.0 back into the tree. 2020-11-17 13:23:13 -05:00
Diana Huang
8d652e6a4b Revert "Merge pull request #25515 from edx/diana/edx-search"
This reverts commit 9714d7412f, reversing
changes made to 5bc7c3996b.
2020-11-13 13:16:16 -05:00
Diana Huang
fd730a7af3 Set maximum search size to the ES default max. 2020-11-13 11:13:02 -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
Régis Behmo
daef264ebb Use SettingDictToggle to document ENABLE_ORA_TEAM_SUBMISSIONS 2020-10-29 11:11:02 +01: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
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
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
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
Nathan Sprenkle
e0ddb1e0e2 Team Assignments Dashboard (#24019)
* Add team assignments to frontend

* Limit team assignments to the given teamset

* Remove deprecated django render_to_response

* Move team assignments panel behind feature flag
2020-06-02 15:05:47 -04:00
Ali Akbar
27b0e8d845 Merge pull request #23983 from edx/aakbar/PROD-1362
fix admin unable to delete course team
2020-05-22 13:08:03 +05:00
Ali-D-Akbar
32d4b2dae6 fix admin unable to delete course team
modify delete team unit test for admin

test improvements

test improvements

test improvements

test improvements

add team unauthorized access test

add team unauthorized and forbidden access test
2020-05-22 12:34:47 +05:00
atesker
cfff2a86aa EDUCATOR-5053 2020-05-19 12:07:05 -04:00
Jansen Kantor
9707dcff6e EDUCATOR 5042: Learner's Private Team Appears When Learner Browses all Team Sets (#24004)
* fix query to remove dulicates and incorrect teams
2020-05-15 16:50:31 -04:00
atesker
5462a176a8 EDUCATOR-4990 - Modify team membership via CSV upload. Slight refactoring - removal happens post static validation 2020-05-07 16:23:23 -04:00
Jansen Kantor
a9beda2c20 404 if user does not have access to topic (#23638) 2020-04-09 14:13:12 -04:00
Jansen Kantor
933cb490f2 EDUCATOR-5001: Don't return private teamsets unless user has access to them (#23612)
* hide 'hidden' teamsets from topic listing endpoint
2020-04-09 13:30:05 -04:00
Jansen Kantor
e8d4f93635 eamMembershipListView POST should return 404 when user tries to join team they do not have access to (#23654) 2020-04-08 11:22:52 -04:00
Jansen Kantor
261a7cbbfc TeamMembershipDetailView should return 404 when user tries to join team they do not have access to (#23653) 2020-04-08 11:22:21 -04:00
Jansen Kantor
90885e4193 create team view teamset privacy fixes (#23607) 2020-04-07 22:04:23 -04:00
Jansen Kantor
1b2e10d96e add HasSpecificTeamAccess permission and change tests (#23608) 2020-04-07 21:21:14 -04:00
Jansen Kantor
480642e8c4 EDUCATOR-4995: text search returns private teamsets for anyone in bubble (#23586)
* Manually exclude private_managed teams from text search results
2020-04-07 21:13:42 -04:00
Jansen Kantor
21c6d6b08d EDUCATOR-4952: Allow Users to join one team per open teamset (#23423)
*allow users to join one team per teamset
2020-03-19 13:56:35 -04:00
Nathan Sprenkle
5578cca1cc Show multiple team memberships in My Team tab (#23324)
* Enable pagiation to show all a learner's teams on the "My Teams" tab
* Selectively hide/show pagination on the "My Teams" tab
* Increase "My Teams" page size to 5
2020-03-11 15:05:15 -04:00
Jansen Kantor
919dc5760a EDUCATOR-4918: Hide teams listing for team-sets with privacy enabled (#23293)
* pass teamset type existence flags to the teams tab view
2020-03-05 14:40:26 -05:00
atesker
f26ffb453b EDUCATOR-4943 - update error message
EDUCATOR-4943 - update error message. cr1

EDUCATOR-4943 - update error message. cr2

unit tests

readability
2020-03-05 12:32:39 -05:00
Jansen Kantor
dd5bc541ce add simple queryset (#23252) 2020-03-03 16:43:26 -05:00
atesker
bf14bc97d2 EDUCATOR-4920 Control permission to REST endpoint
EDUCATOR-4920 Control permission to REST endpoint
CR1

EDUCATOR-4920 Control permission to REST endpoint
CR1
2020-03-03 16:04:31 -05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Nathan Sprenkle
c66176da13 Add error reporting to UI for CSV team management (#23035)
* Add error banner for upload memberships errors

* Edit error message language

* Fix linter warnings
2020-02-14 09:58:58 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Jansen Kantor
d4d6b33272 EDUCATOR-4879: Implement teams CSV GET endpoint (#23005)
* wip

* get

* quality

* change oauth2 to deprecated?

* quality

* remove duplicate enrollment check function

* code review
2020-02-06 15:06:23 -05:00
atesker
5a2d98b11d initial layout
interim commit

clean up

Initial unit tests and pylint

pylint cleanup

Unit tests extended and passing. Pylint

WIP - fix Unit tests extended and passing. Pylint

Updated logic to validate before commit.

CR pass1

CR pass1, pep8

pep8 2

interim cr

interim cr2

refactor to using DictReader

removed uneeded mixin

pr comments

encoding fix and return value

Cache teams/membershipos

ncr

cr aed
2020-02-04 13:52:51 -05:00
Manjinder Singh
eb694528e7 Adding metrics to oauth2authentication class (#22970)
Currently, we are working on removing the rest_framework_auth library from edx-platform. For this push, we need to remove the oauth2Authentication class. This PR creates a new class oauth2AuthenticationDeprecated that adds additional new relic metrics. The metrics would allow us to see how often this class is used and its success rate. The hope is that this information will help us with transitioning to a different authentication class.
2020-01-30 09:13:51 -05:00
Jansen Kantor
25baa93af9 EDUCATOR-4877: Implement stubbed API functions using new config values (#22913)
add stubbed api functions, tests
2020-01-24 15:54:32 -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
Alex Wang
f1d2ddc97a no student create team in instructor managed topic (#22432)
Students can't create team in an instructor-managed topic
2019-12-06 13:41:56 -05:00
Kyle McCormick
dcf5d70bc4 Create UI for CSV team management (#22310)
Adds "Manage" sub-tab to course "Teams" tab
with UI for downloading and uploading team
membership CSVs. The upload and download function-
ality are currently not implemented.

The new tab only appears when the user is course staff
and the course has at least one instructor-managed
team-set, which is not the case for any existing
courses, so not current course staff will see this
change.

This ticket will be followed-up upon in MST-44 and
MST-49.

MST-41
2019-12-02 11:27:05 -05:00
Alex Wang
d044ed28b5 Student can NOT modify membership status with team in instructor managed topic (#22286)
* no student change to instructor managed team

* Address comments & fix unit tests

* fix jenkins test failure

* Fix eslint errors

* Fix xss warnings

* Fix bokchoy test
2019-11-25 19:59:51 -05:00
Simon Chen
c5f03adb0e Add the organization protected attribute to team
This is needed so Masters learners will not be in the same team as verfied and audit learners. If the team is designated as organization protected, it will not be visible or accessible by verified or audit track learners
MST-34
2019-11-12 13:03:55 -05:00
Kyle McCormick
4f3262a40b Remove most references to old teams config scheme (#22238)
This is a follow up from MST-16, which was commited
in 3858036a4e.

Changes:
* Enrich course teams_configuration from a plain Dict
  to a custom XBlock field that uses the new TeamsConfig
  wrapper class.
* Remove teams_conf property from course, as the previous
  change made it redundant.
* Update teams_enabled implementation.
* Remove teams_max_size field from course, which is
  no longer semantically correct, as max team size
  is now defined on a teamset level.
* Remove teams_topics in order to discourage use of raw
  teams config dict.
* Add convenience properties teamsets and teamsets_by_id
  to course.
* Allow periods and spaces in teamset IDs to avoid breaking
  existing course teams.

Some parts of the code still use the old raw config data
(identifiable by searching "cleaned_data_old_format"),
which we expect to be slowly factored away as we build
new teams features. MST-40 has been created to remove any
remaining references if necessary.

MST-18

* fix: bokchoy test

* fix: remove pdb break
2019-11-06 20:43:32 -05:00
Kyle McCormick
7dbee1c3dd Ensure Python 3 compatibility of Teams djangoapp (#22096)
* For all files, from __future__ import unicode_literals.
* Add @python_2_unicode_compatible to both models.
* Test six.string_type(obj) for both models.

Also, fix some new pylint warnings and improve model repr methods.

MST-24
2019-10-22 13:42:27 -04:00
Alex Wang
77eb01ff42 resolve pylint violations in lms/djangoapps/teams (#22063)
MST-6
2019-10-18 10:20:55 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Amit
df949d6de1 INCR-480: Make compatible with Python 3.x and fixed line over length limit (#20833) 2019-06-20 16:20:49 -04:00