aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Siegfried <david.siegfried@uni-vechta.de>2022-11-15 15:39:09 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2022-11-24 11:11:45 +0000
commit4aa2263709aed90f4a7d5e99fd8eb0a0a9ac3225 (patch)
treee417487a7eed0529bfde2b644d4eee149915fc66
parentb12e93045465c2e825e15ff52d0c268026f9b99d (diff)
Apply 13 suggestion(s) to 4 file(s)tic-00853
-rw-r--r--app/controllers/file.php4
-rw-r--r--app/controllers/oer/mymaterial.php10
-rw-r--r--app/views/file/oer_post_upload.php18
-rw-r--r--lib/cronjobs/remind_oer_upload.class.php2
4 files changed, 19 insertions, 15 deletions
diff --git a/app/controllers/file.php b/app/controllers/file.php
index cfeee5a..2573df7 100644
--- a/app/controllers/file.php
+++ b/app/controllers/file.php
@@ -522,13 +522,13 @@ class FileController extends AuthenticatedController
];
// only if you were in Dateibereich
- if ($this->redirect == 'redirect_to_files') {
+ if ($this->redirect === 'redirect_to_files') {
$_SESSION['NEW_OER']['redirect_url'] = 'files';
$_SESSION['NEW_OER']['dir'] = $this->folder->getId();
$_SESSION['NEW_OER']['cid'] = $this->folder->range_id;
}
- $this->redirect("oer/mymaterial/edit/");
+ $this->redirect('oer/mymaterial/edit');
}
/**
diff --git a/app/controllers/oer/mymaterial.php b/app/controllers/oer/mymaterial.php
index b3617b2..2d5b93c 100644
--- a/app/controllers/oer/mymaterial.php
+++ b/app/controllers/oer/mymaterial.php
@@ -148,9 +148,13 @@ class Oer_MymaterialController extends AuthenticatedController
PageLayout::postSuccess(_('Lernmaterial erfolgreich gespeichert.'));
if (Request::get('redirect_url')) {
- if (Request::get('redirect_url') == 'files') {
- $this->redirect(URLHelper::getURL('dispatch.php/course/files/index/'
- . Request::get('dir') . '?cid=' . Request::get('cid')));
+ if (Request::get('redirect_url') === 'files') {
+ $this->redirect(
+ URLHelper::getURL(
+ 'dispatch.php/course/files/index/' . Request::get('dir'),
+ ['cid' => Request::get('cid')]
+ )
+ );
} else {
$this->redirect(URLHelper::getURL(Request::get('redirect_url'), [
'material_id' => $material->getId(),
diff --git a/app/views/file/oer_post_upload.php b/app/views/file/oer_post_upload.php
index bc49399..6645dab 100644
--- a/app/views/file/oer_post_upload.php
+++ b/app/views/file/oer_post_upload.php
@@ -16,13 +16,13 @@ if (!$selected_oer_upload) {
<? if (0 == $selected_oer_upload) echo 'checked'; ?>>
<label for="oer-upload-no">
<div class="icon">
- <?= Icon::create('decline', Icon::ROLE_CLICKABLE)->asImg(32) ?>
+ <?= Icon::create('decline')->asImg(32) ?>
</div>
<div class="text">
<?= _('Nicht für den OER-Campus bereitstellen.') ?>
</div>
- <?= Icon::create('arr_1down', Icon::ROLE_CLICKABLE)->asImg(24, ['class' => 'arrow']) ?>
- <?= Icon::create('check-circle', Icon::ROLE_CLICKABLE)->asImg(32, ['class' => 'check']) ?>
+ <?= Icon::create('arr_1down')->asImg(24, ['class' => 'arrow']) ?>
+ <?= Icon::create('check-circle')->asImg(32, ['class' => 'check']) ?>
</label>
<div class="oer_upload_description">
<div class="description">
@@ -35,13 +35,13 @@ if (!$selected_oer_upload) {
<? if (1 == $selected_oer_upload) echo 'checked'; ?>>
<label for="oer-upload-yes">
<div class="icon">
- <?= Icon::create('accept', Icon::ROLE_CLICKABLE)->asImg(32) ?>
+ <?= Icon::create('accept')->asImg(32) ?>
</div>
<div class="text">
<?= _('Jetzt für den OER-Campus bereitstellen.') ?>
</div>
- <?= Icon::create('arr_1down', Icon::ROLE_CLICKABLE)->asImg(24, ['class' => 'arrow']) ?>
- <?= Icon::create('check-circle', Icon::ROLE_CLICKABLE)->asImg(32, ['class' => 'check']) ?>
+ <?= Icon::create('arr_1down')->asImg(24, ['class' => 'arrow']) ?>
+ <?= Icon::create('check-circle')->asImg(32, ['class' => 'check']) ?>
</label>
<div class="oer_upload_description">
<div class="description">
@@ -53,13 +53,13 @@ if (!$selected_oer_upload) {
<? if (2 == $selected_oer_upload) echo 'checked'; ?>>
<label for="oer-upload-later">
<div class="icon">
- <?= Icon::create('date', Icon::ROLE_CLICKABLE)->asImg(32) ?>
+ <?= Icon::create('date')->asImg(32) ?>
</div>
<div class="text">
<?= _('Zu einem späteren Zeitpunkt für den OER-Campus bereitstellen.') ?>
</div>
- <?= Icon::create('arr_1down', Icon::ROLE_CLICKABLE)->asImg(24, ['class' => 'arrow']) ?>
- <?= Icon::create('check-circle', Icon::ROLE_CLICKABLE)->asImg(32, ['class' => 'check']) ?>
+ <?= Icon::create('arr_1down')->asImg(24, ['class' => 'arrow']) ?>
+ <?= Icon::create('check-circle')->asImg(32, ['class' => 'check']) ?>
</label>
<div class="oer_upload_description">
<div class="description">
diff --git a/lib/cronjobs/remind_oer_upload.class.php b/lib/cronjobs/remind_oer_upload.class.php
index b3dc455..51b9ca5 100644
--- a/lib/cronjobs/remind_oer_upload.class.php
+++ b/lib/cronjobs/remind_oer_upload.class.php
@@ -40,7 +40,7 @@ class RemindOerUpload extends CronJob
$file_to_suggest = $filetype->convertToStandardFile();
$this->author = $file_ref->owner->username;
- $this->link_to_share = URLHelper::getURL("dispatch.php/file/share_oer/" . $result['file_ref_id']);
+ $this->link_to_share = URLHelper::getURL('dispatch.php/file/share_oer/' . $result['file_ref_id']);
$this->linktext = _('Klicken Sie hier, um das Material im OER-Campus zu veröffentlichen.');
$this->formatted_link = '['. $this->linktext .']' . $this->link_to_share;