Esempio n. 1
0
if (is_array($templateitems)) {
    $itemnr = 0;
    $align = right_to_left() ? 'right' : 'left';
    echo $OUTPUT->box_start('evaluation_items');
    foreach ($templateitems as $templateitem) {
        echo $OUTPUT->box_start('evaluation_item_box_' . $align);
        if ($templateitem->hasvalue == 1 AND $evaluation->autonumbering) {
            $itemnr++;
            echo $OUTPUT->box_start('evaluation_item_number_' . $align);
            echo $itemnr;
            echo $OUTPUT->box_end();
        }
        echo $OUTPUT->box_start('box generalbox boxalign_' . $align);
        if ($templateitem->typ != 'pagebreak') {
            // echo '<div class="evaluation_item_'.$align.'">';
            evaluation_print_item_preview($templateitem);
        } else {
            echo $OUTPUT->box_start('evaluation_pagebreak');
            echo get_string('pagebreak', 'local_evaluations') . '<hr class="evaluation_pagebreak" />';
            echo $OUTPUT->box_end();
        }
        echo $OUTPUT->box_end();
        echo $OUTPUT->box_end();
    }
    echo $OUTPUT->box_end();
} else {
    echo $OUTPUT->box(get_string('no_items_available_at_this_template', 'local_evaluations'), 'generalbox boxaligncenter boxwidthwide');
}

echo $OUTPUT->footer();
Esempio n. 2
0
            echo '<span class="evaluation_item_command_toggle">';
            $deleteitemurl = new moodle_url('/local/evaluations/delete_item.php');
            $deleteitemurl->params(array('id'=>$id,
                                         'do_show'=>$do_show,
                                         'deleteitem'=>$evaluationitem->id));

            $buttonlink = $deleteitemurl->out();
            $strbutton = get_string('delete_item', 'local_evaluations');
            $src = $OUTPUT->pix_url('t/delete');
            echo '<a class="icon delete" title="'.$strbutton.'" href="'.$buttonlink.'">
                    <img alt="'.$strbutton.'" src="'.$src.'" />
                  </a>';
            echo '</span>';
            echo $OUTPUT->box_end();
            if ($evaluationitem->typ != 'pagebreak') {
                evaluation_print_item_preview($evaluationitem);
            } else {
                echo $OUTPUT->box_start('evaluation_pagebreak');
                echo get_string('pagebreak', 'local_evaluations').'<hr class="evaluation_pagebreak" />';
                echo $OUTPUT->box_end();
            }
            echo $OUTPUT->box_end();
            echo $OUTPUT->box_end();
            echo '<div class="clearer">&nbsp;</div>';
            echo '</li>';
            //Print out the target box if we ar moving an item
            if (isset($SESSION->evaluation->moving) AND $SESSION->evaluation->moving->shouldmoving == 1) {
                echo '<li>';
                $moveposition++;
                $movehereurl->param('movehere', $moveposition);
                echo $OUTPUT->box_start('clipboard'); //Only shown if shouldmoving = 1