diff --git a/application/controllers/Cis/MyLv.php b/application/controllers/Cis/MyLv.php index f815f26f8..9514d5b6b 100644 --- a/application/controllers/Cis/MyLv.php +++ b/application/controllers/Cis/MyLv.php @@ -13,7 +13,8 @@ class MyLv extends Auth_Controller public function __construct() { parent::__construct([ - 'index' => ['student/anrechnung_beantragen:r','user:r'] // TODO(chris): permissions? + 'index' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions? + 'Info' => ['student/anrechnung_beantragen:r','user:r'] // TODO(chris): permissions? ]); } @@ -27,4 +28,9 @@ class MyLv extends Auth_Controller { $this->load->view('Cis/MyLv'); } + + public function Info($studien_semester,$lvid) + { + $this->load->view('Cis/LvInfo',['lvid'=> $lvid, 'studien_semester' => $studien_semester]); + } } diff --git a/application/core/CI3_Events.php b/application/core/CI3_Events.php index 7e7e471b1..37f6c3f21 100644 --- a/application/core/CI3_Events.php +++ b/application/core/CI3_Events.php @@ -47,10 +47,19 @@ class CI3_Events */ require_once(APPPATH.'config/Events.php'); +$active_addons_array = explode(";", ACTIVE_ADDONS); + foreach (scandir(APPPATH.'config/extensions') as $dir) if ($dir[0] != '.' && file_exists(APPPATH.'config/extensions/'.$dir.'/Events.php')) require_once APPPATH.'config/extensions/'.$dir.'/Events.php'; foreach (scandir(FHCPATH.'addons') as $dir) if ($dir[0] != '.' && file_exists(FHCPATH.'addons/'.$dir.'/Events.php')) - require_once FHCPATH.'addons/'.$dir.'/Events.php'; + { + // only includes the Events of the addon if the addon is one of the active addons in the cis config + if(in_array($dir,$active_addons_array)) + { + require_once FHCPATH . 'addons/' . $dir . '/Events.php'; + } + } + diff --git a/application/views/Cis/LvInfo.php b/application/views/Cis/LvInfo.php new file mode 100644 index 000000000..49a7b7a85 --- /dev/null +++ b/application/views/Cis/LvInfo.php @@ -0,0 +1,15 @@ + 'LvInfo', + 'customJSModules' => ['public/js/apps/Cis/LvInfo.js'] +); + +$this->load->view('templates/CISVUE-Header', $includesArray); +?> + +
+ + +
+ +load->view('templates/CISVUE-Footer', $includesArray); ?> diff --git a/public/js/apps/Cis/LvInfo.js b/public/js/apps/Cis/LvInfo.js new file mode 100644 index 000000000..3ec63414c --- /dev/null +++ b/public/js/apps/Cis/LvInfo.js @@ -0,0 +1,8 @@ +import Info from "../../components/Cis/Mylv/Semester/Studiengang/Lv/Info.js"; +import Phrasen from "../../plugin/Phrasen.js"; + +Vue.createApp({ + components: { + Info + } +}).use(Phrasen, { reload: true }).mount('#content'); \ No newline at end of file diff --git a/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js b/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js index 5d4b628a7..9676cf3cf 100644 --- a/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js +++ b/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js @@ -1,19 +1,10 @@ -import BsModal from '../../../../../Bootstrap/Modal.js'; -import Phrasen from '../../../../../../mixins/Phrasen.js'; -import LvMenu from '../../../LvMenu.js'; + const infos = {}; export default { - components: { - BsModal, - LvMenu - }, - mixins: [ - BsModal, - Phrasen - ], props: { + lehrveranstaltung_id: Number, bezeichnung: String, studiengang_kuerzel: String, @@ -38,8 +29,6 @@ export default { data: () => ({ result: true, info: null, - isMenuSelected: false, - menu: [], }), computed: { lektorNames() { @@ -80,58 +69,40 @@ export default { }).catch(() => this.info = {}); } }, - methods:{ - onModelHide() { - this.isMenuSelected = false; - }, - onModalShow() { - this.$fhcApi.factory.addons.getLvMenu(this.lehrveranstaltung_id, this.studien_semester) - .then(res => { - this.menu = res.data; - }) - .catch((error) => this.$fhcAlert.handleSystemError); - } - }, - mounted() { - this.modal = this.$refs.modalContainer.modal; - }, - popup(options) { - return BsModal.popup.bind(this)(null, options); - }, template: /*html*/` - - - - - ` + ` }