mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
MDL-14113 digest finished message now in system lang + eliminated one has_capability call; merged from MOODLE_19_STABLE
This commit is contained in:
parent
2011a95b44
commit
de85c32062
@ -634,10 +634,6 @@ function forum_cron() {
|
||||
//override language
|
||||
course_setup($course);
|
||||
|
||||
$strforums = get_string('forums', 'forum');
|
||||
$canunsubscribe = ! forum_is_forcesubscribed($forum);
|
||||
$canreply = forum_user_can_post($forum, $userto, $cm);
|
||||
|
||||
// Fill caches
|
||||
if (!isset($userto->viewfullnames[$forum->id])) {
|
||||
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
@ -648,6 +644,10 @@ function forum_cron() {
|
||||
$userto->canpost[$forum->id] = forum_user_can_post($forum, $userto, $cm, $modcontext);
|
||||
}
|
||||
|
||||
$strforums = get_string('forums', 'forum');
|
||||
$canunsubscribe = ! forum_is_forcesubscribed($forum);
|
||||
$canreply = $userto->canpost[$forum->id];
|
||||
|
||||
$posttext .= "\n \n";
|
||||
$posttext .= '=====================================================================';
|
||||
$posttext .= "\n \n";
|
||||
@ -750,13 +750,13 @@ function forum_cron() {
|
||||
set_config('digestmailtimelast', $timenow);
|
||||
}
|
||||
|
||||
$USER = $cronuser;
|
||||
course_setup(SITEID); // reset cron user language, theme and timezone settings
|
||||
|
||||
if (!empty($usermailcount)) {
|
||||
mtrace(get_string('digestsentusers', 'forum', $usermailcount));
|
||||
}
|
||||
|
||||
$USER = $cronuser;
|
||||
course_setup(SITEID); // reset cron user language, theme and timezone settings
|
||||
|
||||
if (!empty($CFG->forum_lastreadclean)) {
|
||||
$timenow = time();
|
||||
if ($CFG->forum_lastreadclean + (24*3600) < $timenow) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user