/** * print some errors to inform users about this. * * @global object * @return void */ function feedback_print_errors() { global $SESSION, $OUTPUT; feedback_init_feedback_session(); if (empty($SESSION->feedback->errors)) { return; } echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal'); echo $OUTPUT->heading(get_string('handling_error', 'feedback')); echo '<p align="center"><b><font color="black"><pre>'; print_r($SESSION->feedback->errors) . "\n"; echo '</pre></font></b></p>'; echo $OUTPUT->box_end(); echo '<br /><br />'; $SESSION->feedback->errors = array(); //remove errors }
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * prints the form to edit the feedback items such moving, deleting and so on * * @author Andreas Grabs * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package feedback */ require_once "../../config.php"; require_once "lib.php"; require_once 'edit_form.php'; feedback_init_feedback_session(); $id = required_param('id', PARAM_INT); if ($formdata = data_submitted() and !confirm_sesskey()) { print_error('invalidsesskey'); } $do_show = optional_param('do_show', 'edit', PARAM_ALPHA); $moveupitem = optional_param('moveupitem', false, PARAM_INT); $movedownitem = optional_param('movedownitem', false, PARAM_INT); $moveitem = optional_param('moveitem', false, PARAM_INT); $movehere = optional_param('movehere', false, PARAM_INT); $switchitemrequired = optional_param('switchitemrequired', false, PARAM_INT); $current_tab = $do_show; $url = new moodle_url('/mod/feedback/edit.php', array('id' => $id, 'do_show' => $do_show)); if (!($cm = get_coursemodule_from_id('feedback', $id))) { print_error('invalidcoursemodule'); }