Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c0556a7e
Commit
c0556a7e
authored
Nov 30, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/pylint: disable=W0613/pylint: disable=unused-argument/
parent
e45994b2
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
45 additions
and
45 deletions
+45
-45
cms/djangoapps/contentstore/features/component.py
+1
-1
cms/djangoapps/contentstore/features/course-export.py
+1
-1
cms/djangoapps/contentstore/features/course_import.py
+1
-1
cms/djangoapps/contentstore/features/help.py
+1
-1
cms/djangoapps/contentstore/features/pages.py
+1
-1
cms/djangoapps/contentstore/views/dev.py
+1
-1
cms/djangoapps/contentstore/views/error.py
+1
-1
cms/djangoapps/contentstore/views/item.py
+1
-1
common/djangoapps/course_groups/tests/helpers.py
+1
-1
common/djangoapps/student/management/tests/test_transfer_students.py
+1
-1
common/djangoapps/student/tests/test_microsite.py
+2
-2
common/djangoapps/student/views.py
+1
-1
common/djangoapps/terrain/browser.py
+1
-1
common/djangoapps/terrain/steps.py
+1
-1
common/lib/xmodule/xmodule/contentstore/mongo.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py
+2
-2
common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py
+1
-1
common/test/acceptance/tests/discussion/test_cohorts.py
+1
-1
docs/en_us/developers/source/conf.py
+1
-1
docs/en_us/platform_api/source/conf.py
+1
-1
lms/djangoapps/bulk_email/tests/test_email.py
+1
-1
lms/djangoapps/course_wiki/middleware.py
+1
-1
lms/djangoapps/course_wiki/views.py
+2
-2
lms/djangoapps/instructor/tests/test_api.py
+3
-3
lms/djangoapps/instructor/tests/test_tools.py
+2
-2
lms/djangoapps/instructor/views/api.py
+10
-10
lms/djangoapps/instructor/views/coupons.py
+4
-4
No files found.
cms/djangoapps/contentstore/features/component.py
View file @
c0556a7e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Lettuce formats proposed definitions for unimplemented steps with the
# Lettuce formats proposed definitions for unimplemented steps with the
# argument name "step" instead of "_step" and pylint does not like that.
# argument name "step" instead of "_step" and pylint does not like that.
# pylint: disable=
W0613
# pylint: disable=
unused-argument
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
from
nose.tools
import
assert_true
,
assert_in
,
assert_equal
# pylint: disable=no-name-in-module
from
nose.tools
import
assert_true
,
assert_in
,
assert_equal
# pylint: disable=no-name-in-module
...
...
cms/djangoapps/contentstore/features/course-export.py
View file @
c0556a7e
# pylint: disable=missing-docstring
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=redefined-outer-name
# pylint: disable=
W0613
# pylint: disable=
unused-argument
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
from
component_settings_editor_helpers
import
enter_xml_in_advanced_problem
from
component_settings_editor_helpers
import
enter_xml_in_advanced_problem
...
...
cms/djangoapps/contentstore/features/course_import.py
View file @
c0556a7e
# pylint: disable=missing-docstring
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=redefined-outer-name
# pylint: disable=
W0613
# pylint: disable=
unused-argument
import
os
import
os
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
...
...
cms/djangoapps/contentstore/features/help.py
View file @
c0556a7e
# pylint: disable=missing-docstring
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=redefined-outer-name
# pylint: disable=
W0613
# pylint: disable=
unused-argument
from
nose.tools
import
assert_false
# pylint: disable=no-name-in-module
from
nose.tools
import
assert_false
# pylint: disable=no-name-in-module
from
lettuce
import
step
,
world
from
lettuce
import
step
,
world
...
...
cms/djangoapps/contentstore/features/pages.py
View file @
c0556a7e
# pylint: disable=missing-docstring
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=redefined-outer-name
# pylint: disable=
W0613
# pylint: disable=
unused-argument
from
lettuce
import
world
,
step
from
lettuce
import
world
,
step
from
nose.tools
import
assert_equal
,
assert_in
# pylint: disable=no-name-in-module
from
nose.tools
import
assert_equal
,
assert_in
# pylint: disable=no-name-in-module
...
...
cms/djangoapps/contentstore/views/dev.py
View file @
c0556a7e
...
@@ -3,7 +3,7 @@ Views that are only activated when the project is running in development mode.
...
@@ -3,7 +3,7 @@ Views that are only activated when the project is running in development mode.
These views will NOT be shown on production: trying to access them will result
These views will NOT be shown on production: trying to access them will result
in a 404 error.
in a 404 error.
"""
"""
# pylint: disable=
W0613
# pylint: disable=
unused-argument
from
edxmako.shortcuts
import
render_to_response
from
edxmako.shortcuts
import
render_to_response
from
mako.exceptions
import
TopLevelLookupException
from
mako.exceptions
import
TopLevelLookupException
from
django.http
import
HttpResponseNotFound
from
django.http
import
HttpResponseNotFound
...
...
cms/djangoapps/contentstore/views/error.py
View file @
c0556a7e
# pylint: disable=missing-docstring,
W0613
# pylint: disable=missing-docstring,
unused-argument
from
django.http
import
(
HttpResponse
,
HttpResponseServerError
,
from
django.http
import
(
HttpResponse
,
HttpResponseServerError
,
HttpResponseNotFound
)
HttpResponseNotFound
)
...
...
cms/djangoapps/contentstore/views/item.py
View file @
c0556a7e
...
@@ -585,7 +585,7 @@ def _delete_item(usage_key, user):
...
@@ -585,7 +585,7 @@ def _delete_item(usage_key, user):
store
.
delete_item
(
usage_key
,
user
.
id
)
store
.
delete_item
(
usage_key
,
user
.
id
)
# pylint: disable=
W0613
# pylint: disable=
unused-argument
@login_required
@login_required
@require_http_methods
((
"GET"
,
"DELETE"
))
@require_http_methods
((
"GET"
,
"DELETE"
))
def
orphan_handler
(
request
,
course_key_string
):
def
orphan_handler
(
request
,
course_key_string
):
...
...
common/djangoapps/course_groups/tests/helpers.py
View file @
c0556a7e
...
@@ -20,7 +20,7 @@ class CohortFactory(DjangoModelFactory):
...
@@ -20,7 +20,7 @@ class CohortFactory(DjangoModelFactory):
group_type
=
CourseUserGroup
.
COHORT
group_type
=
CourseUserGroup
.
COHORT
@post_generation
@post_generation
def
users
(
self
,
create
,
extracted
,
**
kwargs
):
# pylint: disable=
W0613
def
users
(
self
,
create
,
extracted
,
**
kwargs
):
# pylint: disable=
unused-argument
"""
"""
Returns the users associated with the cohort.
Returns the users associated with the cohort.
"""
"""
...
...
common/djangoapps/student/management/tests/test_transfer_students.py
View file @
c0556a7e
...
@@ -36,7 +36,7 @@ class TestTransferStudents(ModuleStoreTestCase):
...
@@ -36,7 +36,7 @@ class TestTransferStudents(ModuleStoreTestCase):
"""Disconnects the UNENROLL stub receiver."""
"""Disconnects the UNENROLL stub receiver."""
UNENROLL_DONE
.
disconnect
(
self
.
assert_unenroll_signal
)
UNENROLL_DONE
.
disconnect
(
self
.
assert_unenroll_signal
)
def
assert_unenroll_signal
(
self
,
skip_refund
=
False
,
**
kwargs
):
# pylint: disable=
W0613
def
assert_unenroll_signal
(
self
,
skip_refund
=
False
,
**
kwargs
):
# pylint: disable=
unused-argument
""" Signal Receiver stub for testing that the unenroll signal was fired. """
""" Signal Receiver stub for testing that the unenroll signal was fired. """
self
.
assertFalse
(
self
.
signal_fired
)
self
.
assertFalse
(
self
.
signal_fired
)
self
.
assertTrue
(
skip_refund
)
self
.
assertTrue
(
skip_refund
)
...
...
common/djangoapps/student/tests/test_microsite.py
View file @
c0556a7e
...
@@ -26,7 +26,7 @@ FAKE_MICROSITE = {
...
@@ -26,7 +26,7 @@ FAKE_MICROSITE = {
}
}
def
fake_site_name
(
name
,
default
=
None
):
# pylint: disable=
W0613
def
fake_site_name
(
name
,
default
=
None
):
# pylint: disable=
unused-argument
"""
"""
create a fake microsite site name
create a fake microsite site name
"""
"""
...
@@ -36,7 +36,7 @@ def fake_site_name(name, default=None): # pylint: disable=W0613
...
@@ -36,7 +36,7 @@ def fake_site_name(name, default=None): # pylint: disable=W0613
return
default
return
default
def
fake_microsite_get_value
(
name
,
default
=
None
):
# pylint: disable=
W0613
def
fake_microsite_get_value
(
name
,
default
=
None
):
# pylint: disable=
unused-argument
"""
"""
create a fake microsite site name
create a fake microsite site name
"""
"""
...
...
common/djangoapps/student/views.py
View file @
c0556a7e
...
@@ -1268,7 +1268,7 @@ class AccountValidationError(Exception):
...
@@ -1268,7 +1268,7 @@ class AccountValidationError(Exception):
@receiver
(
post_save
,
sender
=
User
)
@receiver
(
post_save
,
sender
=
User
)
def
user_signup_handler
(
sender
,
**
kwargs
):
# pylint: disable=
W0613
def
user_signup_handler
(
sender
,
**
kwargs
):
# pylint: disable=
unused-argument
"""
"""
handler that saves the user Signup Source
handler that saves the user Signup Source
when the user is created
when the user is created
...
...
common/djangoapps/terrain/browser.py
View file @
c0556a7e
...
@@ -3,7 +3,7 @@ Browser set up for acceptance tests.
...
@@ -3,7 +3,7 @@ Browser set up for acceptance tests.
"""
"""
# pylint: disable=no-member
# pylint: disable=no-member
# pylint: disable=
W0613
# pylint: disable=
unused-argument
from
lettuce
import
before
,
after
,
world
from
lettuce
import
before
,
after
,
world
from
splinter.browser
import
Browser
from
splinter.browser
import
Browser
...
...
common/djangoapps/terrain/steps.py
View file @
c0556a7e
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# pylint: disable=W0614
# pylint: disable=W0614
# Disable the "unused argument" warning because lettuce uses "step"
# Disable the "unused argument" warning because lettuce uses "step"
# pylint: disable=
W0613
# pylint: disable=
unused-argument
# django_url is assigned late in the process of loading lettuce,
# django_url is assigned late in the process of loading lettuce,
# so we import this as a module, and then read django_url from
# so we import this as a module, and then read django_url from
...
...
common/lib/xmodule/xmodule/contentstore/mongo.py
View file @
c0556a7e
...
@@ -18,7 +18,7 @@ from xmodule.modulestore.django import ASSET_IGNORE_REGEX
...
@@ -18,7 +18,7 @@ from xmodule.modulestore.django import ASSET_IGNORE_REGEX
class
MongoContentStore
(
ContentStore
):
class
MongoContentStore
(
ContentStore
):
# pylint: disable=
W0613
# pylint: disable=
unused-argument
def
__init__
(
self
,
host
,
db
,
port
=
27017
,
user
=
None
,
password
=
None
,
bucket
=
'fs'
,
collection
=
None
,
**
kwargs
):
def
__init__
(
self
,
host
,
db
,
port
=
27017
,
user
=
None
,
password
=
None
,
bucket
=
'fs'
,
collection
=
None
,
**
kwargs
):
"""
"""
Establish the connection with the mongo backend and connect to the collections
Establish the connection with the mongo backend and connect to the collections
...
...
common/lib/xmodule/xmodule/modulestore/tests/persistent_factories.py
View file @
c0556a7e
...
@@ -35,7 +35,7 @@ class PersistentCourseFactory(SplitFactory):
...
@@ -35,7 +35,7 @@ class PersistentCourseFactory(SplitFactory):
"""
"""
FACTORY_FOR
=
CourseDescriptor
FACTORY_FOR
=
CourseDescriptor
# pylint: disable=
W0613
# pylint: disable=
unused-argument
@classmethod
@classmethod
def
_create
(
cls
,
target_class
,
course
=
'999'
,
run
=
'run'
,
org
=
'testX'
,
user_id
=
ModuleStoreEnum
.
UserID
.
test
,
def
_create
(
cls
,
target_class
,
course
=
'999'
,
run
=
'run'
,
org
=
'testX'
,
user_id
=
ModuleStoreEnum
.
UserID
.
test
,
master_branch
=
ModuleStoreEnum
.
BranchName
.
draft
,
**
kwargs
):
master_branch
=
ModuleStoreEnum
.
BranchName
.
draft
,
**
kwargs
):
...
@@ -60,7 +60,7 @@ class ItemFactory(SplitFactory):
...
@@ -60,7 +60,7 @@ class ItemFactory(SplitFactory):
display_name
=
factory
.
LazyAttributeSequence
(
lambda
o
,
n
:
"{} {}"
.
format
(
o
.
category
,
n
))
display_name
=
factory
.
LazyAttributeSequence
(
lambda
o
,
n
:
"{} {}"
.
format
(
o
.
category
,
n
))
# pylint: disable=
W0613
# pylint: disable=
unused-argument
@classmethod
@classmethod
def
_create
(
cls
,
target_class
,
parent_location
,
category
=
'chapter'
,
def
_create
(
cls
,
target_class
,
parent_location
,
category
=
'chapter'
,
user_id
=
ModuleStoreEnum
.
UserID
.
test
,
definition_locator
=
None
,
force
=
False
,
user_id
=
ModuleStoreEnum
.
UserID
.
test
,
definition_locator
=
None
,
force
=
False
,
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py
View file @
c0556a7e
...
@@ -95,7 +95,7 @@ def modulestore():
...
@@ -95,7 +95,7 @@ def modulestore():
return
ModuleStoreNoSettings
.
modulestore
return
ModuleStoreNoSettings
.
modulestore
# pylint: disable=
W0613
# pylint: disable=
unused-argument
def
render_to_template_mock
(
*
args
):
def
render_to_template_mock
(
*
args
):
pass
pass
...
...
common/test/acceptance/tests/discussion/test_cohorts.py
View file @
c0556a7e
...
@@ -73,7 +73,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest):
...
@@ -73,7 +73,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest):
self
.
thread_page
=
DiscussionTabSingleThreadPage
(
self
.
browser
,
self
.
course_id
,
thread_id
)
# pylint:disable=W0201
self
.
thread_page
=
DiscussionTabSingleThreadPage
(
self
.
browser
,
self
.
course_id
,
thread_id
)
# pylint:disable=W0201
self
.
thread_page
.
visit
()
self
.
thread_page
.
visit
()
# pylint:
disable=W0613
# pylint:
disable=unused-argument
def
refresh_thread_page
(
self
,
thread_id
):
def
refresh_thread_page
(
self
,
thread_id
):
self
.
browser
.
refresh
()
self
.
browser
.
refresh
()
self
.
thread_page
.
wait_for_page
()
self
.
thread_page
.
wait_for_page
()
...
...
docs/en_us/developers/source/conf.py
View file @
c0556a7e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# pylint: disable=invalid-name
# pylint: disable=invalid-name
# pylint: disable=W0622
# pylint: disable=W0622
# pylint: disable=W0212
# pylint: disable=W0212
# pylint: disable=
W0613
# pylint: disable=
unused-argument
import
os
import
os
from
path
import
path
from
path
import
path
...
...
docs/en_us/platform_api/source/conf.py
View file @
c0556a7e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# pylint: disable=invalid-name
# pylint: disable=invalid-name
# pylint: disable=W0622
# pylint: disable=W0622
# pylint: disable=W0212
# pylint: disable=W0212
# pylint: disable=
W0613
# pylint: disable=
unused-argument
import
os
import
os
from
path
import
path
from
path
import
path
...
...
lms/djangoapps/bulk_email/tests/test_email.py
View file @
c0556a7e
...
@@ -37,7 +37,7 @@ class MockCourseEmailResult(object):
...
@@ -37,7 +37,7 @@ class MockCourseEmailResult(object):
def
get_mock_update_subtask_status
(
self
):
def
get_mock_update_subtask_status
(
self
):
"""Wrapper for mock email function."""
"""Wrapper for mock email function."""
def
mock_update_subtask_status
(
entry_id
,
current_task_id
,
new_subtask_status
):
# pylint: disable=
W0613
def
mock_update_subtask_status
(
entry_id
,
current_task_id
,
new_subtask_status
):
# pylint: disable=
unused-argument
"""Increments count of number of emails sent."""
"""Increments count of number of emails sent."""
self
.
emails_sent
+=
new_subtask_status
.
succeeded
self
.
emails_sent
+=
new_subtask_status
.
succeeded
return
update_subtask_status
(
entry_id
,
current_task_id
,
new_subtask_status
)
return
update_subtask_status
(
entry_id
,
current_task_id
,
new_subtask_status
)
...
...
lms/djangoapps/course_wiki/middleware.py
View file @
c0556a7e
...
@@ -35,7 +35,7 @@ class WikiAccessMiddleware(object):
...
@@ -35,7 +35,7 @@ class WikiAccessMiddleware(object):
# Even though we came from the course, we can't see it. So don't worry about it.
# Even though we came from the course, we can't see it. So don't worry about it.
pass
pass
def
process_view
(
self
,
request
,
view_func
,
view_args
,
view_kwargs
):
# pylint: disable=
W0613
def
process_view
(
self
,
request
,
view_func
,
view_args
,
view_kwargs
):
# pylint: disable=
unused-argument
"""
"""
This function handles authentication logic for wiki urls and redirects from
This function handles authentication logic for wiki urls and redirects from
the "root wiki" to the "course wiki" if the user accesses the wiki from a course url
the "root wiki" to the "course wiki" if the user accesses the wiki from a course url
...
...
lms/djangoapps/course_wiki/views.py
View file @
c0556a7e
...
@@ -21,7 +21,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey
...
@@ -21,7 +21,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
def
root_create
(
request
):
# pylint: disable=
W0613
def
root_create
(
request
):
# pylint: disable=
unused-argument
"""
"""
In the edX wiki, we don't show the root_create view. Instead, we
In the edX wiki, we don't show the root_create view. Instead, we
just create the root automatically if it doesn't exist.
just create the root automatically if it doesn't exist.
...
@@ -30,7 +30,7 @@ def root_create(request): # pylint: disable=W0613
...
@@ -30,7 +30,7 @@ def root_create(request): # pylint: disable=W0613
return
redirect
(
'wiki:get'
,
path
=
root
.
path
)
return
redirect
(
'wiki:get'
,
path
=
root
.
path
)
def
course_wiki_redirect
(
request
,
course_id
):
# pylint: disable=
W0613
def
course_wiki_redirect
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
This redirects to whatever page on the wiki that the course designates
This redirects to whatever page on the wiki that the course designates
as it's home page. A course's wiki must be an article on the root (for
as it's home page. A course's wiki must be an article on the root (for
...
...
lms/djangoapps/instructor/tests/test_api.py
View file @
c0556a7e
...
@@ -79,19 +79,19 @@ REPORTS_DATA = (
...
@@ -79,19 +79,19 @@ REPORTS_DATA = (
@common_exceptions_400
@common_exceptions_400
def
view_success
(
request
):
# pylint: disable=
W0613
def
view_success
(
request
):
# pylint: disable=
unused-argument
"A dummy view for testing that returns a simple HTTP response"
"A dummy view for testing that returns a simple HTTP response"
return
HttpResponse
(
'success'
)
return
HttpResponse
(
'success'
)
@common_exceptions_400
@common_exceptions_400
def
view_user_doesnotexist
(
request
):
# pylint: disable=
W0613
def
view_user_doesnotexist
(
request
):
# pylint: disable=
unused-argument
"A dummy view that raises a User.DoesNotExist exception"
"A dummy view that raises a User.DoesNotExist exception"
raise
User
.
DoesNotExist
()
raise
User
.
DoesNotExist
()
@common_exceptions_400
@common_exceptions_400
def
view_alreadyrunningerror
(
request
):
# pylint: disable=
W0613
def
view_alreadyrunningerror
(
request
):
# pylint: disable=
unused-argument
"A dummy view that raises an AlreadyRunningError exception"
"A dummy view that raises an AlreadyRunningError exception"
raise
AlreadyRunningError
()
raise
AlreadyRunningError
()
...
...
lms/djangoapps/instructor/tests/test_tools.py
View file @
c0556a7e
...
@@ -39,7 +39,7 @@ class TestHandleDashboardError(unittest.TestCase):
...
@@ -39,7 +39,7 @@ class TestHandleDashboardError(unittest.TestCase):
Test handle_dashboard_error decorator.
Test handle_dashboard_error decorator.
"""
"""
def
test_error
(
self
):
def
test_error
(
self
):
# pylint: disable=
W0613
# pylint: disable=
unused-argument
@tools.handle_dashboard_error
@tools.handle_dashboard_error
def
view
(
request
,
course_id
):
def
view
(
request
,
course_id
):
"""
"""
...
@@ -51,7 +51,7 @@ class TestHandleDashboardError(unittest.TestCase):
...
@@ -51,7 +51,7 @@ class TestHandleDashboardError(unittest.TestCase):
self
.
assertEqual
(
response
,
{
'error'
:
'Oh noes!'
})
self
.
assertEqual
(
response
,
{
'error'
:
'Oh noes!'
})
def
test_no_error
(
self
):
def
test_no_error
(
self
):
# pylint: disable=
W0613
# pylint: disable=
unused-argument
@tools.handle_dashboard_error
@tools.handle_dashboard_error
def
view
(
request
,
course_id
):
def
view
(
request
,
course_id
):
"""
"""
...
...
lms/djangoapps/instructor/views/api.py
View file @
c0556a7e
...
@@ -747,7 +747,7 @@ def get_grading_config(request, course_id):
...
@@ -747,7 +747,7 @@ def get_grading_config(request, course_id):
@ensure_csrf_cookie
@ensure_csrf_cookie
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
def
get_sale_records
(
request
,
course_id
,
csv
=
False
):
# pylint: disable=
W0613
, redefined-outer-name
def
get_sale_records
(
request
,
course_id
,
csv
=
False
):
# pylint: disable=
unused-argument
, redefined-outer-name
"""
"""
return the summary of all sales records for a particular course
return the summary of all sales records for a particular course
"""
"""
...
@@ -778,7 +778,7 @@ def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, r
...
@@ -778,7 +778,7 @@ def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, r
@ensure_csrf_cookie
@ensure_csrf_cookie
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
def
get_sale_order_records
(
request
,
course_id
):
# pylint: disable=
W0613
, redefined-outer-name
def
get_sale_order_records
(
request
,
course_id
):
# pylint: disable=
unused-argument
, redefined-outer-name
"""
"""
return the summary of all sales records for a particular course
return the summary of all sales records for a particular course
"""
"""
...
@@ -878,7 +878,7 @@ def re_validate_invoice(obj_invoice):
...
@@ -878,7 +878,7 @@ def re_validate_invoice(obj_invoice):
@ensure_csrf_cookie
@ensure_csrf_cookie
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
def
get_purchase_transaction
(
request
,
course_id
,
csv
=
False
):
# pylint: disable=
W0613
, redefined-outer-name
def
get_purchase_transaction
(
request
,
course_id
,
csv
=
False
):
# pylint: disable=
unused-argument
, redefined-outer-name
"""
"""
return the summary of all purchased transactions for a particular course
return the summary of all purchased transactions for a particular course
"""
"""
...
@@ -906,7 +906,7 @@ def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=
...
@@ -906,7 +906,7 @@ def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=
@ensure_csrf_cookie
@ensure_csrf_cookie
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
def
get_students_features
(
request
,
course_id
,
csv
=
False
):
# pylint: disable=
W0613,
redefined-outer-name
def
get_students_features
(
request
,
course_id
,
csv
=
False
):
# pylint: disable=redefined-outer-name
"""
"""
Respond with json which contains a summary of all enrolled students profile information.
Respond with json which contains a summary of all enrolled students profile information.
...
@@ -976,7 +976,7 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=W06
...
@@ -976,7 +976,7 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=W06
@ensure_csrf_cookie
@ensure_csrf_cookie
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
def
get_coupon_codes
(
request
,
course_id
):
# pylint: disable=
W0613
def
get_coupon_codes
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
Respond with csv which contains a summary of all Active Coupons.
Respond with csv which contains a summary of all Active Coupons.
"""
"""
...
@@ -1044,7 +1044,7 @@ def random_code_generator():
...
@@ -1044,7 +1044,7 @@ def random_code_generator():
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
@require_POST
@require_POST
def
get_registration_codes
(
request
,
course_id
):
# pylint: disable=
W0613
def
get_registration_codes
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
Respond with csv which contains a summary of all Registration Codes.
Respond with csv which contains a summary of all Registration Codes.
"""
"""
...
@@ -1181,7 +1181,7 @@ def generate_registration_codes(request, course_id):
...
@@ -1181,7 +1181,7 @@ def generate_registration_codes(request, course_id):
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
@require_POST
@require_POST
def
active_registration_codes
(
request
,
course_id
):
# pylint: disable=
W0613
def
active_registration_codes
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
Respond with csv which contains a summary of all Active Registration Codes.
Respond with csv which contains a summary of all Active Registration Codes.
"""
"""
...
@@ -1208,7 +1208,7 @@ def active_registration_codes(request, course_id): # pylint: disable=W0613
...
@@ -1208,7 +1208,7 @@ def active_registration_codes(request, course_id): # pylint: disable=W0613
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
@require_POST
@require_POST
def
spent_registration_codes
(
request
,
course_id
):
# pylint: disable=
W0613
def
spent_registration_codes
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
Respond with csv which contains a summary of all Spent(used) Registration Codes.
Respond with csv which contains a summary of all Spent(used) Registration Codes.
"""
"""
...
@@ -1238,7 +1238,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613
...
@@ -1238,7 +1238,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613
@ensure_csrf_cookie
@ensure_csrf_cookie
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_level
(
'staff'
)
def
get_anon_ids
(
request
,
course_id
):
# pylint: disable=
W0613
def
get_anon_ids
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
Respond with 2-column CSV output of user-id, anonymized-user-id
Respond with 2-column CSV output of user-id, anonymized-user-id
"""
"""
...
@@ -1839,7 +1839,7 @@ def proxy_legacy_analytics(request, course_id):
...
@@ -1839,7 +1839,7 @@ def proxy_legacy_analytics(request, course_id):
@require_POST
@require_POST
def
get_user_invoice_preference
(
request
,
course_id
):
# pylint: disable=
W0613
def
get_user_invoice_preference
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
Gets invoice copy user's preferences.
Gets invoice copy user's preferences.
"""
"""
...
...
lms/djangoapps/instructor/views/coupons.py
View file @
c0556a7e
...
@@ -18,7 +18,7 @@ log = logging.getLogger(__name__)
...
@@ -18,7 +18,7 @@ log = logging.getLogger(__name__)
@require_POST
@require_POST
@login_required
@login_required
def
remove_coupon
(
request
,
course_id
):
# pylint: disable=
W0613
def
remove_coupon
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
remove the coupon against the coupon id
remove the coupon against the coupon id
set the coupon is_active flag to false
set the coupon is_active flag to false
...
@@ -48,7 +48,7 @@ def remove_coupon(request, course_id): # pylint: disable=W0613
...
@@ -48,7 +48,7 @@ def remove_coupon(request, course_id): # pylint: disable=W0613
@require_POST
@require_POST
@login_required
@login_required
def
add_coupon
(
request
,
course_id
):
# pylint: disable=
W0613
def
add_coupon
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
add coupon in the Coupons Table
add coupon in the Coupons Table
"""
"""
...
@@ -96,7 +96,7 @@ def add_coupon(request, course_id): # pylint: disable=W0613
...
@@ -96,7 +96,7 @@ def add_coupon(request, course_id): # pylint: disable=W0613
@require_POST
@require_POST
@login_required
@login_required
def
update_coupon
(
request
,
course_id
):
# pylint: disable=
W0613
def
update_coupon
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
update the coupon object in the database
update the coupon object in the database
"""
"""
...
@@ -121,7 +121,7 @@ def update_coupon(request, course_id): # pylint: disable=W0613
...
@@ -121,7 +121,7 @@ def update_coupon(request, course_id): # pylint: disable=W0613
@require_POST
@require_POST
@login_required
@login_required
def
get_coupon_info
(
request
,
course_id
):
# pylint: disable=
W0613
def
get_coupon_info
(
request
,
course_id
):
# pylint: disable=
unused-argument
"""
"""
get the coupon information to display in the pop up form
get the coupon information to display in the pop up form
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment