Beispiel #1
0
 protected function doMDUpdateListener($a_element)
 {
     // handling for technical section
     include_once 'Services/MetaData/classes/class.ilMD.php';
     //echo "-".$a_element."-";
     switch ($a_element) {
         case 'Technical':
             // Update Format (size is not stored in db)
             $md = new ilMD($this->getId(), 0, $this->getType());
             if (!is_object($md_technical = $md->getTechnical())) {
                 return false;
             }
             foreach ($md_technical->getFormatIds() as $id) {
                 $md_format = $md_technical->getFormat($id);
                 ilObjFile::_writeFileType($this->getId(), $md_format->getFormat());
                 $this->setFileType($md_format->getFormat());
                 break;
             }
             break;
     }
     return true;
 }