Skip to content

Instantly share code, notes, and snippets.

View klees's full-sized avatar

Richard Klees klees

View GitHub Profile
@klees
klees / Toolbar_Research-and-Categorization.md
Created May 8, 2023 10:31
Paper about the state of the ILIAS Toolbar

ILIAS Toolbar - Functionalities and Recommendations

The Toolbar is a visual element that is used throughout ILIAS. As its name suggests, it aims to bundle functionality that could come in handy for the current page. It is located above the actual page content, but below the main navigational elements on the pages.

Although the description and the appearance of the Toolbar seem to be simple, the actual occurrences of the Toolbar show a surprising variety of uses and offered funtionality. This paper attempts to give an overview of this variety and derive

<?php
/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
@klees
klees / rts-ecs.php
Created March 10, 2022 13:10
Code created during "Entity Component Systems - Polymorphism Beyond Interfaces and Inheritance" on 37th ILIAS-DevConf
<?php
class Entity {
protected string $name;
public function __construct(string $name) {
$this->name = $name;
}
public function getName() : string {
@klees
klees / pre-commit
Created February 22, 2021 10:19
ILIAS Git Hooks
#!/bin/sh
if [ -x libs/composer/vendor/bin/php-cs-fixer ]; then
echo "PHP CS Fixer is installed begin to check PHP files"
CONFIGURATION_FILE="./CI/PHP-CS-Fixer/code-format.php_cs"
if [ -f $CONFIGURATION_FILE]; then
echo "The configuration file is not found under ${CONFIGURATION_FILE}"
fi
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM -- '*.php')
return_code=0
@klees
klees / cli_test.php
Created October 17, 2019 14:39
Testing file for ILIAS-CLI-Setup
<?php
/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
// according to ./Services/Feeds/classes/class.ilExternalFeed.php:
define("MAGPIE_DIR", "./Services/Feeds/magpierss/");
require_once(__DIR__."/classes/class.ilSetupLanguage.php");
<?php
interface Functor {
public function map(callable $f) : Functor;
}
interface Expression extends Functor {
}
class Value implements Expression {
@klees
klees / install.json
Created May 28, 2019 08:09
install.json for ILIAS-Setup-POC
{
"database" : {
"type" : "innodb",
"host" : "localhost",
"database" : "setuptest",
"user" : "my-user",
"password" : "my-password",
"create_database" : true
}
}
@klees
klees / ILIAS-DICTO_2016-11-07
Last active November 7, 2016 10:19
ILIAS-DICTO_2016-11-07
################################################################################
WholeIliasCodebase cannot invoke triggerError
-> 5 Violations
################################################################################
Services/Component/classes/class.ilClaimingPermissionHelper.php (180):
trigger_error("INVALID permission context - ".$a_context_type.":".$a_context_id.":".$a_action_id.":".$a_action_sub_id, E_USER_WARNING);
@klees
klees / gist:addf8bf6dc7480543361f9275c74650b
Created June 6, 2016 08:31
Output of phpunit Services/Init/test
PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
E.................
Time: 1.53 seconds, Memory: 31.50Mb
There was 1 error:
1) ilInitialisationTest::test_DIC with data set #0 ('ilIliasIniFile', 'ilIniFile')
Whoops\Exception\ErrorException: session_start(): Cannot send session cookie - headers already sent by (output started at phar:///Users/rklees/bin/phpunit/phpunit/Util/Printer.php:139)