Ejemplo n.º 1
0
    }
    //print the inserted items
    $itempos = 0;
    foreach ($feedbackitems as $feedbackitem) {
        echo $OUTPUT->box_start('feedback_item_box_' . $align);
        $itempos++;
        //Items without value only are labels
        if ($feedbackitem->hasvalue == 1 and $feedback->autonumbering) {
            $itemnr++;
            echo $OUTPUT->box_start('feedback_item_number_' . $align);
            echo $itemnr;
            echo $OUTPUT->box_end();
        }
        echo $OUTPUT->box_start('box generalbox boxalign_' . $align);
        if ($feedbackitem->typ != 'pagebreak') {
            feedback_print_item_complete($feedbackitem, false, false);
        } else {
            echo $OUTPUT->box_start('feedback_pagebreak');
            echo '<hr class="feedback_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', 'feedback'), 'generalbox boxaligncenter boxwidthwide');
}
echo $OUTPUT->continue_button('view.php?id=' . $id);
echo $OUTPUT->box_end();
/// Finish the page
Ejemplo n.º 2
0
                } else {
                    if (isset($feedbackcompletedtmp->id)) {
                        $value = feedback_get_item_value($feedbackcompletedtmp->id,
                                                         $feedbackitem->id,
                                                         true);
                    }
                }
                if ($feedbackitem->hasvalue == 1 AND $feedback->autonumbering) {
                    $itemnr++;
                    echo $OUTPUT->box_start('feedback_item_number_'.$align);
                    echo $itemnr;
                    echo $OUTPUT->box_end();
                }
                if ($feedbackitem->typ != 'pagebreak') {
                    echo $OUTPUT->box_start('box generalbox boxalign_'.$align);
                    feedback_print_item_complete($feedbackitem, $value, $highlightrequired);
                    echo $OUTPUT->box_end();
                }

                echo $OUTPUT->box_end();

                $lastbreakposition = $feedbackitem->position; //last item-pos (item or pagebreak)
                if ($feedbackitem->typ == 'pagebreak') {
                    break;
                } else {
                    $lastitem = $feedbackitem;
                }
            }
            echo $OUTPUT->box_end();
            echo '<input type="hidden" name="id" value="'.$id.'" />';
            echo '<input type="hidden" name="feedbackid" value="'.$feedback->id.'" />';