コード例 #1
0
 /**
  * Get node icon alt text
  *
  * @param array $a_node node array
  * @return string alt text
  */
 function getNodeIconAlt($a_node)
 {
     global $lng;
     include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
     if ($a_node["type"] == "du") {
         $a_node["type"] = "lm";
     }
     if ($a_node["type"] == "pg") {
         include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
         $lm_set = new ilSetting("lm");
         $active = ilLMPage::_lookupActive($a_node["child"], $this->lm->getType(), $lm_set->get("time_scheduled_page_activation"));
         if (!$active) {
             return $lng->txt("cont_page_deactivated");
         } else {
             $contains_dis = ilLMPage::_lookupContainsDeactivatedElements($a_node["child"], $this->lm->getType());
             if ($contains_dis) {
                 return $lng->txt("cont_page_deactivated_elements");
             }
         }
     }
     return parent::getNodeIconAlt($a_node);
 }