echo '<div id="my-content">'; if (in_array('my_caption', $mymodules)) { local_print_static_text('my_caption_static_text', $CFG->wwwroot . '/my/index.php'); } $fooarray = null; $courseareacourses = $excludedcourses = array(); if ((in_array('course_areas', $modules) || in_array('course_areas_and_availables', $modules)) && $config->courseareas > 0) { $excludedcourses = $courseareacourses = local_prefetch_course_areas($fooarray); } echo '<table id="mydashboard" width="100%" cellpadding="10"><tr valign="top">'; if (in_array('left_edition_column', $mymodules)) { $colwidth = 50; echo "<td id=\"my-dashboard-left\" width=\"{$colwidth}%\">"; if (function_exists('local_print_static_text')) { // In case the local_staticguitexts is coming with. local_print_static_text('my_caption_left_column_static_text', $CFG->wwwroot . '/my/index.php'); } if (!empty($myleftmodules)) { foreach ($myleftmodules as $m) { $m = trim($m); if (empty($m) || preg_match('/^\\s+$/', $m)) { continue; // Blank lines. } if (preg_match('/^[!_*#]/', $m)) { continue; // Ignore some modules. } if ($m == 'my_caption' || $m == 'left_edition_column') { continue; // Special cases.
/** * Prints a static div with content stored into central configuration. */ function local_my_print_static($index) { global $OUTPUT, $USER, $CFG; include_once $CFG->dirroot . '/local/staticguitexts/lib.php'; $str = '<div id="custommystaticarea' . $index . '">'; $str .= local_print_static_text('custommystaticarea' . $index, $CFG->wwwroot . '/my/index.php', '', true); $str .= '</div>'; return $str; }