Example #1
0
                        if($trainer_exist|| is_siteadmin())
                        $true = false;
                        else
                        $true = true;
                        $value = evaluation_get_item_value($evaluationcompletedtmp->id, $evaluationitem->id, $true);
                    }
                }
                if ($evaluationitem->hasvalue == 1 AND $evaluation->autonumbering) {
                    $itemnr++;
                    echo $OUTPUT->box_start('evaluation_item_number_' . $align);
                    echo $itemnr;
                    echo $OUTPUT->box_end();
                }
                if ($evaluationitem->typ != 'pagebreak') {
                    echo $OUTPUT->box_start('box generalbox boxalign_' . $align);
                    evaluation_print_item_complete($evaluationitem, $value, $highlightrequired);
                    echo $OUTPUT->box_end();
                }

                echo $OUTPUT->box_end();

                $lastbreakposition = $evaluationitem->position; //last item-pos (item or pagebreak)
                if ($evaluationitem->typ == 'pagebreak') {
                    break;
                } else {
                    $lastitem = $evaluationitem;
                }
            }
            echo $OUTPUT->box_end();
            echo '<input type="hidden" name="id" value="' . $id . '" />';
            echo '<input type="hidden" name="evaluationid" value="' . $evaluation->id . '" />';
Example #2
0
    }
    //print the inserted items
    $itempos = 0;
    foreach ($evaluationitems as $evaluationitem) {
        echo $OUTPUT->box_start('evaluation_item_box_' . $align);
        $itempos++;
        //Items without value only are labels
        if ($evaluationitem->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 ($evaluationitem->typ != 'pagebreak') {
            evaluation_print_item_complete($evaluationitem, false, false);
        } else {
            echo $OUTPUT->box_start('evaluation_pagebreak');
            echo '<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_yet', 'local_evaluations'), 'generalbox boxaligncenter boxwidthwide');
}
//echo $OUTPUT->continue_button('view.php?id='.$id.'&clid='.$classid.'');
echo $OUTPUT->single_button('view.php?id=' . $id . '&clid=' . $classid . '', get_string('back', 'local_evaluations'), 'post');
echo $OUTPUT->box_end();