Ejemplo n.º 1
0
 function display_default()
 {
     global $CFG, $USER, $OUTPUT;
     $context = context_system::instance();
     if (has_capability('local/elisprogram:manage', $context) || has_capability('local/elisprogram:config', $context)) {
         echo $OUTPUT->heading(get_string('admin_dashboard', 'local_elisprogram'));
         echo $OUTPUT->box(html_writer::tag('p', get_string('elis_doc_class_link', 'local_elisprogram')));
         echo $OUTPUT->box(html_writer::tag('p', $this->last_cron_runtimes()));
         $healthpg = new healthpage();
         if ($healthpg->can_do_default()) {
             echo $OUTPUT->box(html_writer::tag('p', get_string('health_check_link', 'local_elisprogram', $CFG)));
         }
         // Output ELIS version info
         echo $OUTPUT->box($this->elis_versions());
     }
     if ($cmuid = cm_get_crlmuserid($USER->id)) {
         $user = new user($cmuid);
         echo $user->get_dashboard();
     }
 }
Ejemplo n.º 2
0
 function action_default()
 {
     global $CFG, $CURMAN, $USER;
     $context = get_context_instance(CONTEXT_SYSTEM);
     if (has_capability('block/curr_admin:managecurricula', $context)) {
         echo print_heading_block('Administrator Dashboard', '', true);
         echo '<p>';
         echo get_string('elis_doc_class_link', 'block_curr_admin');
         echo '</p><p>';
         echo $this->last_cron_runtimes();
         echo '</p>';
         $healthpg = new healthpage();
         if ($healthpg->can_do_default()) {
             echo '<p>', get_string('health_check_link', 'block_curr_admin', $CFG->wwwroot), '</p>';
         }
         echo print_heading(get_string('elisversion', 'block_curr_admin') . ': ' . $CURMAN->release, 'right', '4', 'main', true);
     }
     if ($cmuid = cm_get_crlmuserid($USER->id)) {
         $user = new user($cmuid);
         echo $user->get_dashboard();
     }
 }