Exemplo n.º 1
0
 function display_default()
 {
     require_once elispm::file('form/configclsdefaultform.class.php');
     $configform = new configclsdefaultform('index.php?s=dftcls&section=admn', $this);
     $configform->set_data(elis::$config->local_elisprogram);
     if ($configdata = $configform->get_data()) {
         if (isset($configdata->clsdftstarttime)) {
             $configdata->clsdftstarttime = $configdata->clsdftstarttime % DAYSECS;
         }
         if (isset($configdata->clsdftendtime)) {
             $configdata->clsdftendtime = $configdata->clsdftendtime % DAYSECS;
         }
         $this->_config_set_value($configdata, 'clsdftidnumber', 0);
         $this->_config_set_value($configdata, 'clsdftstartdate', 0);
         $this->_config_set_value($configdata, 'clsdftenddate', 0);
         $this->_config_set_value($configdata, 'clsdftstarttime');
         $this->_config_set_value($configdata, 'clsdftendtime', 0);
         $this->_config_set_value($configdata, 'clsdftmaxstudents', 0);
         $this->_config_set_value($configdata, 'clsdftenvironmentid', 0);
     }
     $configform->display();
 }
 function action_default()
 {
     global $CFG, $CURMAN;
     require_once $CFG->dirroot . '/curriculum/form/configclsdefaultform.class.php';
     $configform = new configclsdefaultform('index.php?s=dftcls&section=admn', $this);
     $configform->set_data($CURMAN->config);
     if ($configdata = $configform->get_data()) {
         if (isset($configdata->clsdftstarttime)) {
             $configdata->clsdftstarttime = $configdata->clsdftstarttime % DAYSECS;
         }
         if (isset($configdata->clsdftendtime)) {
             $configdata->clsdftendtime = $configdata->clsdftendtime % DAYSECS;
         }
         $this->_config_set_value($configdata, 'clsdftidnumber', 0);
         $this->_config_set_value($configdata, 'clsdftstartdate', 0);
         $this->_config_set_value($configdata, 'clsdftenddate', 0);
         $this->_config_set_value($configdata, 'clsdftstarttime');
         $this->_config_set_value($configdata, 'clsdftendtime', 0);
         $this->_config_set_value($configdata, 'clsdftmaxstudents', 0);
         $this->_config_set_value($configdata, 'clsdftenvironmentid', 0);
     }
     $configform->display();
 }