$string['blocksettings'] = 'Manage blocks';
$string['bloglevel'] = 'Blog visibility';
$string['bloglevelupgrade'] = 'Blog visibility upgrade';
-$string['bloglevelupgradebody'] = 'Hi! You are receiving this message as an administrator of $a->sitename.
-
-This site has recently been upgraded to Moodle 2.0.
-
-Blog visibility was simplified in 2.0, but your site still uses one of the old visibility types.
-
-To preserve the course-based or group-based visibility of the blog entries on your site, you need to run the following upgrade script, which will create a special "blog" type forum in each course whose enrolled users have posted blog entries, and will copy these blog entries in this special forum.
-
-Blogs will then be entirely switched off at the site level. No blog entries will be deleted in the process.
-
-You can run the script by visiting $a->fixurl.
-';
-$string['bloglevelupgradehtml'] = '<p>Hi! You are receiving this message as an administrator of $a->sitename.</p>
-
-<p>This site has recently been upgraded to Moodle 2.0.</p>
-
+$string['bloglevelupgradedescription'] = '<p>This site has recently been upgraded to Moodle 2.0.</p>
<p>Blog visibility was simplified in 2.0, but your site still uses one of the old visibility types. </p>
-
-<p>To preserve the course-based or group-based visibility of the blog entries on your site, you need to run the following upgrade script, which will create a special "blog" type forum in each course whose enrolled users have posted blog entries, and will copy these blog entries in this special forum. </p>
-
+<p>To preserve the course-based or group-based visibility of the blog entries on your site, you need to run the following upgrade script, which will create a special \"blog\" type forum in each course whose enrolled users have posted blog entries, and will copy these blog entries in this special forum. </p>
<p>Blogs will then be entirely switched off at the site level. No blog entries will be deleted in the process.</p>
-
<p>You can run the script by visiting <a href=\"$a->fixurl\">the blog level upgrade page</a>.</p>';
$string['bloglevelupgradeinfo'] = 'Blog visibility was simplified in 2.0, but your site still uses one of the old visibility types. To preserve the course-based or group-based visibility of the blog entries on your site, the following upgrade script will create a special "blog" type forum in each course whose enrolled users have posted blog entries, and will copy these blog entries in this special forum. Blogs will then be entirely switched off at the site level. No blog entries will be deleted in the process.';
$string['bloglevelupgradenotice'] = 'Your site is using an old blog visibility setting, the <a href=\"bloglevelupgrade.php\">blog visibility upgrade</a> is recommended.';
$a->sitename = $site->fullname;
$a->fixurl = "$CFG->wwwroot/$CFG->admin/bloglevelupgrade.php";
- $subject = get_string('bloglevelupgrade', 'admin');
- $plainbody = get_string('bloglevelupgradebody', 'admin', $a);
- $htmlbody = get_string('bloglevelupgradehtml', 'admin', $a);
-
- foreach ($admins as $admin) {
- $eventdata = new object();
- $eventdata->component = 'moodle';
- $eventdata->userfrom = $USER;
- $eventdata->userto = $admin;
- $eventdata->subject = $subject;
- $eventdata->fullmessage = $plainbody;
- $eventdata->fullmessageformat = FORMAT_PLAIN;
- $eventdata->fullmessagehtml = $htmlbody;
- events_trigger('message_send', $eventdata);
- }
+ $subject = get_string('bloglevelupgrade', 'admin');
+ $description = get_string('bloglevelupgradedescription', 'admin', $a);
+
+ // can not use messaging here because it is not configured yet!
+ upgrade_log(UPGRADE_LOG_NOTICE, null, $subject, $description);
}
/// Main savepoint reached
upgrade_main_savepoint($result, 2009103000);