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
57bc5c93
Commit
57bc5c93
authored
Aug 22, 2014
by
Waheed Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified request method for change enrollment and bulk beta modify access on instructor dashboard.
LMS-11266
parent
d00bf940
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
lms/djangoapps/instructor/tests/test_api.py
+0
-0
lms/djangoapps/instructor/views/api.py
+10
-11
lms/static/coffee/src/instructor_dashboard/membership.coffee
+2
-0
No files found.
lms/djangoapps/instructor/tests/test_api.py
View file @
57bc5c93
This diff is collapsed.
Click to expand it.
lms/djangoapps/instructor/views/api.py
View file @
57bc5c93
...
...
@@ -211,7 +211,7 @@ def require_level(level):
@ensure_csrf_cookie
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'staff'
)
@require_
query
_params
(
action
=
"enroll or unenroll"
,
identifiers
=
"stringified list of emails and/or usernames"
)
@require_
post
_params
(
action
=
"enroll or unenroll"
,
identifiers
=
"stringified list of emails and/or usernames"
)
def
students_update_enrollment
(
request
,
course_id
):
"""
Enroll or unenroll students by email.
...
...
@@ -250,12 +250,11 @@ def students_update_enrollment(request, course_id):
}
"""
course_id
=
SlashSeparatedCourseKey
.
from_deprecated_string
(
course_id
)
action
=
request
.
GET
.
get
(
'action'
)
identifiers_raw
=
request
.
GET
.
get
(
'identifiers'
)
action
=
request
.
POST
.
get
(
'action'
)
identifiers_raw
=
request
.
POST
.
get
(
'identifiers'
)
identifiers
=
_split_input_list
(
identifiers_raw
)
auto_enroll
=
request
.
GE
T
.
get
(
'auto_enroll'
)
in
[
'true'
,
'True'
,
True
]
email_students
=
request
.
GE
T
.
get
(
'email_students'
)
in
[
'true'
,
'True'
,
True
]
auto_enroll
=
request
.
POS
T
.
get
(
'auto_enroll'
)
in
[
'true'
,
'True'
,
True
]
email_students
=
request
.
POS
T
.
get
(
'email_students'
)
in
[
'true'
,
'True'
,
True
]
email_params
=
{}
if
email_students
:
...
...
@@ -326,7 +325,7 @@ def students_update_enrollment(request, course_id):
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@require_level
(
'instructor'
)
@common_exceptions_400
@require_
query
_params
(
@require_
post
_params
(
identifiers
=
"stringified list of emails and/or usernames"
,
action
=
"add or remove"
,
)
...
...
@@ -340,11 +339,11 @@ def bulk_beta_modify_access(request, course_id):
- action is one of ['add', 'remove']
"""
course_id
=
SlashSeparatedCourseKey
.
from_deprecated_string
(
course_id
)
action
=
request
.
GE
T
.
get
(
'action'
)
identifiers_raw
=
request
.
GE
T
.
get
(
'identifiers'
)
action
=
request
.
POS
T
.
get
(
'action'
)
identifiers_raw
=
request
.
POS
T
.
get
(
'identifiers'
)
identifiers
=
_split_input_list
(
identifiers_raw
)
email_students
=
request
.
GE
T
.
get
(
'email_students'
)
in
[
'true'
,
'True'
,
True
]
auto_enroll
=
request
.
GE
T
.
get
(
'auto_enroll'
)
in
[
'true'
,
'True'
,
True
]
email_students
=
request
.
POS
T
.
get
(
'email_students'
)
in
[
'true'
,
'True'
,
True
]
auto_enroll
=
request
.
POS
T
.
get
(
'auto_enroll'
)
in
[
'true'
,
'True'
,
True
]
results
=
[]
rolename
=
'beta'
course
=
get_course_by_id
(
course_id
)
...
...
lms/static/coffee/src/instructor_dashboard/membership.coffee
View file @
57bc5c93
...
...
@@ -197,6 +197,7 @@ class BetaTesterBulkAddition
$
.
ajax
dataType
:
'json'
type
:
'POST'
url
:
@
$btn_beta_testers
.
data
'endpoint'
data
:
send_data
success
:
(
data
)
=>
@
display_response
data
...
...
@@ -287,6 +288,7 @@ class BatchEnrollment
$
.
ajax
dataType
:
'json'
type
:
'POST'
url
:
$
(
event
.
target
).
data
'endpoint'
data
:
send_data
success
:
(
data
)
=>
@
display_response
data
...
...
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