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
moodle
moodle
Commits
cdc0f4de
Commit
cdc0f4de
authored
Apr 07, 2015
by
Dan Poltawski
Browse files
Merge branch 'MDL-49677' of
https://github.com/sleperf/moodle
parents
8cf919bc
ab2fa7a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
enrol/self/lang/en/enrol_self.php
View file @
cdc0f4de
...
...
@@ -32,7 +32,9 @@ $string['customwelcomemessage_help'] = 'A custom welcome message may be added as
The following placeholders may be included in the message:
* Course name {$a->coursename}
* Link to user\'s profile page {$a->profileurl}'
;
* Link to user\'s profile page {$a->profileurl}
* User email {$a->email}
* User fullname {$a->fullname}'
;
$string
[
'defaultrole'
]
=
'Default role assignment'
;
$string
[
'defaultrole_desc'
]
=
'Select role which should be assigned to users during self enrolment'
;
$string
[
'enrolenddate'
]
=
'End date'
;
...
...
enrol/self/lib.php
View file @
cdc0f4de
...
...
@@ -412,8 +412,9 @@ class enrol_self_plugin extends enrol_plugin {
if
(
trim
(
$instance
->
customtext1
)
!==
''
)
{
$message
=
$instance
->
customtext1
;
$message
=
str_replace
(
'{$a->coursename}'
,
$a
->
coursename
,
$message
);
$message
=
str_replace
(
'{$a->profileurl}'
,
$a
->
profileurl
,
$message
);
$key
=
array
(
'{$a->coursename}'
,
'{$a->profileurl}'
,
'{$a->fullname}'
,
'{$a->email}'
);
$value
=
array
(
$a
->
coursename
,
$a
->
profileurl
,
fullname
(
$user
),
$user
->
email
);
$message
=
str_replace
(
$key
,
$value
,
$message
);
if
(
strpos
(
$message
,
'<'
)
===
false
)
{
// Plain text only.
$messagetext
=
$message
;
...
...
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