summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--inc/user.inc.php11
-rw-r--r--lang/pt/flag.pngbin1115 -> 0 bytes
-rw-r--r--lang/pt/name.txt1
-rw-r--r--modules-available/exams/lang/de/template-tags.json2
-rw-r--r--modules-available/exams/lang/en/template-tags.json2
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php48
-rw-r--r--modules-available/locationinfo/lang/de/template-tags.json2
-rw-r--r--modules-available/locationinfo/lang/en/template-tags.json2
8 files changed, 43 insertions, 25 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index 2571c61c..20e8cd3d 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -34,8 +34,15 @@ class User
if ($permission{0} === '.') {
$permission = substr($permission, 1);
} else {
- $module = Page::getModule();
- $permission = $module ? $module->getIdentifier() . "." . $permission : $permission;
+ if (class_exists('Page')) {
+ $module = Page::getModule();
+ if ($module !== false) {
+ $module = $module->getIdentifier();
+ }
+ } else {
+ $module = strtolower(Request::any('do'));
+ }
+ $permission = $module ? $module . "." . $permission : $permission;
}
return PermissionUtil::userHasPermission(self::$user['userid'], $permission, $locationid);
}
diff --git a/lang/pt/flag.png b/lang/pt/flag.png
deleted file mode 100644
index 78c57dea..00000000
--- a/lang/pt/flag.png
+++ /dev/null
Binary files differ
diff --git a/lang/pt/name.txt b/lang/pt/name.txt
deleted file mode 100644
index 811b10b4..00000000
--- a/lang/pt/name.txt
+++ /dev/null
@@ -1 +0,0 @@
-Português \ No newline at end of file
diff --git a/modules-available/exams/lang/de/template-tags.json b/modules-available/exams/lang/de/template-tags.json
index 8bf37143..1dd51374 100644
--- a/modules-available/exams/lang/de/template-tags.json
+++ b/modules-available/exams/lang/de/template-tags.json
@@ -29,7 +29,7 @@
"lang_headingMain": "bwLehrpool Pr\u00fcfungsmodus",
"lang_id": "ID",
"lang_lectureName": "Veranstaltungsname",
- "lang_lectureOutOfRange": "Achtung: Start- bzw. Endzeitpunkt der Veranstaltung liegen au\u00dferhalb des oben angegebenen Zeitraums",
+ "lang_lectureOutOfRange": "Achtung: Der oben angegebene Zeitraum ist k\u00fcrzer als die Dauer der Veranstaltung",
"lang_location": "Raum\/Ort",
"lang_locationInfo": "W\u00e4hlen Sie hier die R\u00e4ume und Orte aus, die w\u00e4hrend des unten ausgew\u00e4hlten Zeitraums in den Pr\u00fcfungsmodus versetzt werden. Wenn sie hier keine Auswahl treffen, werden alle R\u00e4ume in den Pr\u00fcfungsmodus versetzt.",
"lang_locations": "R\u00e4ume\/Orte",
diff --git a/modules-available/exams/lang/en/template-tags.json b/modules-available/exams/lang/en/template-tags.json
index af87bb01..23266154 100644
--- a/modules-available/exams/lang/en/template-tags.json
+++ b/modules-available/exams/lang/en/template-tags.json
@@ -29,7 +29,7 @@
"lang_headingMain": "bwLehrpool Exam Mode",
"lang_id": "ID",
"lang_lectureName": "Lecture name",
- "lang_lectureOutOfRange": "Hint: Start or end date of given lecture lies outside of exam period given above",
+ "lang_lectureOutOfRange": "Hint: The exam period given above is shorter than the duration of the given lecture",
"lang_location": "Room\/Location",
"lang_locationInfo": "Select the rooms and locations you want to enable the exam mode in. Selecting nothing at all means that all clients will boot into exam mode during the given time period.",
"lang_locations": "Rooms\/Locations",
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
index 558f5cd0..3b26e625 100644
--- a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
@@ -274,8 +274,7 @@ class CourseBackend_HisInOne extends CourseBackend
foreach ($eventDetails as $event) {
foreach (array('/hisdefaulttext',
'/hisshorttext',
- '/hisshortcomment',
- '/hisplanelements/hisplanelement/hisdefaulttext') as $path) {
+ '/hisshortcomment') as $path) {
$name = $this->getArrayPath($event, $path);
if (!empty($name) && !empty($name[0]))
break;
@@ -284,25 +283,38 @@ class CourseBackend_HisInOne extends CourseBackend
if ($name === false) {
$name = ['???'];
}
- $unitPlannedDates = $this->getArrayPath($event,
- '/hisplanelements/hisplanelement/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate');
- if ($unitPlannedDates === false) {
- $this->error = 'Cannot find ./hisplanelements/hisplanelement/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate';
- error_log('Cannot find ./hisplanelements/hisplanelement/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate');
+ $planElements = $this->getArrayPath($event, '/hisplanelements/hisplanelement');
+ if ($planElements === false) {
+ $this->error = 'Cannot find ./hisplanelements/hisplanelement';
+ error_log('Cannot find ./hisplanelements/hisplanelement');
error_log(print_r($event, true));
continue;
}
- foreach ($unitPlannedDates as $plannedDate) {
- $eventRoomId = $this->getArrayPath($plannedDate, '/hisroomId')[0];
- $eventDate = $this->getArrayPath($plannedDate, '/hisexecutiondate')[0];
- if (in_array($eventRoomId, $requestedRoomIds) && in_array($eventDate, $currentWeek)) {
- $startTime = $this->getArrayPath($plannedDate, '/hisstarttime')[0];
- $endTime = $this->getArrayPath($plannedDate, '/hisendtime')[0];
- $tTables[$eventRoomId][] = array(
- 'title' => $name[0],
- 'start' => $eventDate . "T" . $startTime,
- 'end' => $eventDate . "T" . $endTime
- );
+ foreach ($planElements as $planElement) {
+ $unitPlannedDates = $this->getArrayPath($planElement,
+ '/hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate');
+ if ($unitPlannedDates === false) {
+ $this->error = 'Cannot find ./hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate';
+ error_log('Cannot find ./hisplannedDates/hisplannedDate/hisindividualDates/hisindividualDate');
+ error_log(print_r($planElement, true));
+ continue;
+ }
+ $localName = $this->getArrayPath($planElement, '/hisdefaulttext');
+ if ($localName === false || empty($localName[0])) {
+ $localName = $name;
+ }
+ foreach ($unitPlannedDates as $plannedDate) {
+ $eventRoomId = $this->getArrayPath($plannedDate, '/hisroomId')[0];
+ $eventDate = $this->getArrayPath($plannedDate, '/hisexecutiondate')[0];
+ if (in_array($eventRoomId, $requestedRoomIds) && in_array($eventDate, $currentWeek)) {
+ $startTime = $this->getArrayPath($plannedDate, '/hisstarttime')[0];
+ $endTime = $this->getArrayPath($plannedDate, '/hisendtime')[0];
+ $tTables[$eventRoomId][] = array(
+ 'title' => $localName[0],
+ 'start' => $eventDate . "T" . $startTime,
+ 'end' => $eventDate . "T" . $endTime
+ );
+ }
}
}
}
diff --git a/modules-available/locationinfo/lang/de/template-tags.json b/modules-available/locationinfo/lang/de/template-tags.json
index bcdf7148..b51c420b 100644
--- a/modules-available/locationinfo/lang/de/template-tags.json
+++ b/modules-available/locationinfo/lang/de/template-tags.json
@@ -76,7 +76,7 @@
"lang_remoteSchedule": "Abruf Belegungsplan",
"lang_room": "Raum",
"lang_roomId": "Raum ID",
- "lang_roomIdTooltip": "Die Raum ID, die der Server ben\u00f6tigt, um Kalenderdaten abzurufen",
+ "lang_roomIdTooltip": "Die Raum ID, die der Server ben\u00f6tigt, um Kalenderdaten abzurufen (bei Exchange die Postfachadresse)",
"lang_roomupdateTooltip": "Zeit nach der die PCs aktualisiert werden (in Sekunden)",
"lang_rotation": "Rotation",
"lang_rotation0": "0\u00b0",
diff --git a/modules-available/locationinfo/lang/en/template-tags.json b/modules-available/locationinfo/lang/en/template-tags.json
index 558ddff0..f041dc0a 100644
--- a/modules-available/locationinfo/lang/en/template-tags.json
+++ b/modules-available/locationinfo/lang/en/template-tags.json
@@ -76,7 +76,7 @@
"lang_remoteSchedule": "Time table retrieval",
"lang_room": "Room",
"lang_roomId": "Room ID",
- "lang_roomIdTooltip": "The ID of the room the server needs, for querying the calendar data",
+ "lang_roomIdTooltip": "The ID of the room the server needs, for querying the calendar data (when using exchange the room mailbox)",
"lang_roomupdateTooltip": "Time the PCs in the room gets updated (in seconds)",
"lang_rotation": "Rotation",
"lang_rotation0": "0\u00b0",