예제 #1
0
          get_string('template_saved', 'local_evaluations').
          '</font></b></p>';
}

if ($savereturn == 'failed') {
    echo '<p align="center"><b><font color="red">'.
          get_string('saving_failed', 'local_evaluations').
          '</font></b></p>';
}

///////////////////////////////////////////////////////////////////////////
///Print the template-section.
///////////////////////////////////////////////////////////////////////////
if ($do_show == 'templates') {
    echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
    $use_template_form->display();

  //  if (has_capability('local/evaluation:createprivatetemplate', $context) OR
   //             has_capability('local/evaluation:createpublictemplate', $context)) {
        $deleteurl = new moodle_url('/local/evaluations/delete_template.php', array('id' => $id));
        $create_template_form->display();
        echo '<p><a href="'.$deleteurl->out().'">'.
             get_string('delete_templates', 'local_evaluations').
             '</a></p>';
    //} else {
     //   echo '&nbsp;';
   // }

   // if (has_capability('local/evaluation:edititems', $context)) {
        $urlparams = array('action'=>'exportfile', 'id'=>$id);
        $exporturl = new moodle_url('/local/evaluations/export.php', $urlparams);