19 declare(strict_types=1);
    21 require_once(__DIR__ . 
"/../../../../../../vendor/composer/vendor/autoload.php");
    22 require_once(__DIR__ . 
"/../../prg_mocks.php");
    34         $this->settings_repo = 
new SettingsRepoMock();
    35         foreach ([1, 11, 12, 13, 111, 112] as $pgs_id) {
    36             $settings = 
new SettingsMock($pgs_id);
    38             $this->settings_repo->update($settings);
    42         $this->events = 
new ProgrammeEventsMock();
    45             'firstname' => 
'firstname',
    46             'lastname' => 
'lasttname',
    49             'email' => 
'f.lastname@example.com',
    51             'title' => 
'Prof. Dr.',
    52             'org_units' => 
'some OrgU',
    56             ->withUserInformation($user_info)
    74         $pgs112 = (
new ilPRGProgress(112, $status))->withAmountOfPoints(4);
    75         $pgs111 = (
new ilPRGProgress(111, $status))->withAmountOfPoints(5);
    79         $pgs1 = (
new ilPRGProgress(1, $status))->setSubnodes([$pgs11, $pgs12, $pgs13]);
    86         $today = (new \DateTimeImmutable())->format(
'Ymd');
    87         $ass = $this->ass->initAssignmentDates();
    88         foreach ([1, 11, 12, 13, 111, 112] as $pgs_id) {
    98         $ass = $this->ass->markRelevant($this->settings_repo, 111, 7, $this->messages);
   115             ->markNotRelevant($this->settings_repo, 12, 7, $messages)
   116             ->markNotRelevant($this->settings_repo, 111, 7, $messages);
   118         $this->assertTrue($messages->hasErrors());
   136             ->markAccredited($this->settings_repo, $this->events, 111, 7, $this->messages)
   137             ->markAccredited($this->settings_repo, $this->events, 112, 7, $this->messages)
   138             ->markAccredited($this->settings_repo, $this->events, 13, 7, $this->messages);
   158             ->unmarkAccredited($this->settings_repo, 112, 7, $this->messages)
   159             ->unmarkAccredited($this->settings_repo, 111, 7, $this->messages)
   160             ->unmarkAccredited($this->settings_repo, 13, 7, $this->messages);
   164             $ass->getProgressForNode(112)->getStatus()
   166         $this->assertEquals(0, $ass->getProgressForNode(11)->getCurrentAmountOfPoints());
   169             $ass->getProgressForNode(13)->getStatus()
   173             $ass->getProgressForNode(11)->getStatus()
   183         $pgs12 = $pgss->getSubnode(
'13')->withDeadline($today);
   184         $pgs13 = $pgss->getSubnode(
'13')->withDeadline($yesterday);
   186             ->withSubnode($pgs12)
   187             ->withSubnode($pgs13);
   191             ->succeed($this->settings_repo, 12, 777)
   192             ->succeed($this->settings_repo, 13, 777);
   204             ->changeProgressDeadline(
   205                 $this->settings_repo,
   211             ->changeProgressDeadline(
   212                 $this->settings_repo,
   221             $ass->getProgressForNode(11)->getStatus()
   225             $ass->getProgressForNode(13)->getStatus()
   231         $ass = $this->ass->changeAmountOfPoints(
   232             $this->settings_repo,
   241             ->markRelevant($this->settings_repo, 111, 7, $this->messages)
   242             ->changeAmountOfPoints(
   243                 $this->settings_repo,
   249         $this->assertEquals(1987, $ass->getProgressForNode(111)->getAmountOfPoints());
 
ilPRGMessageCollection $messages
 
testPRGAssignmentActionsChangePoints()
 
getProgressesWithDefaultStatus(int $status)
 
ilStudyProgrammeSettingsRepository $settings_repo
 
withAmountOfPoints(int $points)
 
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
 
testPRGAssignmentActionsSucceedAndDeadline()
 
ilStudyProgrammeEvents $events
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
testPRGAssignmentActionsMarkAccredited()
 
const STATUS_NOT_RELEVANT
 
withProgressTree(ilPRGProgress $progress)
 
testPRGAssignmentActionsMarkRelevant()
 
testPRGAssignmentActionsInitDates()
 
getProgressForNode(int $node_id)
 
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...
 
Holds information about multi-actions, mainly in context of member-assignemnts and status changes...