ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammeAssignmentTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilStudyProgrammeAssignmentTest:
+ Collaboration diagram for ilStudyProgrammeAssignmentTest:

Public Member Functions

 testPRGAssignmentInitAndId ()
 
 testPRGAssignmentProperties ()
 

Protected Attributes

 $backupGlobals = false
 

Detailed Description

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

Definition at line 23 of file ilStudyProgrammeAssignmentTest.php.

Member Function Documentation

◆ testPRGAssignmentInitAndId()

ilStudyProgrammeAssignmentTest::testPRGAssignmentInitAndId ( )

Definition at line 27 of file ilStudyProgrammeAssignmentTest.php.

27  : void
28  {
29  $ass = new ilPRGAssignment(123, 6);
30  $this->assertEquals($ass->getId(), 123);
31  $this->assertEquals($ass->getUserId(), 6);
32  }
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...

◆ testPRGAssignmentProperties()

ilStudyProgrammeAssignmentTest::testPRGAssignmentProperties ( )

Definition at line 34 of file ilStudyProgrammeAssignmentTest.php.

References ilPRGAssignment\DATE_TIME_FORMAT.

34  : void
35  {
36  $ass = new ilPRGAssignment(123, 456);
37  $now = new DateTimeImmutable();
38 
39  $ass = $ass->withLastChange(6, $now);
40  $this->assertEquals($ass->getLastChangeBy(), 6);
41  $this->assertEquals($ass->getLastChange()->format(ilPRGAssignment::DATE_TIME_FORMAT), $now->format(ilPRGAssignment::DATE_TIME_FORMAT));
42 
43  $this->assertFalse($ass->withManuallyAssigned(false)->isManuallyAssigned());
44  $this->assertTrue($ass->withManuallyAssigned(true)->isManuallyAssigned());
45 
46  $dl = DateTimeImmutable::createFromFormat('Ymd', '20201001');
47  $ass = $ass->withRestarted(321, $dl);
48  $this->assertEquals($ass->getRestartDate()->format('Ymd'), '20201001');
49  $this->assertEquals($ass->getRestartedAssignmentId(), 321);
50  }
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...

Field Documentation

◆ $backupGlobals

ilStudyProgrammeAssignmentTest::$backupGlobals = false
protected

Definition at line 25 of file ilStudyProgrammeAssignmentTest.php.


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