Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
649b4260
Commit
649b4260
authored
11 years ago
by
Brian Wilson
Browse files
Options
Downloads
Patches
Plain Diff
Change calls in beta instructor dash.
parent
7abd4e36
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/instructor/views/api.py
+10
-14
10 additions, 14 deletions
lms/djangoapps/instructor/views/api.py
lms/djangoapps/instructor/views/legacy.py
+0
-4
0 additions, 4 deletions
lms/djangoapps/instructor/views/legacy.py
with
10 additions
and
18 deletions
lms/djangoapps/instructor/views/api.py
+
10
−
14
View file @
649b4260
...
...
@@ -40,8 +40,6 @@ import analytics.csvs
import
csv
from
bulk_email.models
import
CourseEmail
from
html_to_text
import
html_to_text
from
bulk_email
import
tasks
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -755,7 +753,7 @@ def send_email(request, course_id):
Send an email to self, staff, or everyone involved in a course.
Query Parameters:
-
'
send_to
'
specifies what group the email should be sent to
Options are defined by the Email model in
Options are defined by the
Course
Email model in
lms/djangoapps/bulk_email/models.py
-
'
subject
'
specifies email
'
s subject
-
'
message
'
specifies email
'
s content
...
...
@@ -763,17 +761,15 @@ def send_email(request, course_id):
send_to
=
request
.
POST
.
get
(
"
send_to
"
)
subject
=
request
.
POST
.
get
(
"
subject
"
)
message
=
request
.
POST
.
get
(
"
message
"
)
text_message
=
html_to_text
(
message
)
email
=
CourseEmail
(
course_id
=
course_id
,
sender
=
request
.
user
,
to_option
=
send_to
,
subject
=
subject
,
html_message
=
message
,
text_message
=
text_message
,
)
email
.
save
()
tasks
.
delegate_email_batches
.
delay
(
email
.
id
,
request
.
user
.
id
)
# pylint: disable=E1101
# Create the CourseEmail object. This is saved immediately, so that
# any transaction that has been pending up to this point will also be
# committed.
email
=
CourseEmail
.
create
(
course_id
,
request
.
user
,
send_to
,
subject
,
message
)
# Submit the task, so that the correct InstructorTask object gets created (for monitoring purposes)
instructor_task
.
api
.
submit_bulk_course_email
(
request
,
course_id
,
email
.
id
)
# pylint: disable=E1101
response_payload
=
{
'
course_id
'
:
course_id
}
return
JsonResponse
(
response_payload
)
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/instructor/views/legacy.py
+
0
−
4
View file @
649b4260
...
...
@@ -60,10 +60,6 @@ from xblock.field_data import DictFieldData
from
xblock.fields
import
ScopeIds
from
django.utils.translation
import
ugettext
as
_u
from
bulk_email.models
import
CourseEmail
from
html_to_text
import
html_to_text
from
bulk_email
import
tasks
log
=
logging
.
getLogger
(
__name__
)
# internal commands for managing forum roles:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment