Skip to content

Commit

Permalink
patches, start to oct 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Oct 27, 2023
1 parent 85a7c53 commit e385b3e
Show file tree
Hide file tree
Showing 1,297 changed files with 127,535 additions and 316 deletions.
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,26 @@
/install_client.php
/Services/GlobalScreen/artifacts/global_screen_providers.php
/Services/Style/System/data/data.php
/einverstaednis_de.pdf
/einverstaednis_en.pdf
/internet_agb_en.pdf
/internet_agb.pdf
/internet_de.pdf
/internet_en.pdf
/foto_notes.pdf

# Directories
/data
/Customizing/global
/Customizing/clients
/setup/sql/ilDBTemplate
virtual-data
/libs/composer/vendor
/Customizing/global/plugins/Services/Repository
/etest

# /dicto
/dicto/results/*
!/dicto/results/README.md
override.php
captainhook.config.json
captainhook.local.json
/.htaccess
27 changes: 0 additions & 27 deletions .htaccess

This file was deleted.

15 changes: 15 additions & 0 deletions Customizing/global/agreement/agreement_de.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div style="font-size:12px;"><a target="_blank" href="http://www.carlduisbergportal.de/nutzung.pdf">Nutzungsvereinbarung (PDF)</a><br /><a target="_blank" href="https://www.carlduisbergportal.de/datenschutz.html">Datenschutzerkl&auml;rung (PDF)</a><br />
<br /><br />
<strong>SYSTEMVORAUSSETZUNGEN</strong><br />
<strong>Macintosh</strong><br />
Mac OS X 10.8.x oder höher - Firefox 31.0+, Chrome oder h&ouml;her
<br /><br />
<strong>Windows</strong><br />
Windows 7, Windows 8.x, Windows 10 - Firefox 31.0+, Chrome, MS Edge oder h&ouml;her
<br /><br />
<strong>Linux</strong><br />
Ubuntu, Open Suse, Fedora - Firefox 31.0+, Chorme oder h&ouml;her
<br /><br />
<strong>Hardware</strong><br />
min. Dual Core Prozessor -- 32-Bit oder 64-Bit-Prozessor, min.1 GB RAM, Grafikkarte, Soundkarte, Headset, Lautsprecher
</div>
13 changes: 13 additions & 0 deletions Customizing/global/agreement_daf/agreement_de.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div style="font-size:1.2em;">
<!--
<a target="_blank" href="nutzung.pdf">Nutzungsvereinbarung (PDF)</a><br />
<a target="_blank" href="datenschutz.html">Datenschutzerkl&auml;rung (PDF)</a><br />
-->
<ul>
<li><a target="_blank" href="internet_de.pdf">Benutzungsordnung für die Nutzung von
Computereinrichtungen und den Internet-Zugang
[pdf]</a></li>
<li><a target="_blank" href="https://www.carlduisbergportal.de/datenschutz.html">Datenschutzerklärung</a></li>
<li><a target="_blank" href="https://www.cd-dafportal.de/einverstaednis_de.pdf">Foto Einverstädniserklärung</a></li>
</ul>
</div>
8 changes: 8 additions & 0 deletions Customizing/global/agreement_daf/agreement_en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div style="font-size:1.2em;">
<ul>
<li><a target="_blank" href="internet_en.pdf">Rules for the Use of Computer Equipment and Access to the
Internet [pdf]</a></li>
<li><a target="_blank" href="https://www.carlduisbergportal.de/datenschutz.html">Data Privacy Statement</a></li>
<li><a target="_blank" href="https://www.cd-dafportal.de/einverstaednis_en.pdf">Consent Form - Permission to use images and text</a></li>
</ul>
</div>
189 changes: 189 additions & 0 deletions Customizing/global/lang/ilias_de.lang.local

Large diffs are not rendered by default.

178 changes: 178 additions & 0 deletions Customizing/global/lang/ilias_en.lang.local

Large diffs are not rendered by default.

191 changes: 191 additions & 0 deletions Customizing/global/lang_daf/ilias_de.lang.local

Large diffs are not rendered by default.

181 changes: 181 additions & 0 deletions Customizing/global/lang_daf/ilias_en.lang.local

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
<?php

namespace leifos\CD;

use ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuPluginProvider;

/**
* CD Main menu provider
*
* @author Alexander Killing <[email protected]>
*/
class MainMenuProvider extends AbstractStaticMainMenuPluginProvider
{
/**
* Get plugin
* @return \ilPlugin
*/
protected function getPlugin() : \ilPlugin
{
global $DIC;
return $DIC["ilPluginAdmin"]->getPluginObjectById($this->getPluginID());
}

protected function getIcon(string $path, string $title) : \ILIAS\UI\Component\Symbol\Icon\Custom
{
return $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath($path), $title);
}

/**
* @inheritdoc
*/
public function getStaticTopItems() : array
{
$dic = $this->dic;
$setting = $dic->settings();
$access = $dic->access();
$tree = $dic->repositoryTree();
$lng = $dic->language();
$lng->loadLanguageModule("dash");
$user_admin_centers = \ilCDPermWrapper::getAdminCenters();
$is_anonym = (in_array($dic->user()->getId(), [ANONYMOUS_USER_ID, 0]));

$nd = $tree->getNodeData(ROOT_FOLDER_ID);
$root_title = $nd["title"];
if ($root_title == "ILIAS") {
$root_title = $lng->txt("repository");
}

if ($is_anonym) {
return [];
}

// cd companies
$comp_txt = "";
$comp_link = "";
if (is_array($user_admin_centers) && count($user_admin_centers) > 0) {
$comp_txt = $this->getPlugin()->txt("companies");
$comp_link = "ilias.php?baseClass=ilUIHookPluginGUI&cmd=setCmdClass&cmdClass=ilcduihookgui&forwardTo=cdCompanyGUI";
} else {
// participants list for kunde-per roles
if (\ilCDPermWrapper::isPerRole()) {
$comp_txt = $this->getPlugin()->txt("participants");
$comp_link = "ilias.php?baseClass=ilUIHookPluginGUI&cmd=setCmdClass&cmdClass=ilcduihookgui&forwardTo=cdCompanyGUI";
}
}


return [

// cd dashboard
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_dashboard"))
->withTitle($lng->txt("dash_dashboard"))->withAction("ilias.php?baseClass=ilUIHookPluginGUI&cmd=setCmdClass&cmdClass=ilcduihookgui&forwardTo=cdDesktopGUI")->withAvailableCallable(function (
) : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () : bool {
return true;
})
->withSymbol($this->getIcon(
"outlined/icon_dshs.svg",
$lng->txt("dash_dashboard")
)),

// cd material
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_material"))
->withTitle($this->getPlugin()->txt("material"))->withAction(
\ilLink::_getStaticLink($setting->get("cd_mat_ref_id"), 'cat', true)
)->withAvailableCallable(function (
) : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use ($setting, $access) : bool {
return $setting->get("cd_mat_ref_id") > 0 && $access->checkAccess("read", "", $setting->get("cd_mat_ref_id"));
})
->withSymbol($this->getIcon(
"outlined/icon_facs.svg",
$this->getPlugin()->txt("material")
)),


// cd repository
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_repository"))
->withTitle($root_title)
->withAction(
\ilLink::_getStaticLink(1, 'root', true)
)->withAvailableCallable(function () : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use (
$access,
$user_admin_centers
) : bool {
return ($access->checkAccess("visible", "", ROOT_FOLDER_ID)
&& is_array($user_admin_centers) && count($user_admin_centers) > 0) ||
\ilCDPermWrapper::isAdmin();
})
->withSymbol($this->getIcon(
"outlined/icon_crs.svg",
$root_title
)),


// cd companies
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_companies"))
->withTitle($comp_txt)
->withAction($comp_link)
->withAvailableCallable(function () : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use (
$comp_link,
$comp_txt
) : bool {
return ($comp_link != "");
})
->withSymbol($this->getIcon(
"outlined/icon_usra.svg",
$comp_txt
)),


// cd trainer
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_trainers"))
->withTitle($this->getPlugin()->txt("trainers"))
->withAction("ilias.php?baseClass=ilUIHookPluginGUI&cmd=setCmdClass&cmdClass=ilcduihookgui&forwardTo=ilCDTrainerGUI")
->withAvailableCallable(function () : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use (
$user_admin_centers
) : bool {
return (is_array($user_admin_centers) && count($user_admin_centers) > 0);
})
->withSymbol($this->getIcon(
"outlined/icon_rolf.svg",
$this->getPlugin()->txt("trainers")
)),

// needs analysis
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_needs_analysis"))
->withTitle($this->getPlugin()->txt("needs_analysis_reiter"))
->withAction("./goto.php?target=needsanalysis")
->withAvailableCallable(function () : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use (
$comp_link,
$comp_txt
) : bool {
return true;
})
->withSymbol($this->getIcon(
"outlined/icon_usra.svg",
$comp_txt
)),

// self evaluation
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_self_eval"))
->withTitle($this->getPlugin()->txt("self_evaluation"))
->withAction("./goto.php?target=selfeval")
->withAvailableCallable(function () : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use (
$comp_link,
$comp_txt
) : bool {
return true;
})
->withSymbol($this->getIcon(
"outlined/icon_usra.svg",
$comp_txt
)),

// entry level test
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_entry_level"))
->withTitle($this->getPlugin()->txt("entry_level_test"))
->withAction("./goto.php?target=entrylevel")
->withAvailableCallable(function () : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use (
$comp_link,
$comp_txt
) : bool {
return true;
})
->withSymbol($this->getIcon(
"outlined/icon_usra.svg",
$comp_txt
)),

// studio
$dic->globalScreen()->mainBar()->link($dic->globalScreen()->identification()->plugin(
$this->getPlugin()->getId(),
$this
)->identifier("cd_studio"))
->withTitle($this->getPlugin()->txt("learning_studio"))
->withAction("./goto.php?target=studio")
->withAvailableCallable(function () : bool {
return $this->getPlugin()->isActive();
})->withVisibilityCallable(function () use (
$comp_link,
$comp_txt
) : bool {
return true;
})
->withSymbol($this->getIcon(
"outlined/icon_usra.svg",
$comp_txt
)),


];
}


/**
* @inheritdoc
*/
public function getStaticSubItems() : array
{
return [];
}
}
Loading

0 comments on commit e385b3e

Please sign in to comment.