Exemplo n.º 1
0
         }
     }
 } else {
     if ($mode == 'selectbareme') {
         echo $OUTPUT->header();
         $occurrence_object->tabs($mode, $currenttab);
         echo '<div align="center"><h2><img src="' . $icon . '" border="0" title="" alt="" /> ' . get_string('newbaremes', 'referentiel') . ' ' . $OUTPUT->help_icon('baremeh', 'referentiel') . '</h2></div>' . "\n";
         echo $OUTPUT->box_start('generalbox  boxaligncenter');
         echo $OUTPUT->confirm(get_string('confirmexchange', 'referentiel') . ' ' . $OUTPUT->help_icon('baremeechangeh', 'referentiel'), 'bareme.php?blockid=' . $blockid . '&amp;courseid=' . $courseid . '&amp;occurrenceid=' . $occurrenceid . '&amp;baremeid=' . $baremeid . '&amp;mode=echangebareme&amp;confirm=1&amp;sesskey=' . sesskey(), 'bareme.php?blockid=' . $blockid . '&amp;courseid=' . $courseid . '&amp;occurrenceid=' . $occurrenceid . '&amp;mode=bareme&amp;confirm=0&amp;sesskey=' . sesskey());
         echo $OUTPUT->box_end();
         echo $OUTPUT->footer();
         die;
     } else {
         if ($mode == 'echangebareme' && confirm_sesskey()) {
             if ($confirm = optional_param('confirm', 0, PARAM_INT)) {
                 referentiel_echange_bareme_occurrence($baremeid, $occurrence_object->referentiel->id);
             }
         } else {
             if ($mode == 'confirmdeletebareme' && confirm_sesskey()) {
                 if ($confirm = optional_param('confirm', 0, PARAM_INT)) {
                     referentiel_delete_bareme_occurrence($baremeid, $occurrence_object->referentiel->id);
                 }
             } else {
                 if ($mode == 'deletebareme') {
                     echo $OUTPUT->header();
                     $occurrence_object->tabs($mode, $currenttab);
                     echo '<div align="center"><h2><img src="' . $icon . '" border="0" title="" alt="" /> ' . get_string('newbaremes', 'referentiel') . ' ' . $OUTPUT->help_icon('baremeh', 'referentiel') . '</h2></div>' . "\n";
                     echo $OUTPUT->box_start('generalbox  boxaligncenter');
                     echo $OUTPUT->confirm(get_string('confirmdelete', 'referentiel') . ' ' . $OUTPUT->help_icon('deletescaleh', 'referentiel'), 'bareme.php?blockid=' . $blockid . '&amp;courseid=' . $courseid . '&amp;occurrenceid=' . $occurrenceid . '&amp;baremeid=' . $baremeid . '&amp;mode=confirmdeletebareme&amp;confirm=1&amp;sesskey=' . sesskey(), 'bareme.php?blockid=' . $blockid . '&amp;courseid=' . $courseid . '&amp;occurrenceid=' . $occurrenceid . '&amp;mode=bareme&amp;confirm=0&amp;sesskey=' . sesskey());
                     echo $OUTPUT->box_end();
                     echo $OUTPUT->footer();
Exemplo n.º 2
0
     // echo "<br>DEBUG :: $scaleid selected\n";
     if ($scale = $DB->get_record('scale', array('id' => $scaleid))) {
         // print_object($scale);
         if ($rec_bareme = referentiel_scale_2_bareme($scale)) {
             // print_object($rec_bareme);
             referentiel_affiche_bareme($rec_bareme);
             referentiel_modifier_bareme($mode, $course->id, $cm->id, $rec_bareme, $referentiel_referentiel->id);
             echo $OUTPUT->box_end();
             echo $OUTPUT->footer();
             die;
         }
     }
 } else {
     if ($mode == 'echangebareme' && confirm_sesskey()) {
         if ($confirm = optional_param('confirm', 0, PARAM_INT)) {
             referentiel_echange_bareme_occurrence($scaleid, $referentiel_referentiel->id);
         }
     } else {
         if ($mode == 'selectbareme') {
             echo $OUTPUT->confirm(get_string('confirmexchange', 'referentiel') . ' ' . $OUTPUT->help_icon('baremeechangeh', 'referentiel'), 'bareme.php?id=' . $cm->id . '&amp;scaleid=' . $scaleid . '&amp;mode=echangebareme&amp;confirm=1&amp;sesskey=' . sesskey(), 'bareme.php?id=' . $cm->id . '&amp;mode=bareme&amp;confirm=0&amp;sesskey=' . sesskey());
             echo $OUTPUT->box_end();
             echo $OUTPUT->footer();
             die;
         } else {
             if ($mode == 'confirmdeletebareme' && confirm_sesskey()) {
                 if ($confirm = optional_param('confirm', 0, PARAM_INT)) {
                     referentiel_delete_bareme_occurrence($scaleid, $referentiel_referentiel->id);
                 }
             } else {
                 if ($mode == 'deletebareme') {
                     echo $OUTPUT->confirm(get_string('confirmdelete', 'referentiel') . ' ' . $OUTPUT->help_icon('deletescaleh', 'referentiel'), 'bareme.php?id=' . $cm->id . '&amp;scaleid=' . $scaleid . '&amp;mode=confirmdeletebareme&amp;confirm=1&amp;sesskey=' . sesskey(), 'bareme.php?id=' . $cm->id . '&amp;mode=bareme&amp;confirm=0&amp;sesskey=' . sesskey());