protected function updateTLT() { include_once "Services/MetaData/classes/class.ilMD.php"; foreach ($_POST['tlt'] as $item_id => $item) { $md_obj = new ilMD($this->getObjId(), $item_id, 'st'); if (!is_object($md_section = $md_obj->getEducational())) { $md_section = $md_obj->addEducational(); $md_section->save(); } $md_section->setPhysicalTypicalLearningTime((int) $item['mo'], (int) $item['d'], (int) $item['h'], (int) $item['m'], 0); $md_section->update(); } // refresh learning progress include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php"; ilLPStatusWrapper::_refreshStatus($this->getObjId()); ilUtil::sendSuccess($this->lng->txt('settings_saved'), true); $this->ctrl->redirect($this, 'show'); }