Ejemplo n.º 1
0
echo '<form style="display:inline;" action="' . me() . '" method="post">';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
//this div makes the buttons stand side by side
echo '<div style="display:inline">';
$show_edit_func = 'show_edit_' . $typ;
$show_edit_func($item, $usehtmleditor);
echo '</div>';
echo '<input type="hidden" name="id" value="' . $id . '" />';
echo '<input type="hidden" name="position" value="' . $position . '" />';
echo '<input type="hidden" name="itemid" value="' . (isset($item->id) ? $item->id : '') . '" />';
echo '<input type="hidden" name="typ" value="' . $typ . '" />';
echo '<input type="hidden" name="feedbackid" value="' . $feedback->id . '" />';
if (!empty($item->id)) {
    echo feedback_create_action_submit('updateitem_edit_item', array($item), get_string('update_item', 'feedback'), 'edit.php?id=' . $SESSION->feedback->coursemoduleid);
} else {
    echo feedback_create_action_submit('createitem_edit_item', array(), get_string('save_item', 'feedback'), 'edit.php?id=' . $SESSION->feedback->coursemoduleid);
}
echo feedback_create_action_submit('editcancel_edit_item', array(), get_string('cancel'), 'edit.php?id=' . $SESSION->feedback->coursemoduleid);
echo '</form>';
print_simple_box_end();
//echo "<pre>";print_r($SESSION->feedback);echo "</pre>";
if ($typ != 'label') {
    echo '<script language="javascript">';
    echo 'document.getElementById("itemname").focus()';
    echo '</script>';
}
/// Finish the page
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
print_footer($course);
Ejemplo n.º 2
0
echo "</td></tr><tr align='left'><td> \n";
echo "<tr align='left'><td> \n";
echo feedback_create_action('print_picture', array('You clicked on the fourth example'));
echo "</td><td> \n";
echo "echo feedback_create_action('print_picture', array('You clicked on the fourth example'));\n";
echo "</td></tr><tr align='left'><td> \n";
echo "<tr align='left'><td> \n";
echo feedback_create_action('prnt', array('This will produce an error'));
echo "</td><td> \n";
echo "echo feedback_create_action('prnt', array('This will produce an error'));\n";
echo "</td></tr><tr align='left'><td> \n";
echo feedback_create_action('print_picture', array('You were redirect to testpage_2'), 'move.gif', 'print_picture', 'testpage_2.php?id=' . $SESSION->feedback->coursemoduleid);
echo "</td><td> \n";
echo " echo feedback_create_action('print_picture', array('You will be redirected to testpage_2'),'move.gif','print_picture','testpage_2.php?id='.\$SESSION->feedback->coursemoduleid);\n";
echo "</td></tr><tr align='left'><td> \n";
echo feedback_create_action_submit('submitbutton_picture', array('You pressed the submit-button'), 'Just Submit');
echo "</td><td> \n";
echo "echo feedback_create_action_submit('submitbutton_picture', array('You pressed the submit-button'), 'Just Submit');\n";
echo "</td></tr><tr align='left'><td> \n";
echo "</td><td> \n";
echo "</td></tr></table> \n";
echo '</form>';
//-------------------------------------------------------------------------------
//demonstrating hidden variables
//-------------------------------------------------------------------------------
echo '<form action="testpage_1.php?id=' . $SESSION->feedback->coursemoduleid . '" method="post">';
echo "<br /><table><tr align='left'><td width='200px'> \n";
echo "<strong>This is a lonely guy on a form of its own <br />Icon to click on:</strong>";
echo "</td><td> \n";
echo "<strong>PHP to create the button, demonstrates adding hidden variable: </strong>\n";
echo "</td></tr><tr align='left'><td> \n";