ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Exercise\ExerciseManager Class Reference
+ Collaboration diagram for ILIAS\Exercise\ExerciseManager:

Public Member Functions

 __construct (protected InternalRepoService $repo, protected InternalDomainService $domain, protected $obj_id)
 
 delete (\ilObjExercise $exc)
 

Detailed Description

Definition at line 23 of file ExerciseManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Exercise\ExerciseManager::__construct ( protected InternalRepoService  $repo,
protected InternalDomainService  $domain,
protected  $obj_id 
)

Definition at line 25 of file ExerciseManager.php.

29 {
30 }

Member Function Documentation

◆ delete()

ILIAS\Exercise\ExerciseManager::delete ( \ilObjExercise  $exc)

Definition at line 32 of file ExerciseManager.php.

34 : void {
35 // delete assignments
36 $ass_manager = $this->domain->assignment()->assignments(
37 $this->obj_id,
38 0
39 );
40 foreach ($ass_manager->getAll() as $assignment) {
41 $this->domain->assignment()->getAssignment(
42 $assignment->getId()
43 )->delete($exc, false);
44 }
45
46 foreach (\ilExcCriteriaCatalogue::getInstancesByParentId($this->obj_id) as $crit_cat) {
47 $crit_cat->delete();
48 }
49 }
static getInstancesByParentId(int $a_parent_id)

References ilExcCriteriaCatalogue\getInstancesByParentId().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: