コード例 #1
0
 /**
  * We need a static version of this, e.g. in folders of the course
  */
 static function _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id = 0)
 {
     global $lng, $ilAccess;
     // this is set for folders within the course
     if ($a_parent_ref_id == 0) {
         $a_parent_ref_id = $a_course_ref_id;
     }
     // Special handling for tests in courses with learning objectives
     if ($a_item_data['type'] == 'tst' and ilObjCourse::_lookupViewMode($a_course_obj_id) == ilContainer::VIEW_OBJECTIVE) {
         $a_item_list_gui->addCommandLinkParameter(array('crs_show_result' => $a_course_ref_id));
     }
     $a_item_list_gui->enableSubscribe($a_abo_status);
     $is_tutor = $ilAccess->checkAccess('write', '', $a_course_ref_id, 'crs', $a_course_obj_id);
     if ($a_show_path and $is_tutor) {
         $a_item_list_gui->addCustomProperty($lng->txt('path'), ilContainer::_buildPath($a_item_data['ref_id'], $a_course_ref_id), false, true);
     }
 }