mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-11 12:02:26 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c26db6cc40 | |||
| 5972764731 | |||
| 2933a525c1 | |||
| 5694ba7325 | |||
| bbec7de8de | |||
| 1d14e58d8f | |||
| db2beeb51f | |||
| e4f43cc820 | |||
| fe195f4080 | |||
| 0a4906c5ac |
@@ -108,10 +108,8 @@ class LvPlan extends FHCAPI_Controller
|
||||
$result = $this->stundenplanlib->getEventsUser($start_date, $end_date, $uid);
|
||||
$lvplanEvents = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if ($uid && $uid !== getAuthUID()) {
|
||||
// fetching moodle events
|
||||
$moodleEvents = $this->fetchMoodleEvents($start_date, $end_date, $uid);
|
||||
}
|
||||
// fetching moodle events
|
||||
$moodleEvents = $this->fetchMoodleEvents($start_date, $end_date, $uid);
|
||||
|
||||
// fetching ferien events
|
||||
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date, $uid);
|
||||
@@ -420,6 +418,10 @@ class LvPlan extends FHCAPI_Controller
|
||||
*/
|
||||
private function fetchMoodleEvents($start_date, $end_date, $uid = null)
|
||||
{
|
||||
if ($uid && $uid !== getAuthUID()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$this->load->config('calendar');
|
||||
|
||||
$tz = new DateTimeZone($this->config->item('timezone'));
|
||||
|
||||
@@ -263,6 +263,59 @@ class ProfilLib{
|
||||
$element->mailto = "mailto:" . $element->gruppe_kurzbz . "@" . DOMAIN;
|
||||
return $element;
|
||||
}, $mailverteiler_res);
|
||||
|
||||
$this->ci->load->model("crm/Student_model", "StudentModel");
|
||||
$this->ci->StudentModel->addJoin("tbl_benutzer", "tbl_benutzer.uid = tbl_student.student_uid");
|
||||
$this->ci->StudentModel->addJoin("tbl_person", "tbl_benutzer.person_id = tbl_person.person_id");
|
||||
$this->ci->StudentModel->addJoin("tbl_studiengang", "tbl_student.studiengang_kz = tbl_studiengang.studiengang_kz");
|
||||
$this->ci->StudentModel->addSelect("matr_nr, semester, verband, gruppe, kurzbzlang");
|
||||
|
||||
$studentResult = $this->ci->StudentModel->loadWhere(["student_uid" => $uid]);
|
||||
if (isError($studentResult)) {
|
||||
return error(getData($studentResult));
|
||||
}
|
||||
|
||||
$studentResultData = getData($studentResult);
|
||||
$studentData = null;
|
||||
if (is_array($studentResultData) && count($studentResultData)) {
|
||||
$studentData = $studentResultData[0];
|
||||
}
|
||||
|
||||
if ($studentData && $studentData->matr_nr) {
|
||||
$this->ci->load->library("phrasesLib", ["profil"], "phrases");
|
||||
$standardCourseVerteiler = trim($studentData->kurzbzlang) . "_STD";
|
||||
$mailverteiler_res[] = [
|
||||
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $standardCourseVerteiler,
|
||||
"gruppe_kurzbz" => $standardCourseVerteiler,
|
||||
"mailto" => "mailto:" . strtolower($standardCourseVerteiler) . "@" . DOMAIN,
|
||||
];
|
||||
|
||||
$semesterVerteiler = trim($studentData->kurzbzlang) . trim($studentData->semester);
|
||||
$mailverteiler_res[] = [
|
||||
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $semesterVerteiler,
|
||||
"gruppe_kurzbz" => $semesterVerteiler,
|
||||
"mailto" => "mailto:" . strtolower($semesterVerteiler) . "@" . DOMAIN,
|
||||
];
|
||||
|
||||
if ($studentData->verband && strlen(trim($studentData->verband))) {
|
||||
$verbandVerteiler = $semesterVerteiler . trim($studentData->verband);
|
||||
$mailverteiler_res[] = [
|
||||
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $verbandVerteiler,
|
||||
"gruppe_kurzbz" => $verbandVerteiler,
|
||||
"mailto" => "mailto:" . strtolower($verbandVerteiler) . "@" . DOMAIN,
|
||||
];
|
||||
|
||||
if ($studentData->gruppe && strlen(trim($studentData->gruppe))) {
|
||||
$gruppeVerteiler = $verbandVerteiler . trim($studentData->gruppe);
|
||||
$mailverteiler_res[] = [
|
||||
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $gruppeVerteiler,
|
||||
"gruppe_kurzbz" => $gruppeVerteiler,
|
||||
"mailto" => "mailto:" . strtolower($gruppeVerteiler) . "@" . DOMAIN,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $mailverteiler_res;
|
||||
}
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ class benutzerberechtigung extends basis_db
|
||||
};
|
||||
$roles = defined('STUDENTS_KEEP_PERMISSIONS_AFTER_USER_INACTIVE_ROLES')
|
||||
? implode(', ', array_map($mapfunc, unserialize(STUDENTS_KEEP_PERMISSIONS_AFTER_USER_INACTIVE_ROLES)))
|
||||
: 'NO_DEFINED_ROLE';
|
||||
: "'NO_DEFINED_ROLE'";
|
||||
|
||||
$sql = <<<EOSQL
|
||||
SELECT
|
||||
|
||||
@@ -257,9 +257,14 @@ const app = Vue.createApp({
|
||||
provide() {
|
||||
return { // provide injectable & watchable language property
|
||||
language: Vue.computed(() => this.$p.user_language),
|
||||
isMobile: Vue.computed(() => this.windowWidth < 767),
|
||||
isMobile: Vue.computed(() => this.isMobile),
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isMobile: function() {
|
||||
return (this.windowWidth < 767);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isInternalRoute(href) {
|
||||
const internalBase = window.location.origin
|
||||
|
||||
@@ -218,15 +218,23 @@ export const CoreFilterCmpt = {
|
||||
},
|
||||
columnsForFilter() {
|
||||
if (!this.filteredColumns || !this.datasetMetadata) return [];
|
||||
const localizedColumnTitles = this.tabulator.getLang().columns;
|
||||
|
||||
const isTabulatorLocalized = !!this.$props.tabulatorOptions.locale;
|
||||
const filterTitles = this.filteredColumns.reduce((a, c) => {
|
||||
a[c.field] =
|
||||
isTabulatorLocalized && localizedColumnTitles[c.field]
|
||||
? localizedColumnTitles[c.field]
|
||||
: c.title;
|
||||
return a;
|
||||
}, {});
|
||||
|
||||
let filterTitles;
|
||||
if (isTabulatorLocalized) {
|
||||
const localizedColumnTitles = this.tabulator.getLang().columns;
|
||||
filterTitles = this.filteredColumns.reduce((a, c) => {
|
||||
a[c.field] = localizedColumnTitles[c.field];
|
||||
return a;
|
||||
}, {});
|
||||
} else {
|
||||
filterTitles = this.filteredColumns.reduce((a, c) => {
|
||||
a[c.field] = c.title;
|
||||
return a;
|
||||
}, {});
|
||||
}
|
||||
|
||||
return this.datasetMetadata.map((el) => ({
|
||||
...el,
|
||||
...{ title: filterTitles[el.name] },
|
||||
|
||||
@@ -29742,6 +29742,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'profil',
|
||||
'phrase' => 'alleStudentenVon',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Alle Student*innen aus',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'All students from',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
//Profil Phrasen ende
|
||||
// LvPlan Phrasen start
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user