ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 32 of file ExerciseManager.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 34 of file ExerciseManager.php.

38  {
39  }

Member Function Documentation

◆ delete()

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

Definition at line 41 of file ExerciseManager.php.

References ilExcCriteriaCatalogue\getInstancesByParentId().

43  : void {
44  // delete assignments
45  $ass_manager = $this->domain->assignment()->assignments(
46  $this->obj_id,
47  0
48  );
49  foreach ($ass_manager->getAll() as $assignment) {
50  $this->domain->assignment()->getAssignment(
51  $assignment->getId()
52  )->delete($exc, false);
53  }
54 
55  foreach (\ilExcCriteriaCatalogue::getInstancesByParentId($this->obj_id) as $crit_cat) {
56  $crit_cat->delete();
57  }
58  }
static getInstancesByParentId(int $a_parent_id)
+ Here is the call graph for this function:

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