19 declare(strict_types=1);
42 if (ilECSNodeMappingAssignments::hasAssignments($a_server_id, $a_mid, $a_tree_id)) {
44 return self::MAPPED_WHOLE_TREE;
46 return self::MAPPED_MANUAL;
48 return self::MAPPED_UNMAPPED;
58 return $DIC->language()->txt(
'ecs_node_mapping_status_' . $a_status);
68 $field_info = array();
82 $field_info[$counter][
'name'] = $field;
83 $field_info[$counter][
'translation'] =
$lng->txt(
'ecs_cmap_att_' . $field);
95 $options[
''] =
$lng->txt(
'select_one');
96 foreach (self::getCourseMappingFieldInfo() as $info) {
97 $options[$info[
'name']] = $info[
'translation'];
109 return array((
string) $course->organisation);
112 if (property_exists($course,
"term")) {
113 return array((
string) $course->term);
118 return array((
string) $course->title);
122 foreach ((array) $course->organisationalUnits as $unit) {
123 $units[] = (string) $unit->title;
128 $lecturers = array();
129 foreach ((array) $course->groups as $group) {
130 foreach ((array) $group->lecturers as $lecturer) {
131 $lecturers[] = $lecturer->lastName .
', ' . $lecturer->firstName;
137 return array((
string) $course->lectureType);
139 case 'degreeProgramme':
140 $degree_programmes = array();
141 foreach ((array) $course->degreeProgrammes as $prog) {
142 $degree_programmes[] = (string) $prog->title;
144 return $degree_programmes;
148 foreach ((array) $course->modules as $mod) {
149 $modules[] = (string) $mod->title;
155 foreach ((array) $course->groups as $group) {
156 foreach ((array) $group->datesAndVenues as $venue) {
157 $venues[] = (string) $venue->venue;
175 'lang' =>
'il_crs_admin',
181 'lang' =>
'il_crs_tutor',
187 'lang' =>
'il_crs_member',
193 'lang' =>
'il_grp_admin',
199 'lang' =>
'il_grp_member',
204 if (!$a_role_type_info) {
207 return $roles[$a_role_type_info];
218 $lng = $DIC->language();
221 $options[
"0"] =
$lng->txt(
'select_one');
222 foreach ($active_auth_modes as $auth_string => $auth_int) {
224 $auth_string ===
'default' ||
225 $auth_string ===
'ecs' ||
226 substr($auth_string, 0, 3) ===
'lti' static getRoleMappingInfo($a_role_type_info=0)
Get role mapping info.
static getAuthModeTranslation(string $a_auth_key, string $auth_name='')
static getCourseValueByMappingAttribute($course, $a_field)
Get course value by mapping.
static _getActiveAuthModes()
static isWholeTreeMapped(int $a_server_id, int $a_mid, int $a_tree_id)
Check if whole tree is mapped.
const PARALLEL_ONE_COURSE
static getCourseMappingFieldInfo()
static lookupMappingStatus(int $a_server_id, int $a_mid, int $a_tree_id)
Lookup mapping status.
static getCourseMappingFieldSelectOptions()
static mappingStatusToString(int $a_status)
Get mapping status as string.
static getAuthModeSelection()
Get auth mode selection with active authentication modes.
const PARALLEL_COURSES_FOR_LECTURERS
const PARALLEL_ALL_COURSES
const PARALLEL_GROUPS_IN_COURSE