Commit Graph

23 Commits

Author SHA1 Message Date
M. Zulqarnain
0fdb3fce9a pyupgrade on survey, teams and tests apps (#26647) 2021-02-23 15:50:22 +05:00
Tim McCormack
80a4437f33 fix: Always save generated anonymous user ID in DB; ignore save=False (#26399)
This deprecates `save=False` for several functions and removes all known
usages of the parameter but does not actually remove the parameter.
Instead, it will emit a deprecation warning if the parameter is used.
We can remove the parameter as soon as we feel sure nothing is using it.

Now that we have refactored `anonymous_id_for_user` to always prefer
retrieving an existing ID from the database -- and observed that only a
small fraction of calls pass save=False -- we can stop respecting
save=False. This opens the door for future improvements, such as generating
random IDs or switching to the external user ID system.

Metrics: I observe that 1 in 16 requests for new, non-request-cached
anon user IDs are made with save=False. But 71% of all calls are served
from the request cache, and 99.7% of the misses are served from the DB.
save=False only appear to come from intermittent spikes as reports are
generated and are low in absolute number.

Also document usage/risk/rotation of secret in anonymous user ID
generation as indicated by `docs/decisions/0008-secret-key-usage.rst`
ADR on `SECRET_KEY` usage.

ref: ARCHBOM-1683
2021-02-08 19:16:05 +00: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
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
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
Mat Carter
b386f0a25e ensure anonymous_id is persisted for each team member in a team 2020-07-09 14:24:19 -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
Jansen Kantor
90885e4193 create team view teamset privacy fixes (#23607) 2020-04-07 22:04:23 -04:00
Jansen Kantor
c096464a3c EDUCATOR-4976 (Part 1): Add teamset type validation to has_specific_team_access (#23539)
Add teamset type validation to has_specific_team_access
2020-04-01 16:40:03 -04:00
Nathan Sprenkle
62d5ff49a0 EDCUATOR-4810: Add team anonymous ID lookup (#22868)
* Add ability for team-members to look up each other's anonymous user IDs for team assignments
2020-01-30 09:50:47 -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
Jansen Kantor
b2f69fc803 EDUCATOR-4858: Update teams service to consider teamset/topic (#22834)
* update teams service and api to consider topic
2020-01-14 16:06:27 -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
Jansen Kantor
92e833d565 add api function and teams service (#22515)
* add api function and teams service
2019-12-18 15:05:02 -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
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
Kyle McCormick
cd3bc236eb Make the team discussion thread private
Develop the capability to allow instructors to designate teams to have private discussions. This way, so non-teammembers cannot view discussion. And the intend is for course teams to manage the team membership as well.
MST-10
2019-10-18 13:06:50 -04:00