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
integration
prechecker
Commits
a1708181
Commit
a1708181
authored
Jan 04, 2011
by
andyjdavis
Browse files
course MDL-25831 made course request notifications work
parent
c63ebd43
Changes
5
Hide whitespace changes
Inline
Side-by-side
course/lib.php
View file @
a1708181
...
...
@@ -4074,8 +4074,7 @@ class course_request {
*/
protected
function
notify
(
$touser
,
$fromuser
,
$name
=
'courserequested'
,
$subject
,
$message
)
{
$eventdata
=
new
stdClass
();
$eventdata
->
modulename
=
'moodle'
;
$eventdata
->
component
=
'course'
;
$eventdata
->
component
=
'moodle'
;
$eventdata
->
name
=
$name
;
$eventdata
->
userfrom
=
$fromuser
;
$eventdata
->
userto
=
$touser
;
...
...
@@ -4084,6 +4083,7 @@ class course_request {
$eventdata
->
fullmessageformat
=
FORMAT_PLAIN
;
$eventdata
->
fullmessagehtml
=
''
;
$eventdata
->
smallmessage
=
''
;
$eventdata
->
notification
=
1
;
message_send
(
$eventdata
);
}
}
course/request.php
View file @
a1708181
...
...
@@ -40,7 +40,10 @@ if (isguestuser()) {
if
(
empty
(
$CFG
->
enablecourserequests
))
{
print_error
(
'courserequestdisabled'
,
''
,
$returnurl
);
}
require_capability
(
'moodle/course:request'
,
get_context_instance
(
CONTEXT_SYSTEM
));
$context
=
get_context_instance
(
CONTEXT_SYSTEM
);
require_capability
(
'moodle/course:request'
,
$context
);
$PAGE
->
set_context
(
$context
);
/// Set up the form.
$data
=
course_request
::
prepare
();
...
...
@@ -67,4 +70,4 @@ echo $OUTPUT->header();
echo
$OUTPUT
->
heading
(
$strtitle
);
// Show the request form.
$requestform
->
display
();
echo
$OUTPUT
->
footer
();
\ No newline at end of file
echo
$OUTPUT
->
footer
();
lang/en/moodle.php
View file @
a1708181
...
...
@@ -986,6 +986,9 @@ $string['messagebody'] = 'Message body';
$string
[
'messagedselectedusers'
]
=
'Selected users have been messaged and the recipient list has been reset.'
;
$string
[
'messagedselectedusersfailed'
]
=
'Something went wrong while messaging selected users. Some may have received the email.'
;
$string
[
'messageprovider:backup'
]
=
'Backup notifications'
;
$string
[
'messageprovider:courserequestapproved'
]
=
'Course creation request approval notification'
;
$string
[
'messageprovider:courserequested'
]
=
'Course creation request notification'
;
$string
[
'messageprovider:courserequestrejected'
]
=
'Course creation request rejection notification'
;
$string
[
'messageprovider:errors'
]
=
'Important errors with the site'
;
$string
[
'messageprovider:errors_help'
]
=
'These are important errors that an administrator should know about.'
;
$string
[
'messageprovider:notices'
]
=
'Notices about minor problems'
;
...
...
lib/db/messages.php
View file @
a1708181
...
...
@@ -43,6 +43,21 @@ $messageproviders = array (
'backup'
=>
array
(
'capability'
=>
'moodle/site:config'
),
//course creation request notification
'courserequested'
=>
array
(
'capability'
=>
'moodle/site:approvecourse'
),
//course request approval notification
'courserequestapproved'
=>
array
(
'capability'
=>
'moodle/course:request'
),
//course request rejection notification
'courserequestrejected'
=>
array
(
'capability'
=>
'moodle/course:request'
)
);
version.php
View file @
a1708181
...
...
@@ -29,7 +29,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$version
=
20101
229
00
;
// YYYYMMDD = date of the last version bump
$version
=
201
1
01
04
00
;
// YYYYMMDD = date of the last version bump
// XX = daily increments
$release
=
'2.0.1+ (Build: 20101229)'
;
// Human-friendly version name
Write
Preview
Supports
Markdown
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