Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
moodle-assignfeedback_editpdfplus
Commits
2e7ee676
Commit
2e7ee676
authored
Nov 30, 2016
by
M. Chardon
Browse files
modif contenu mail
parent
c0a564ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
ajax.php
View file @
2e7ee676
...
...
@@ -146,15 +146,38 @@ if ($action == 'loadallpages') {
}
if
(
$refresh
)
{
$teachers
=
get_users_by_capability
(
$context
,
'mod/assign:grade'
);
$body
=
"La correction du devoir a été mise à jour. Vous pouvez accéder au document en suivant ce lien : "
$teachers
=
get_users_by_capability
(
$context
,
'mod/assignfeedback_editpdf:notify'
);
$contextb
=
$assignment
->
get_context
();
$course
=
$assignment
->
get_course
();
$coursemodule
=
$assignment
->
get_course_module
();
$modulename
=
get_string
(
'modulename'
,
'assign'
);
$assignmentname
=
$assignment
->
get_instance
()
->
name
;
$formatparams
=
array
(
'context'
=>
$contextb
->
get_course_context
());
$body
=
format_string
(
$course
->
shortname
,
true
,
$formatparams
)
.
' -> '
.
$modulename
.
' -> '
.
format_string
(
$assignmentname
,
true
,
$formatparams
)
.
"
\n
"
.
"
\n
---------------------------------------------------------------------
\n
"
.
"La correction du devoir a été mise à jour. Vous pouvez accéder au document en suivant ce lien : "
.
$response
->
url
.
"
\n\n
Ceci est un mail automatique."
;
$bodyhtml
=
"<html><b>Information Moodle</b><br/>"
$bodyhtml
=
'<p><font face="sans-serif">'
.
'<a href="'
.
$CFG
->
wwwroot
.
'/course/view.php?id='
.
$course
->
id
.
'">'
.
format_string
(
$course
->
shortname
,
true
,
$formatparams
)
.
'</a> ->'
.
'<a href="'
.
$CFG
->
wwwroot
.
'/mod/assign/index.php?id='
.
$course
->
id
.
'">'
.
$modulename
.
'</a> ->'
.
'<a href="'
.
$CFG
->
wwwroot
.
'/mod/assign/view.php?id='
.
$coursemodule
->
id
.
'">'
.
format_string
(
$assignmentname
,
true
,
$formatparams
)
.
'</a></font></p>'
.
'<hr /><font face="sans-serif">'
.
"<b>Information Moodle</b><br/>"
.
"<p>La correction du devoir a été mise à jour. Vous pouvez accéder au document en suivant ce <a href='"
.
$response
->
url
.
"'>lien</a></p>"
.
"<i>Ceci est un mail automatique.</i>
</html>
"
;
.
"<i>Ceci est un mail automatique.</i>"
;
foreach
(
$teachers
as
$teacher
)
{
$res
=
email_to_user
(
$teacher
,
$USER
,
"[Moodle] Mise à jour devoir"
,
$body
,
$bodyhtml
);
}
...
...
db/access.php
View file @
2e7ee676
...
...
@@ -22,12 +22,23 @@
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$capabilities
=
array
(
'mod/assignfeedback_editpdf:use'
=>
array
(
'captype'
=>
'write'
,
'contextlevel'
=>
CONTEXT_MODULE
,
'archetypes'
=>
array
(
)
),
'mod/assignfeedback_editpdf:notify'
=>
array
(
'captype'
=>
'read'
,
'contextlevel'
=>
CONTEXT_MODULE
,
'archetypes'
=>
array
(
'teacher'
=>
CAP_ALLOW
,
'editingteacher'
=>
CAP_ALLOW
)
)
);
version.php
View file @
2e7ee676
...
...
@@ -24,7 +24,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
version
=
20161
017
00
;
$plugin
->
version
=
20161
129
00
;
$plugin
->
requires
=
2016051900
;
$plugin
->
dependencies
=
array
(
'assignfeedback_editpdf'
=>
2016052300
...
...
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