Esempio n. 1
0
     $data = $cat_form->get_data();
     $catid = $data->catid;
     $includechildren = $data->includechildren;
     $qtype = $data->qtype;
     $message = get_string('category_updated', 'local_quedit');
     break;
 case 'domany':
     $manyform = new local_quedit_many_form();
     $manydata = $manyform->get_data();
     if (!$manydata) {
         $message = get_string('wedontaddfields', 'local_quedit');
         break;
     }
     $catid = $manydata->catid;
     $bfm = new local_quedit_manager($catid);
     $result = $bfm->update_many($manydata);
     if ($result) {
         $message = get_string('updatedsuccessfully', 'local_quedit', $result);
     } else {
         $message = get_string('failedtoupdate', 'local_quedit');
         local_quedit_show_error($renderer, $message);
         return;
     }
 case 'getcategory':
 default:
     //if we have a status message, display it.
     if ($message) {
         echo $renderer->heading($message, 5, 'main');
     }
     echo $renderer->heading(get_string('select_category', 'local_quedit'), 3, 'main');
     $gdata = new stdClass();