Commit Graph

54 Commits

Author SHA1 Message Date
Awais Qureshi
683e6f9aba refactor: remove unused imports. 2021-03-19 15:22:03 +05:00
Awais Qureshi
094573e901 BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:17:22 +05:00
Jawayria
8086ca75f2 Applied pylint-amnesty to student 2021-02-03 15:29:53 +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
Dave St.Germain
fedcf045eb Enable access role in django admin 2020-05-07 10:45:24 -04:00
Dave St.Germain
7336ea91fe This refactors instructor dashboard access to use Bridgekeeper permissions and allows the Data Researcher course/org role to access only the data downloads tab of the dashboard.
TNL-7176
2020-04-22 11:06:08 -04:00
Dave St.Germain
8b815b802b Added new role for course data researcher. 2020-01-27 13:55:18 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Jeremy Bowman
47516dbead Run python-modernize on student/*.py (#20411) 2019-05-06 14:50:42 -04:00
Michael Roytman
880a06b981 do not show Create Zendesk Tickets For Suspicious Proctored Exam Attempts Studio Advanced Setting field if user is not edX staff 2018-12-21 11:16:28 -05:00
Nimisha Asthagiri
700a902b68 Cleanup and remove deprecated RequestCache Django app
ARCH-223
2018-09-12 14:39:11 -04:00
Eric Fischer
e18448e27d Silence deprecation warnings
https://docs.djangoproject.com/en/1.11/releases/1.10/#using-user-is-authenticated-and-user-is-anonymous-as-methods
2018-05-02 10:03:50 -04:00
Jeremy Bowman
bf86b3da98 PLAT-1942 Handle xmodule_django field deprecations 2018-02-05 15:05:54 -05:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
bmedx
09e5156543 Remove use of non-relational fields in select_related queries
These changes should not change the actual queries at all, and those
will throw errors in Django 1.11.
2017-11-14 10:10:08 -05:00
Jeremy Bowman
fd6af6b05e ddt usage cleanup 2017-09-05 17:25:51 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Nimisha Asthagiri
adb88e21f3 Bulk-reads and Request caching in Course Grade Report
This reverts commit 5388d5d1fc.
2017-05-10 17:14:29 -04:00
Sanford Student
5388d5d1fc Revert "Bulk-reads and Request caching in Course Grade Report"
This reverts commit 16e9636513.
2017-05-09 16:25:46 -04:00
Nimisha Asthagiri
16e9636513 Bulk-reads and Request caching in Course Grade Report 2017-05-09 08:58:49 -04:00
Ned Batchelder
4a568476fd Remove a number of unneeded super()-delegation methods 2017-04-27 14:12:56 -04:00
noraiz-anwar
5207e2fc91 Remove access for inactive users 2016-12-14 14:26:11 +05:00
Brandon DeRosier
6e23a2ca95 Merge pull request #13196 from open-craft/haikuginger/change-coaches-to-staff
Change CCX coaches to have staff role on CCX courses.
2016-10-07 18:29:14 -04:00
Jesse Shapiro
8533fd9734 Adding change to staff role for new users and draft migration 2016-10-07 11:52:59 -04:00
John Eskew
3614eb2800 Move xmodule_django app to openedx.core.djangoapps 2016-10-06 14:50:40 -04:00
Ned Batchelder
0872732cf0 Fix pylint C7630 (literal used as attribute) violations
There's no need to use a string literal in setattr, delattr, or the
two-argument form of getattr.
2015-11-23 15:32:54 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
Will Daly
ad9d9eb04e Support team UI for regenerating certificates
* Add new role for support staff.
* Move dashboard/support functionality into a new Django app called "support".
* Add support view for searching and regenerating certificates.
* Refactor certificates views into separate files.
2015-08-12 07:09:46 -07:00
Sarina Canelake
8283c07e32 Remove superfluous-parens pylint violations
Skipped 'print' statement violations, as print() is Py3k syntax.
2015-07-13 17:33:28 -04:00
cewing
7f691e4a92 MIT: CCX. Rename POC to CCX
Final official name is Custom Courses for EdX (CCX), rename all code to remove previous name.

Rename the FEATURE constant used to identify this feature

Rename the middleware for the CCX change

rename the constant used for storing the current poc id on the session.

rename the _PocContext threading local

rename the override provider in all places where it is referenced

`PersonalOnlineCoursesOverrideProvider` -> `CustomCoursesForEdxOverrideProvider`

generally rename symbols from overrides.py to replace `poc` with `ccx` where possible without changing model names or attributes

rename more symbols from poc to ccx
rename util functions from app utils module

general symbol renaming poc -> ccx in views.py and related url changes

Rename the coach role wherever it is used.

reword poc_coach to ccx_coach

UI rename

replace POC with CCX globally

template context variable renamed

rename poc_ to ccx_ in urls and all related locations (views, js, scss etc)

remove pocs migrations

Final massive renaming, including models.  Re-built migration.

cleaning up a few tailing references

Fix reference typo in schedule template JS

undo modifications made on the fly in test setup to ensure that our tests are properly isolated from the rest of the system tests.

Fixes jazkarta/edx-platform#38

Clean up some leftover strings and comments

fixing more strings and comments in python files

fix a naming error in the schedule tab that was causing problems in deleting courseware items.

Fixes jazkarta/edx-platform#36

updating tests and utility code to match changes in infrastructure from latest rebase
2015-04-10 23:30:25 -04:00
Chris Rossi
a2cb7fd276 MIT: CCX. Implement Custom Courses for Edx.
This feature provides the ability to designate a "coach" who can create customized runs of an existing course, invite students to participate, and manage students through the run of the course.

In this squashed commit we implement the initial scifi, add the 'POC Coach' course role, refine the scifi, add migrations for models, create POCs, enforce POC Coach role, provide panels for Coach Dashboard, set up rudimentary display of course outline, add and remove units, show/hide all units, and save schedule changes, set dates when adding units, edit dates on units already added and provide some tests.

We also provide mechanisms for invitation and enrollment in a POC (to become CCX) and control the display of blocks to students in a POC.
2015-04-10 23:10:48 -04:00
stephensanchez
aed89e422a Improve Django Admin Panel for Course Access Roles. Related to ECOM-857. Allows internal staff to easily use the Django Admin view to create new finance and sales admins. 2015-01-13 21:57:28 +00:00
Braden MacDonald
6be35e0fc1 Merge pull request #6459 from edx/content-libraries
Content libraries MVP
2015-01-13 11:20:20 -08:00
stephensanchez
b188430679 Enable redeem codes.
Update the redeem code schema

Updating the redeem code schema.

Adding migration file.

Adding course mode support when redeeming a code.

Conflicts:
	lms/djangoapps/shoppingcart/views.py

Add sales admin privileges for redeem code generation.

Making sure redeem code URLs work for verified courses.

pep8 violations

Code Review and Test Cleanup changes

Added tests, fixed tests.

Updating the boolean checks in ecommerce template
2015-01-13 15:21:24 +00:00
Braden MacDonald
fefc70c405 Three levels of user permissions for content libraries:
Admin ("Instructor") - Can edit and assign permissions to other users
Normal ("Staff") - Can edit
User - Can view the library and use content from it but cannot edit it or its blocks.
2015-01-12 13:37:58 +03:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Julia Hansbrough
6b061ad23b Response to CR 2014-09-24 21:20:49 +00:00
Julia Hansbrough
5b3c69bc87 Tests fixed 2014-09-24 17:24:42 +00:00
asadiqbal08
5734d2a883 asadiqbal08:[EX-6] Set up data models and shopping cart enhancements in the LMS
Added username into Authors file

[Ex-12] Add user to input coupon code in the Shopping Cart

[Ex-13] Discount should be reflected in the Payment confirmation page and email

added E-commerce Tab in Instructor Dashboard

added name/email in authors file

removed the is_active column, change the colors scheme, fixed bugs

wip

wip

test github account

STORE_BILLING_INFO set to True

cybersource api update, reference number updated, merchant_data removed from params

View Course buttons on receipt

link for course added to receipt

receipt.html view course button - func update

receipt.html course link update

move new CyberSource implementation to a separate file so that we can keep the original

remove config changes

remove config changes

remove coupon redemption during clear cart and update test cases

[Ex-11]added test cases(E-commerce Tab Instuctor Dashboard)

update data model max_length to 255

remove array paid_course_ids init in views.py

removed the is_active filter=false, added styling to the inactive coupon codes

remove coupon redemption during clear cart and update test cases

[Ex-11]added test cases(E-commerce Tab Instuctor Dashboard)

update data model max_length to 255

Add column to the list of coupons in the E-Commerce tab

Add ability for microsites to specify custom CyberSource secret configuration, i.e. run under different accounts

make the new CyberSource2 also microsite aware

updating migration for student and shopping cart apps

added user signup functionality that orignated from the Microsites

added non-microsite user signup tests

fix the hard coded callback URL to localhost

add comment

Modify e-commerce instructor tab to show a total amount above the coupon listings for admin finance user

made changes as suggested by diana khuang

add the CourseAccessRoles table to the Django Admin website

shopping cart coupon checkout changes as suggested by Jason Bau

changes are made according to the suggesstions on PR#4172

changes made in the coupons file

changes in the coupons get_coupon_info view

fix merge conflict resolution error

changes in the remove_coupon view json response

changes as suggested by David Baumgold

pep8/pylint fixes

Changes as suggested by jasonBau

don't assume item in shopping cart is a PaidCourseRegistration

fix up some logging

changed the urls of the coupon views and use the post to get the values from the request
2014-07-10 09:35:32 -04:00
Calen Pennington
dc7b2f0762 Don't create model objects to check the roles cache 2014-06-09 15:13:31 -04:00
Julia Hansbrough
e3459cd3cb Opaque-Keys: Response to code review 2014-06-09 15:12:22 -04:00
Sarina Canelake
d1672e31f7 Opaque-keys: fix pylint violations 2014-05-24 19:36:09 -04:00
Calen Pennington
06d680cded Don't use Empty directly, let the manager handle it 2014-05-21 14:38:16 -04:00
Calen Pennington
79cf4c7239 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit migrates roles from named groups to a relational table.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-08 07:14:27 -04:00
Waheed Ahmed
c0b50c7f62 Change user.is_authenticated to user.is_authenticated() in roles.py.
LMS-2442
2014-04-07 12:20:20 +05:00
Jay Zoldak
bc30addfb9 Unicode changes to support QRF
fixing unit tests

fixing merge error

fixing xqueue submission issue with unicode url (trial 0.1)

fixing fotmats as commented upon

removing yaml file language selection

Unicode changes to support QRF

removed unnecessary pass in modulestore/init.py

fixing merge error

fixing fotmats as commented upon

removing yaml file language selection

fixing pep8 violations

- fixing pylint violations

pylint violation

fixing line spaces and formats

ignore pylint E1101

remove empty line

fixing pylint violations

 pep8 violations

bulk mail unicode/decode

fix migration error

fix pep8 just to push again

more unicode/decode
Final changes to comments and error messages.
2014-01-30 16:20:36 -05:00
Calen Pennington
8424f610d5 Merge pull request #2171 from cpennington/pylint-cleanup
Fix pylint violations from #2129
2014-01-29 06:38:17 -08:00
Don Mitchell
14be0b6c7a Cache course location translations 2014-01-28 10:34:31 -05:00
Don Mitchell
9d6ed66e24 Add loc mapper fn from locn to CourseLocator 2014-01-22 11:49:03 -05:00