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
3ea2b24b
Commit
3ea2b24b
authored
Jul 26, 2013
by
Kevin Luo
Committed by
Sarina Canelake
Aug 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add HTML editor for authoring bulk email message (adopted from CMS)
parent
907bf6e1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
12 deletions
+73
-12
common/static/css/tiny-mce.css
+0
-0
lms/djangoapps/instructor/views/legacy.py
+13
-4
lms/envs/common.py
+5
-0
lms/static/img/problem-editor-icons.png
+0
-0
lms/static/sass/base/_variables.scss
+5
-2
lms/static/sass/course.scss.mako
+1
-0
lms/static/sass/course/instructor/_email.scss
+18
-0
lms/templates/courseware/instructor_dashboard.html
+18
-6
lms/templates/widgets/html-edit.html
+13
-0
No files found.
c
ms
/static/css/tiny-mce.css
→
c
ommon
/static/css/tiny-mce.css
View file @
3ea2b24b
File moved
lms/djangoapps/instructor/views/legacy.py
View file @
3ea2b24b
...
@@ -23,9 +23,11 @@ from django.core.urlresolvers import reverse
...
@@ -23,9 +23,11 @@ from django.core.urlresolvers import reverse
from
django.core.mail
import
send_mail
from
django.core.mail
import
send_mail
from
django.utils
import
timezone
from
django.utils
import
timezone
from
xmodule_modifiers
import
wrap_xmodule
import
xmodule.graders
as
xmgraders
import
xmodule.graders
as
xmgraders
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
xmodule.html_module
import
HtmlDescriptor
from
courseware
import
grades
from
courseware
import
grades
from
courseware.access
import
(
has_access
,
get_access_group_name
,
from
courseware.access
import
(
has_access
,
get_access_group_name
,
...
@@ -83,7 +85,7 @@ def instructor_dashboard(request, course_id):
...
@@ -83,7 +85,7 @@ def instructor_dashboard(request, course_id):
msg
=
''
msg
=
''
to
=
None
to
=
None
subject
=
None
subject
=
None
html_message
=
None
html_message
=
''
problems
=
[]
problems
=
[]
plots
=
[]
plots
=
[]
datatable
=
{}
datatable
=
{}
...
@@ -785,6 +787,13 @@ s (~10k), it may take 1-2 hours to send all emails.</font>"
...
@@ -785,6 +787,13 @@ s (~10k), it may take 1-2 hours to send all emails.</font>"
else
:
else
:
instructor_tasks
=
None
instructor_tasks
=
None
# HTML editor for email
if
idash_mode
==
'Email'
:
html_module
=
HtmlDescriptor
(
course
.
system
,
{
'data'
:
html_message
})
editor
=
wrap_xmodule
(
html_module
.
get_html
,
html_module
,
'xmodule_edit.html'
)()
else
:
editor
=
None
# display course stats only if there is no other table to display:
# display course stats only if there is no other table to display:
course_stats
=
None
course_stats
=
None
if
not
datatable
:
if
not
datatable
:
...
@@ -801,9 +810,9 @@ s (~10k), it may take 1-2 hours to send all emails.</font>"
...
@@ -801,9 +810,9 @@ s (~10k), it may take 1-2 hours to send all emails.</font>"
'course_stats'
:
course_stats
,
'course_stats'
:
course_stats
,
'msg'
:
msg
,
'msg'
:
msg
,
'modeflag'
:
{
idash_mode
:
'selectedmode'
},
'modeflag'
:
{
idash_mode
:
'selectedmode'
},
'to'
:
to
,
# email
'to'
:
to
,
# email
'subject'
:
subject
,
# email
'subject'
:
subject
,
# email
'
message'
:
html_message
,
# email
'
editor'
:
editor
,
# email
'problems'
:
problems
,
# psychometrics
'problems'
:
problems
,
# psychometrics
'plots'
:
plots
,
# psychometrics
'plots'
:
plots
,
# psychometrics
'course_errors'
:
modulestore
()
.
get_item_errors
(
course
.
location
),
'course_errors'
:
modulestore
()
.
get_item_errors
(
course
.
location
),
...
...
lms/envs/common.py
View file @
3ea2b24b
...
@@ -616,6 +616,11 @@ PIPELINE_JS = {
...
@@ -616,6 +616,11 @@ PIPELINE_JS = {
'output_filename'
:
'js/lms-main_vendor.js'
,
'output_filename'
:
'js/lms-main_vendor.js'
,
'test_order'
:
0
,
'test_order'
:
0
,
},
},
'module-descriptor-js'
:
{
'source_filenames'
:
rooted_glob
(
COMMON_ROOT
/
'static/'
,
'xmodule/descriptors/js/*.js'
),
'output_filename'
:
'js/lms-module-descriptors.js'
,
'test_order'
:
8
,
},
'module-js'
:
{
'module-js'
:
{
'source_filenames'
:
rooted_glob
(
COMMON_ROOT
/
'static'
,
'xmodule/modules/js/*.js'
),
'source_filenames'
:
rooted_glob
(
COMMON_ROOT
/
'static'
,
'xmodule/modules/js/*.js'
),
'output_filename'
:
'js/lms-modules.js'
,
'output_filename'
:
'js/lms-modules.js'
,
...
...
lms/static/img/problem-editor-icons.png
0 → 100644
View file @
3ea2b24b
2.25 KB
lms/static/sass/base/_variables.scss
View file @
3ea2b24b
...
@@ -41,6 +41,10 @@ $green: rgb(37, 184, 90);
...
@@ -41,6 +41,10 @@ $green: rgb(37, 184, 90);
$light-gray
:
#ddd
;
$light-gray
:
#ddd
;
$dark-gray
:
#333
;
$dark-gray
:
#333
;
// used by descriptor css
$lightGrey
:
#edf1f5
;
$darkGrey
:
#8891a1
;
// edx.org marketing site variables
// edx.org marketing site variables
$m-gray
:
#8A8C8F
;
$m-gray
:
#8A8C8F
;
$m-gray-l1
:
#97999B
;
$m-gray-l1
:
#97999B
;
...
@@ -197,4 +201,4 @@ $homepage-bg-image: '../images/homepage-bg.jpg';
...
@@ -197,4 +201,4 @@ $homepage-bg-image: '../images/homepage-bg.jpg';
$login-banner-image
:
url(../images/bg-banner-login.png)
;
$login-banner-image
:
url(../images/bg-banner-login.png)
;
$register-banner-image
:
url(../images/bg-banner-register.png)
;
$register-banner-image
:
url(../images/bg-banner-register.png)
;
$video-thumb-url
:
'../images/courses/video-thumb.jpg'
;
$video-thumb-url
:
'../images/courses/video-thumb.jpg'
;
\ No newline at end of file
lms/static/sass/course.scss.mako
View file @
3ea2b24b
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
@import "course/instructor/instructor";
@import "course/instructor/instructor";
@import "course/instructor/instructor_2";
@import "course/instructor/instructor_2";
@import "course/instructor/email";
@import "course/instructor/email";
@import "xmodule/descriptors/css/module-styles.scss";
// discussion
// discussion
@import "course/discussion/form-wmd-toolbar";
@import "course/discussion/form-wmd-toolbar";
lms/static/sass/course/instructor/_email.scss
View file @
3ea2b24b
.email-editor
{
border
:
1px
solid
#c8c8c8
;
}
.xmodule_edit
{
ul
{
margin
:
0
;
padding
:
0
;
margin-bottom
:
10px
;
list-style
:
none
;
}
a
{
line-height
:
(
16
*
1
.48
)
+
px
;
line-height
:
1
.48rem
;
}
}
.submit-email-action
{
.submit-email-action
{
margin-top
:
10px
;
margin-top
:
10px
;
line-height
:
1
.3
;
line-height
:
1
.3
;
...
...
lms/templates/courseware/instructor_dashboard.html
View file @
3ea2b24b
...
@@ -10,6 +10,12 @@
...
@@ -10,6 +10,12 @@
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery-jvectormap-1.1.1/jquery-jvectormap-1.1.1.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery-jvectormap-1.1.1/jquery-jvectormap-1.1.1.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery-jvectormap-1.1.1/jquery-jvectormap-world-mill-en.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery-jvectormap-1.1.1/jquery-jvectormap-world-mill-en.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/course_groups/cohorts.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/course_groups/cohorts.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/codemirror-compressed.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/tiny_mce/tiny_mce.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/tiny_mce/jquery.tinymce.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror/htmlmixed.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror/css.js')}"
></script>
<
%
static:js
group=
'module-descriptor-js'
/>
%if instructor_tasks is not None:
%if instructor_tasks is not None:
<script
type=
"text/javascript"
src=
"${static.url('js/pending_tasks.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/pending_tasks.js')}"
></script>
%endif
%endif
...
@@ -458,12 +464,11 @@ function goto( mode)
...
@@ -458,12 +464,11 @@ function goto( mode)
%else:
%else:
<input
type=
"text"
id=
"id_subject"
name=
"subject"
maxlength=
"100"
size=
"75"
>
<input
type=
"text"
id=
"id_subject"
name=
"subject"
maxlength=
"100"
size=
"75"
>
%endif
%endif
<label
for=
"id_message"
>
Message:
</label>
<label>
Message:
</label>
%if message:
<div
class=
"email-editor"
>
<textarea
cols=
"100"
id=
"id_message"
name=
"message"
>
${message}
</textarea>
${editor}
%else:
</div>
<textarea
cols=
"100"
id=
"id_message"
name=
"message"
></textarea>
<input
type=
"hidden"
name=
"message"
value=
""
>
%endif
</p>
</p>
<div
class=
"submit-email-action"
>
<div
class=
"submit-email-action"
>
Please try not to email students more than once a day. Important things to consider before sending:
Please try not to email students more than once a day. Important things to consider before sending:
...
@@ -473,6 +478,13 @@ function goto( mode)
...
@@ -473,6 +478,13 @@ function goto( mode)
</ul>
</ul>
<input
type=
"submit"
name=
"action"
value=
"Send email"
>
<input
type=
"submit"
name=
"action"
value=
"Send email"
>
</div>
</div>
<script
type=
"text/javascript"
>
var
emailEditor
=
XModule
.
loadModule
(
$
(
'.xmodule_edit'
));
document
.
idashform
.
onsubmit
=
function
()
{
this
.
message
.
value
=
emailEditor
.
save
()[
'data'
];
return
true
;
}
</script>
%endif
%endif
</form>
</form>
...
...
lms/templates/widgets/html-edit.html
0 → 100644
View file @
3ea2b24b
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<section
class=
"html-editor editor"
>
<ul
class=
"editor-tabs"
>
<li><a
href=
"#"
class=
"visual-tab tab current"
data-tab=
"visual"
>
${_("Visual")}
</a></li>
<li><a
href=
"#"
class=
"html-tab tab"
data-tab=
"advanced"
>
${_("HTML")}
</a></li>
</ul>
<div
class=
"row"
>
<textarea
class=
"tiny-mce"
>
${data | h}
</textarea>
<textarea
name=
""
class=
"edit-box"
>
${data | h}
</textarea>
</div>
</section>
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