Skip to content

Commit

Permalink
MDL-13319 skip disabled modules and blocks in cron; merged from MOODL…
Browse files Browse the repository at this point in the history
…E_19_STABLE
  • Loading branch information
skodak committed Feb 3, 2008
1 parent 1e2e2ad commit 0f0a5c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/cron.php
Expand Up @@ -101,7 +101,7 @@

mtrace("Starting activity modules");
get_mailer('buffer');
if ($mods = get_records_select("modules", "cron > 0 AND (($timenow - lastcron) > cron)")) {
if ($mods = get_records_select("modules", "cron > 0 AND (($timenow - lastcron) > cron) AND visible = 1 ")) {
foreach ($mods as $mod) {
$libfile = "$CFG->dirroot/mod/$mod->name/lib.php";
if (file_exists($libfile)) {
Expand Down Expand Up @@ -133,7 +133,7 @@
mtrace("Finished activity modules");

mtrace("Starting blocks");
if ($blocks = get_records_select("block", "cron > 0 AND (($timenow - lastcron) > cron)")) {
if ($blocks = get_records_select("block", "cron > 0 AND (($timenow - lastcron) > cron) AND visible = 1")) {
// we will need the base class.
require_once($CFG->dirroot.'/blocks/moodleblock.class.php');
foreach ($blocks as $block) {
Expand Down

0 comments on commit 0f0a5c2

Please sign in to comment.