forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Create new array shuffled flow based on the Refinery. Refactor old sh… #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lscharmer
wants to merge
2
commits into
trunk
Choose a base branch
from
feature/refinery-random
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mjansenDatabay
requested changes
Oct 26, 2021
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please create a
random()method insrc/Refinery/Factory.php -
RandomGroupshould only be instantiated within this method in theRefinery Factory(and in unit tests) - Please don't create instances in consuming code, alway use
$DIC->refinery()->random().
…uffle to use the new way
7a208b8 to
5f6c2be
Compare
lscharmer
pushed a commit
that referenced
this pull request
Jan 5, 2022
PHP8 -Language Service Refactoring
lscharmer
pushed a commit
that referenced
this pull request
May 31, 2022
Hi Fabian, a PHP Fatal Error occurs when performing setup command 'migrate': PHP Fatal error: Uncaught ILIAS\Setup\UnachievableException: Problem in DB-Update: 0 Return value of ilStaticCache::set() must be of the type bool, array returned in /***/trunk8/Services/GlobalCache/classes/Static/class.ilStaticCache.php:33#0 /***/trunk8/Services/GlobalCache/classes/class.ilGlobalCache.php(307): ilStaticCache->set() #1 /***/trunk8/Services/Language/classes/class.ilCachedLanguage.php(62): ilGlobalCache->set() #2 /***/trunk8/Services/Language/classes/class.ilCachedLanguage.php(29): ilCachedLanguage->writeToCache() #3 /***/trunk8/Services/Language/classes/class.ilCachedLanguage.php(107): ilCachedLanguage->__construct() #4 /***/trunk8/Services/Language/classes/class.ilLanguage.php(91): ilCachedLanguage::getInstance() #5 /***/trunk8/Services/Language/classes/class.ilLanguage.php(374): ilLanguage->__construct in /***/trunk8/Services/Database/classes/Setup/class.ilDatabaseUpdatedObjective.php on line 72
lscharmer
pushed a commit
that referenced
this pull request
Jun 28, 2022
… be of type int, string given"
lscharmer
pushed a commit
that referenced
this pull request
Jun 28, 2022
…uestionPool::toXML(): Argument #1 () must be of type array…
lscharmer
pushed a commit
that referenced
this pull request
Jul 18, 2022
…rown with message ilObject::_lookupObjId(): Argument #1…
lscharmer
pushed a commit
that referenced
this pull request
Jul 18, 2022
…($additionalContentEditingMode) must be of type string, null given,
lscharmer
pushed a commit
that referenced
this pull request
Jul 18, 2022
…ubScreenId(): Argument #1 ($a_id) must be of type string, null given"
lscharmer
pushed a commit
that referenced
this pull request
Aug 10, 2022
…sults in error / ilHelpGUI::setSubScreenId(): Argument #1 must be a string
lscharmer
pushed a commit
that referenced
this pull request
Aug 10, 2022
…alue(): Argument #1 ($a_value) must be of type string…"
lscharmer
pushed a commit
that referenced
this pull request
Nov 28, 2022
…own with message ilAlphabetInputGUI::fixDBUmlauts(): Argument #1 () must be of
lscharmer
pushed a commit
that referenced
this pull request
Jan 13, 2023
…own with message ilAlphabetInputGUI::fixDBUmlauts(): Argument #1 () must be of
lscharmer
pushed a commit
that referenced
this pull request
Feb 28, 2023
occured TypeError: TypeError thrown with message "str_pad(): Argument #1 ($string) must be of type string, int given" Stacktrace: ILIAS-eLearning#7 TypeError in /srv/www/9/trunk9/Services/Object/classes/class.ilObjectDefinition.php:74 ILIAS-eLearning#6 str_pad in /srv/www/9/trunk9/Services/Object/classes/class.ilObjectDefinition.php:74 [...]
lscharmer
pushed a commit
that referenced
this pull request
May 5, 2023
…($data) must be of type string, null given
lscharmer
pushed a commit
that referenced
this pull request
May 15, 2023
…($data) must be of type string, null given
lscharmer
pushed a commit
that referenced
this pull request
Sep 27, 2023
…ink\{closure}(): Argument #1 () must of type int, string given
lscharmer
pushed a commit
that referenced
this pull request
Oct 30, 2023
occured TypeError: TypeError thrown with message "str_pad(): Argument #1 ($string) must be of type string, int given" Stacktrace: ILIAS-eLearning#7 TypeError in /srv/www/9/trunk9/Services/Object/classes/class.ilObjectDefinition.php:74 ILIAS-eLearning#6 str_pad in /srv/www/9/trunk9/Services/Object/classes/class.ilObjectDefinition.php:74 [...]
lscharmer
pushed a commit
that referenced
this pull request
Nov 6, 2023
… () must be of type string, int given
lscharmer
pushed a commit
that referenced
this pull request
Nov 16, 2023
… () must be of type string, int given
lscharmer
pushed a commit
that referenced
this pull request
Jan 15, 2024
…() must be of type int, null given
lscharmer
pushed a commit
that referenced
this pull request
Jan 15, 2024
…() must be of type int, null given
lscharmer
pushed a commit
that referenced
this pull request
Jan 16, 2024
…() must be of type int, null given
lscharmer
pushed a commit
that referenced
this pull request
Jun 11, 2024
…#7410) TypeError thrown with message "Return value of ilObjSurvey::getAnonymousIdByCode() must be of the type int, null returned" Stacktrace: ILIAS-eLearning#9 TypeError in /var/www/html/Modules/Survey/classes/class.ilObjSurvey.php:4702 ILIAS-eLearning#8 ilObjSurvey:getAnonymousIdByCode in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:175 ILIAS-eLearning#7 ilSurveyExecutionGUI:checkAuth in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:354 ILIAS-eLearning#6 ilSurveyExecutionGUI:outSurveyPage in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:280 #5 ilSurveyExecutionGUI:redirectQuestion in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:140 #4 ilSurveyExecutionGUI:executeCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:199 #3 ilCtrl:forwardCommand in /var/www/html/Modules/Survey/classes/class.ilObjSurveyGUI.php:206 #2 ilObjSurveyGUI:executeCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:199 #1 ilCtrl:forwardCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:174 #0 ilCtrl:callBaseClass in /var/www/html/ilias.php:24
lscharmer
pushed a commit
that referenced
this pull request
Jun 24, 2024
…#7410) TypeError thrown with message "Return value of ilObjSurvey::getAnonymousIdByCode() must be of the type int, null returned" Stacktrace: ILIAS-eLearning#9 TypeError in /var/www/html/Modules/Survey/classes/class.ilObjSurvey.php:4702 ILIAS-eLearning#8 ilObjSurvey:getAnonymousIdByCode in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:175 ILIAS-eLearning#7 ilSurveyExecutionGUI:checkAuth in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:354 ILIAS-eLearning#6 ilSurveyExecutionGUI:outSurveyPage in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:280 #5 ilSurveyExecutionGUI:redirectQuestion in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:140 #4 ilSurveyExecutionGUI:executeCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:199 #3 ilCtrl:forwardCommand in /var/www/html/Modules/Survey/classes/class.ilObjSurveyGUI.php:206 #2 ilObjSurveyGUI:executeCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:199 #1 ilCtrl:forwardCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:174 #0 ilCtrl:callBaseClass in /var/www/html/ilias.php:24
lscharmer
pushed a commit
that referenced
this pull request
Jun 24, 2024
…eyCategories::addCategory(): Argument #1 () must be o
lscharmer
pushed a commit
that referenced
this pull request
Jun 24, 2024
…#7410) TypeError thrown with message "Return value of ilObjSurvey::getAnonymousIdByCode() must be of the type int, null returned" Stacktrace: ILIAS-eLearning#9 TypeError in /var/www/html/Modules/Survey/classes/class.ilObjSurvey.php:4702 ILIAS-eLearning#8 ilObjSurvey:getAnonymousIdByCode in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:175 ILIAS-eLearning#7 ilSurveyExecutionGUI:checkAuth in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:354 ILIAS-eLearning#6 ilSurveyExecutionGUI:outSurveyPage in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:280 #5 ilSurveyExecutionGUI:redirectQuestion in /var/www/html/Modules/Survey/Execution/class.ilSurveyExecutionGUI.php:140 #4 ilSurveyExecutionGUI:executeCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:199 #3 ilCtrl:forwardCommand in /var/www/html/Modules/Survey/classes/class.ilObjSurveyGUI.php:206 #2 ilObjSurveyGUI:executeCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:199 #1 ilCtrl:forwardCommand in /var/www/html/Services/UICore/classes/class.ilCtrl.php:174 #0 ilCtrl:callBaseClass in /var/www/html/ilias.php:24
lscharmer
pushed a commit
that referenced
this pull request
Jun 24, 2024
…eyCategories::addCategory(): Argument #1 () must be o
lscharmer
pushed a commit
that referenced
this pull request
Apr 3, 2025
…strip_tags(): Argument #1 ($string) must be of type string, null given # Conflicts: # components/ILIAS/ResourceStorage/src/Preloader/SecureString.php
lscharmer
pushed a commit
that referenced
this pull request
Apr 11, 2025
…strip_tags(): Argument #1 ($string) must be of type string, null given
lscharmer
pushed a commit
that referenced
this pull request
May 14, 2025
…strip_tags(): Argument #1 ($string) must be of type string, null given
lscharmer
pushed a commit
that referenced
this pull request
Sep 23, 2025
…ent #1 () must be of type ?int, string given)
lscharmer
pushed a commit
that referenced
this pull request
Oct 10, 2025
…ent #1 () must be of type ?int, string given)
lscharmer
pushed a commit
that referenced
this pull request
Nov 3, 2025
…() must be of type ?int, string given)
lscharmer
pushed a commit
that referenced
this pull request
Jan 6, 2026
…f type string is deprecated
lscharmer
pushed a commit
that referenced
this pull request
Jan 6, 2026
…t be of type int, null given
lscharmer
pushed a commit
that referenced
this pull request
Jan 6, 2026
…f type string is deprecated
lscharmer
pushed a commit
that referenced
this pull request
Jan 6, 2026
…t be of type int, null given
lscharmer
pushed a commit
that referenced
this pull request
Jan 6, 2026
…f type string is deprecated
lscharmer
pushed a commit
that referenced
this pull request
Jan 6, 2026
…t be of type int, null given
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new implementation uses the
shuffle(...)function instead of theilArrayElementShuffler::mtShuffle(...)method because since PHP 7.1shuffle()already uses the Mersenne Twister algorithm. (see https://www.php.net/manual/en/function.shuffle.php)The existence check for
mt_srandandmt_randis also removed, because it is replaced bysrandin PHP 7.1 (see https://www.php.net/manual/en/function.mt-srand.php)Because all
ILIAS\Refinery\Transformation's must be pure and the seeding of the random number generator is not, theShuffleTransformationreturns an Effect which can be called to seed the random generator and shuffle the previously given array (which then will be returned).This way no side effect is done in the Transformation class itself.