mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
MyLV Verbesserungen & cleanup
This commit is contained in:
@@ -3,12 +3,7 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the FilterCmptLib (back-end)
|
||||
* Provides data to the ajax get calls about the filter component
|
||||
* Listens to ajax post calls to change the filter data
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
* NOTE: extends the FHC_Controller instead of the Auth_Controller because the FilterCmpt has its
|
||||
* own permissions check
|
||||
*
|
||||
*/
|
||||
class Mylv extends Auth_Controller
|
||||
{
|
||||
|
||||
@@ -276,7 +276,7 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
*/
|
||||
// TODO(chris): module or kf
|
||||
#$this->addSelect($this->dbTable . '.*');
|
||||
$this->addSelect('v.*');
|
||||
#$this->addSelect('v.*');
|
||||
$this->addSelect($this->dbTable . '.benotung');
|
||||
$this->addSelect($this->dbTable . '.lvinfo');
|
||||
$this->addSelect($this->dbTable . '.farbe');
|
||||
@@ -288,6 +288,7 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
|
||||
$this->addSelect('v.sprache');
|
||||
$this->addSelect('v.ects');
|
||||
$this->addSelect('znn.positiv');
|
||||
|
||||
#$this->addSelect('splv.module');
|
||||
$this->addSelect($lvbezeichnung . ' AS bezeichnung');
|
||||
@@ -297,6 +298,7 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
$this->addSelect('COALESCE(gnn.' . $bezeichnung . ', gnn.bezeichnung, gn.note::text) AS lvnote');
|
||||
$this->addSelect('COALESCE(znn.' . $bezeichnung . ', znn.bezeichnung, zn.note::text) AS znote');
|
||||
|
||||
// TODO(chris): Potentielle Anpassung "Eine UID"
|
||||
$this->addJoin('campus.vw_student_lehrveranstaltung v', 'lehrveranstaltung_id');
|
||||
$this->addJoin('public.tbl_studiengang sg', $this->dbTable . '.studiengang_kz = sg.studiengang_kz');
|
||||
$this->db->where("v.lehreverzeichnis<>''");
|
||||
@@ -307,6 +309,8 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
$this->addJoin('lehre.tbl_zeugnisnote zn', 'zn.lehrveranstaltung_id=v.lehrveranstaltung_id AND zn.student_uid=v.uid AND zn.studiensemester_kurzbz=v.studiensemester_kurzbz', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_note znn', 'zn.note=znn.note', 'LEFT');
|
||||
|
||||
$this->addOrder('bezeichnung');
|
||||
|
||||
/*if (!defined("CIS_PROFIL_STUDIENPLAN_MODULE_AUSBLENDEN") || !CIS_PROFIL_STUDIENPLAN_MODULE_AUSBLENDEN) {
|
||||
$modulebezeichnung = str_replace('v.', 'm.', $lvbezeichnung);
|
||||
$modulesql = '
|
||||
|
||||
@@ -42,12 +42,13 @@ class Pruefung_model extends DB_Model
|
||||
*
|
||||
* @param string $uid
|
||||
* @param string $lehrveranstaltung_id
|
||||
* @param string|null $lehrveranstaltung_id
|
||||
* @param string|null $sprache
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function getByStudentAndLv($uid, $lehrveranstaltung_id, $sprache = null)
|
||||
{
|
||||
// TODO(chris): Potentielle Anpassung "Eine UID"
|
||||
$this->dbTable = 'lehre.tbl_pruefung';
|
||||
|
||||
if ($sprache) {
|
||||
|
||||
@@ -215,6 +215,7 @@ class Studiensemester_model extends DB_Model
|
||||
$this->addDistinct();
|
||||
$this->addSelect($this->dbTable . '.*');
|
||||
|
||||
// TODO(chris): Potentielle Anpassung "Eine UID"
|
||||
$this->addJoin('campus.vw_student_lehrveranstaltung v', 'studiensemester_kurzbz');
|
||||
$this->db->where("v.lehreverzeichnis<>''");
|
||||
|
||||
|
||||
@@ -265,6 +265,9 @@
|
||||
#cis-main {
|
||||
padding-left: var(--fhc-cis-main-px);
|
||||
}
|
||||
#cis-main > :first-child {
|
||||
margin-top: var(--fhc-cis-header-height);
|
||||
}
|
||||
#cis-header {
|
||||
background-color: var(--fhc-cis-primary);
|
||||
height: var(--fhc-cis-header-height);
|
||||
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
<small>{{semester}}.{{p.t('lehre/semester')}}</small>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div v-for="lv in lehrveranstaltungen" :key="lv.lehrveranstaltung_id" class="col-sm-4 mb-3">
|
||||
<div v-for="lv in lehrveranstaltungen" :key="lv.lehrveranstaltung_id" class="col-sm-4 col-md-3 mb-3">
|
||||
<mylv-semester-studiengang-lv v-bind="lv" class="text-center h-100"></mylv-semester-studiengang-lv>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import LvPruefungen from "./Lv/Pruefungen.js";
|
||||
import LvInfo from "./Lv/Info.js";
|
||||
import Phrasen from "../../../../../mixins/Phrasen.js";
|
||||
|
||||
// TODO(chris): L10n
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
Phrasen
|
||||
],
|
||||
inject: ['studien_semester'],
|
||||
props: {
|
||||
lehrveranstaltung_id: Number,
|
||||
@@ -19,7 +23,8 @@ export default {
|
||||
orgform_kurzbz: String,
|
||||
sprache: String,
|
||||
ects: Number,
|
||||
incoming: Number
|
||||
incoming: Number,
|
||||
positiv: Boolean
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
@@ -28,7 +33,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
bodyStyle() {
|
||||
bodyStyle() {return {};
|
||||
const bodyStyle = {};
|
||||
if (this.farbe)
|
||||
bodyStyle['background-color'] = '#' + this.farbe;
|
||||
@@ -70,13 +75,14 @@ export default {
|
||||
<div v-if="module" class="card-header">
|
||||
{{module}}
|
||||
</div>
|
||||
<div class="card-body" :style="bodyStyle">
|
||||
<h5 class="card-title">{{bezeichnung}}</h5>
|
||||
<div class="card-body d-flex justify-content-center align-items-center" :style="bodyStyle">
|
||||
<h6 class="card-title">{{bezeichnung}}</h6>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<a href="#" class="col-auto text-start text-decoration-none" @click.prevent="openPruefungen">
|
||||
{{ grade || '-' }}
|
||||
<i class="fa fa-check text-success" v-if="positiv"></i>
|
||||
{{ grade || p.t('lehre/noGrades') }}
|
||||
</a>
|
||||
<div v-if="lvinfo" class="col text-end">
|
||||
<a class="card-link" href="#" @click.prevent="openInfos">
|
||||
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
popup(options) {
|
||||
return BsModal.popup.bind(this)(null, options);
|
||||
},
|
||||
template: `<bs-modal ref="modalContainer" class="bootstrap-alert" v-bind="$props" body-class="" dialog-class="modal-fullscreen">
|
||||
template: `<bs-modal ref="modalContainer" class="bootstrap-alert" v-bind="$props" body-class="" dialog-class="modal-lg">
|
||||
<template v-slot:title>
|
||||
{{p.t('lvinfo/lehrveranstaltungsinformationen')}}
|
||||
</template>
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
<div v-if="Object.keys(info.lvinfo).length > 1" class="text-end">
|
||||
<div class="btn-group" role="group" :title="p.t('global/verfuegbareSprachen')" :aria-label="p.t('global/verfuegbareSprachen')">
|
||||
<template v-for="lang in info.sprachen" :key="lang.index">
|
||||
<button v-if="info.lvinfo[lang.sprache]" type="button" class="btn btn-outline-primary" :class="lang.sprache == currentLang ? 'active' : ''" @click.prevent="info.lastLang = lang.sprache"><img class="d-block" :src="'data:image/gif;base64, ' + lang.flagge" :alt="lang.bezeichnung[lang.index]"></button>
|
||||
<button v-if="info.lvinfo[lang.sprache]" type="button" class="btn btn-outline-primary" :class="lang.sprache == currentLang ? 'active' : ''" @click.prevent="info.lastLang = lang.sprache">{{lang.bezeichnung[lang.index-1]}}</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user