}
}
+ if(!empty($CFG->usetags)){
+ require_once($CFG->dirroot.'/tag/lib.php');
+ tag_cron();
+ }
+
} // End of occasional clean-up tasks
}
-/*-------------------- Printing functions -------------------- */
+function tag_cron(){
+
+ tag_instance_table_cleanup();
+
+ $tags = get_all_tags('*');
+
+ foreach ($tags as $tag){
+ cache_correlated_tags($tag->id);
+ }
+
+}
+/*-------------------- Printçing functions -------------------- */
/**
* Prints a box that contains the management links of a tag