forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release_9' of https://github.com/ILIAS-eLearning/ILIAS …
…into release_9
- Loading branch information
Showing
33 changed files
with
392 additions
and
163 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
use ILIAS\Services\WOPI\Embed\EmbeddedApplication; | ||
use ILIAS\Data\URI; | ||
use ILIAS\UI\Component\Modal\Modal; | ||
use ILIAS\Services\WOPI\Discovery\ActionTarget; | ||
|
||
/** | ||
* @author Fabian Schmid <[email protected]> | ||
|
@@ -200,7 +201,8 @@ public function executeCommand(): void | |
return; | ||
case strtolower(ilWOPIEmbeddedApplicationGUI::class): | ||
$action = $this->action_repo->getActionForSuffix( | ||
$this->current_revision->getInformation()->getSuffix() | ||
$this->current_revision->getInformation()->getSuffix(), | ||
ActionTarget::EDIT | ||
); | ||
|
||
$embeded_application = new EmbeddedApplication( | ||
|
@@ -329,7 +331,8 @@ private function index(): void | |
$suffix = $this->current_revision?->getInformation()?->getSuffix(); | ||
|
||
if ($this->action_repo->hasActionForSuffix( | ||
$this->current_revision->getInformation()->getSuffix() | ||
$this->current_revision->getInformation()->getSuffix(), | ||
ActionTarget::EDIT | ||
)) { | ||
$external_editor = $this->ui->factory() | ||
->button() | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,13 @@ | |
******************************************************************** | ||
*/ | ||
|
||
use ILIAS\Skill\Usage\SkillUsageManager; | ||
use ILIAS\Skill\Usage; | ||
|
||
/** | ||
* Basic Skill | ||
* @author Alex Killing <[email protected]> | ||
*/ | ||
class ilBasicSkill extends ilSkillTreeNode implements ilSkillUsageInfo | ||
class ilBasicSkill extends ilSkillTreeNode implements Usage\SkillUsageInfo | ||
{ | ||
protected ilObjUser $user; | ||
protected ilSkillLevelRepository $bsc_skl_lvl_db_rep; | ||
|
@@ -598,7 +598,7 @@ public static function getUsageInfo(array $a_cskill_ids): array | |
|
||
return $usage_manager->getUsageInfoGeneric( | ||
$a_cskill_ids, | ||
SkillUsageManager::USER_ASSIGNED, | ||
Usage\SkillUsageManager::USER_ASSIGNED, | ||
"skl_user_skill_level", | ||
"user_id" | ||
); | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,12 @@ | |
|
||
namespace ILIAS\Skill\Personal; | ||
|
||
use ILIAS\Skill\Usage\SkillUsageManager; | ||
use ILIAS\Skill\Usage; | ||
|
||
/** | ||
* @author Thomas Famula <[email protected]> | ||
*/ | ||
class AssignedMaterialManager implements \ilSkillUsageInfo | ||
class AssignedMaterialManager implements Usage\SkillUsageInfo | ||
{ | ||
protected AssignedMaterialDBRepository $ass_mat_repo; | ||
protected PersonalSkillDBRepository $personal_repo; | ||
|
@@ -116,7 +116,7 @@ public static function getUsageInfo(array $a_cskill_ids): array | |
// material | ||
$usages = $usage_manager->getUsageInfoGeneric( | ||
$a_cskill_ids, | ||
SkillUsageManager::USER_MATERIAL, | ||
Usage\SkillUsageManager::USER_MATERIAL, | ||
"skl_assigned_material", | ||
"user_id" | ||
); | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,12 @@ | |
|
||
namespace ILIAS\Skill\Profile; | ||
|
||
use ILIAS\Skill\Usage\SkillUsageManager; | ||
use ILIAS\Skill\Usage; | ||
|
||
/** | ||
* @author Thomas Famula <[email protected]> | ||
*/ | ||
class SkillProfileManager implements \ilSkillUsageInfo | ||
class SkillProfileManager implements Usage\SkillUsageInfo | ||
{ | ||
protected SkillProfileDBRepository $profile_repo; | ||
protected SkillProfileLevelsDBRepository $profile_levels_repo; | ||
|
@@ -462,7 +462,7 @@ public static function getUsageInfo(array $a_cskill_ids): array | |
|
||
return $usage_manager->getUsageInfoGeneric( | ||
$a_cskill_ids, | ||
SkillUsageManager::PROFILE, | ||
Usage\SkillUsageManager::PROFILE, | ||
"skl_profile_level", | ||
"profile_id", | ||
"base_skill_id" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
namespace ILIAS\Skill\Resource; | ||
|
||
use ILIAS\Skill\Usage\SkillUsageManager; | ||
use ILIAS\Skill\Usage; | ||
|
||
/** | ||
* Manages resources for skills. This is not about user assigned materials, | ||
|
@@ -34,7 +34,7 @@ | |
* | ||
* @author Thomas Famula <[email protected]> | ||
*/ | ||
class SkillResourcesManager implements \ilSkillUsageInfo | ||
class SkillResourcesManager implements Usage\SkillUsageInfo | ||
{ | ||
protected SkillResourceDBRepository $skill_res_repo; | ||
protected \ilSkillLevelRepository $level_repo; | ||
|
@@ -227,7 +227,7 @@ public static function getUsageInfo(array $a_cskill_ids): array | |
|
||
return $usage_manager->getUsageInfoGeneric( | ||
$a_cskill_ids, | ||
SkillUsageManager::RESOURCE, | ||
Usage\SkillUsageManager::RESOURCE, | ||
"skl_skill_resource", | ||
"rep_ref_id", | ||
"base_skill_id" | ||
|
This file contains 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
47 changes: 47 additions & 0 deletions
47
Services/Skill/Service/classes/class.SkillUsageService.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* 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. | ||
* | ||
* If this is not the case or you just want to try ILIAS, you'll find | ||
* us at: | ||
* https://www.ilias.de | ||
* https://github.com/ILIAS-eLearning | ||
* | ||
******************************************************************** | ||
*/ | ||
|
||
namespace ILIAS\Skill\Service; | ||
|
||
use ILIAS\Skill\Usage; | ||
|
||
/** | ||
* @author [email protected] | ||
*/ | ||
class SkillUsageService | ||
{ | ||
protected Usage\SkillUsageManager $usage_manager; | ||
|
||
public function __construct(SkillInternalService $internal_service) | ||
{ | ||
$this->usage_manager = $internal_service->manager()->getUsageManager(); | ||
} | ||
|
||
public function addUsage(int $obj_id, int $skill_id, int $tref_id): void | ||
{ | ||
$this->usage_manager->addUsage($obj_id, $skill_id, $tref_id); | ||
} | ||
|
||
public function removeUsage(int $obj_id, int $skill_id, int $tref_id): void | ||
{ | ||
$this->usage_manager->removeUsage($obj_id, $skill_id, $tref_id); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
* | ||
* @author Alex Killing <[email protected]> | ||
*/ | ||
class SkillUsageManager implements \ilSkillUsageInfo | ||
class SkillUsageManager implements SkillUsageInfo | ||
{ | ||
public const TYPE_GENERAL = "gen"; | ||
public const USER_ASSIGNED = "user"; | ||
|
@@ -54,7 +54,7 @@ class SkillUsageManager implements \ilSkillUsageInfo | |
public const RESOURCE = "res"; | ||
|
||
/** | ||
* @var \ilSkillUsageInfo[] | ||
* @var SkillUsageInfo[] | ||
*/ | ||
protected array $classes = [\ilBasicSkill::class, AssignedMaterialManager::class, SkillProfileManager::class, | ||
SkillResourcesManager::class, SkillUsageManager::class]; | ||
|
This file contains 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
Oops, something went wrong.