mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
configurable paabgabe types for signature check; finetuned signature response message; phrasen & code cleanup;
This commit is contained in:
@@ -22,4 +22,6 @@ $config['ALLOWED_NOTEN_ABGABETOOL'] = [10, 14]; // tbl_note pk
|
||||
$config['beurteilung_link_fallback'] = 'addons/fhtw/content/projektbeurteilung/projektbeurteilungDocumentExport.php?projektarbeit_id=?&betreuerart_kurzbz=?&person_id=?';
|
||||
|
||||
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ERSTBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ZWEITBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ZWEITBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
|
||||
|
||||
$config['SIGNATUR_CHECK_PAABGABETYPEN'] = ['end'];
|
||||
@@ -734,8 +734,6 @@ class Abgabe extends FHCAPI_Controller
|
||||
$result = $this->ProjektarbeitModel->getProjektbetreuerEmail($projektarbeit_id);
|
||||
$email = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
//TODO: check if private mail exists, if not take uid@domain
|
||||
|
||||
return $email[0]->private_email ?? $email[0]->uid.'@'.DOMAIN;
|
||||
|
||||
}
|
||||
@@ -990,10 +988,16 @@ class Abgabe extends FHCAPI_Controller
|
||||
* helper function to check the signature status of uploaded files for zwischenabgabe & endupload
|
||||
*/
|
||||
private function checkAbgabeSignatur($abgabe, $projektarbeit) {
|
||||
// TODO: recomment this whenever we decide not every upload needs signature check
|
||||
// if($abgabe->paabgabetyp_kurzbz != 'end') {
|
||||
// return;
|
||||
// }
|
||||
$paabgabetypenToCheck = $this->config->item('SIGNATUR_CHECK_PAABGABETYPEN');
|
||||
|
||||
if(!in_array($abgabe->paabgabetyp_kurzbz, $paabgabetypenToCheck)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!defined('SIGNATUR_URL')) {
|
||||
$abgabe->signatur = 'error';
|
||||
return;
|
||||
}
|
||||
|
||||
$path = PAABGABE_PATH.$abgabe->paabgabe_id.'_'.$projektarbeit->student_uid.'.pdf';
|
||||
|
||||
@@ -1022,7 +1026,6 @@ class Abgabe extends FHCAPI_Controller
|
||||
}
|
||||
|
||||
private function sendUploadEmail($bperson_id, $projektarbeit_id, $paabgabetyp_kurzbz, $student_uid) {
|
||||
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$resBetr = $this->ProjektarbeitModel->getProjektbetreuerAnrede($bperson_id);
|
||||
|
||||
@@ -309,15 +309,6 @@ class FHCAPI_Controller extends Auth_Controller
|
||||
$max_post = (int)(ini_get('post_max_size'));
|
||||
$memory_limit = (int)(ini_get('memory_limit'));
|
||||
$max_upload_mb = min($max_upload, $max_post, $memory_limit); // smallest of 3 config values
|
||||
|
||||
$this->addMeta('stats', array(
|
||||
'$content_length_bytes' => $content_length_bytes,
|
||||
'$content_length' => $content_length,
|
||||
'$max_upload' => $max_upload,
|
||||
'$max_post' => $max_post,
|
||||
'$memory_limit' => $memory_limit,
|
||||
'$max_upload_mb' => $max_upload_mb,
|
||||
));
|
||||
|
||||
if($content_length >= $max_upload_mb) {
|
||||
$this->terminateWithError($this->p->t('global', 'filesizeExceeded'), 'general');
|
||||
|
||||
@@ -856,9 +856,9 @@ export const AbgabeMitarbeiterDetail = {
|
||||
<Message v-else-if="termin?.signatur == false" severity="error" :closable="false" :pt="getMessagePtStyle"> {{ $capitalize($p.t('abgabetool/c4keineSignatur')) }} </Message>
|
||||
<Message v-else-if="termin?.signatur == 'error'" severity="warn" :closable="false" :pt="getMessagePtStyle"> {{ $capitalize($p.t('abgabetool/c4signaturServerError')) }} </Message>
|
||||
</div>
|
||||
<div v-else class="col-auto">
|
||||
<Message severity="info" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4noSignatureCheckPossible') }} </Message>
|
||||
</div>
|
||||
<!-- <div v-else class="col-auto">-->
|
||||
<!-- <Message severity="info" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4noFileFound') }} </Message>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -299,7 +299,7 @@ export const AbgabeStudentDetail = {
|
||||
|
||||
},
|
||||
template: `
|
||||
<FhcOverlay :active="loading || saving"></FhcOverlay>
|
||||
<FhcOverlay :active="loading"></FhcOverlay>
|
||||
|
||||
<div v-if="projektarbeit">
|
||||
|
||||
@@ -435,14 +435,14 @@ export const AbgabeStudentDetail = {
|
||||
</button>
|
||||
</div>
|
||||
<template v-if="termin.paabgabetyp_kurzbz == 'end'">
|
||||
<div v-if="termin?.signatur !== undefined" class="col-auto">
|
||||
<div v-if="termin?.signatur !== undefined && termin?.signatur !== null" class="col-auto">
|
||||
<Message v-if="termin?.signatur == true" severity="success" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4signaturGefunden') }} </Message>
|
||||
<Message v-else-if="termin?.signatur == false" severity="error" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4keineSignatur') }} </Message>
|
||||
<Message v-else-if="termin?.signatur == null" severity="warn" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4signaturServerError') }} </Message>
|
||||
</div>
|
||||
<div v-else class="col-auto">
|
||||
<Message severity="info" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4noFileFound') }} </Message>
|
||||
<Message v-else-if="termin?.signatur == 'error'" severity="warn" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4signaturServerError') }} </Message>
|
||||
</div>
|
||||
<!-- <div v-else class="col-auto">-->
|
||||
<!-- <Message severity="info" :closable="false" :pt="getMessagePtStyle"> {{ $p.t('abgabetool/c4noFileFound') }} </Message>-->
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -13,7 +13,6 @@ export const AbgabetoolStudent = {
|
||||
AbgabeDetail,
|
||||
FhcOverlay
|
||||
},
|
||||
inject: ['isMobile'],
|
||||
provide() {
|
||||
return {
|
||||
notenOptions: Vue.computed(() => this.notenOptions),
|
||||
@@ -317,7 +316,7 @@ export const AbgabetoolStudent = {
|
||||
},
|
||||
template: `
|
||||
<template v-if="phrasenResolved">
|
||||
<FhcOverlay :active="loading || saving"></FhcOverlay>
|
||||
<FhcOverlay :active="loading"></FhcOverlay>
|
||||
|
||||
<bs-modal ref="modalContainerAbgabeDetail" class="bootstrap-prompt"
|
||||
dialogClass="modal-xl" :allowFullscreenExpand="true">
|
||||
@@ -390,7 +389,7 @@ export const AbgabetoolStudent = {
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$capitalize( $p.t('abgabetool/c4betreuer') )}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ projektarbeit.betreuerart_kurzbz ? $p.t('abgabetool/c4betrart' + projektarbeit.betreuerart_kurzbz) : '' }}
|
||||
{{ projektarbeit.betreuerart_kurzbz ? $p.t('abgabetool/c4betrart' + projektarbeit.betreuerart_kurzbz) + ' ' + projektarbeit.betreuer : '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
|
||||
@@ -43736,26 +43736,6 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4noSignatureCheckPossible',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Signatur konnte nicht überprüft werden',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Unable to check signature',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
|
||||
Reference in New Issue
Block a user