ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Settings.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Exercise\Settings;
22 
23 class Settings
24 {
25  public function __construct(
26  protected int $obj_id,
27  protected string $instruction,
28  protected int $time_stamp,
29  protected string $pass_mode,
30  protected int $nr_mandatory_random,
31  protected int $pass_nr,
32  protected bool $show_submissions,
33  protected bool $compl_by_submission,
34  protected int $certificate_visibility,
35  protected int $tfeedback
36  ) {
37  }
38 
39  // Getter methods
40  public function getObjId(): int
41  {
42  return $this->obj_id;
43  }
44 
45  public function withObjId(int $id): self
46  {
47  $clone = clone $this;
48  $clone->obj_id = $id;
49  return $clone;
50  }
51 
52 
53  public function getInstruction(): string
54  {
55  return $this->instruction;
56  }
57 
58  public function getTimeStamp(): int
59  {
60  return $this->time_stamp;
61  }
62 
63  public function getPassMode(): string
64  {
65  return $this->pass_mode;
66  }
67 
68  public function getNrMandatoryRandom(): int
69  {
70  return $this->nr_mandatory_random;
71  }
72 
73  public function getPassNr(): int
74  {
75  return $this->pass_nr;
76  }
77 
78  public function getShowSubmissions(): bool
79  {
80  return $this->show_submissions;
81  }
82 
83  public function getCompletionBySubmission(): bool
84  {
85  return $this->compl_by_submission;
86  }
87 
88  public function getCertificateVisibility(): int
89  {
90  return $this->certificate_visibility;
91  }
92 
93  public function getTutorFeedback(): int
94  {
95  return $this->tfeedback;
96  }
97 
98  public function hasTutorFeedbackText(): bool
99  {
100  return (bool) ($this->tfeedback & \ilObjExercise::TUTOR_FEEDBACK_TEXT);
101  }
102 
103  public function hasTutorFeedbackMail(): bool
104  {
105  return (bool) ($this->tfeedback & \ilObjExercise::TUTOR_FEEDBACK_MAIL);
106  }
107 
108  public function hasTutorFeedbackFile(): bool
109  {
110  return (bool) ($this->tfeedback & \ilObjExercise::TUTOR_FEEDBACK_FILE);
111  }
112 
113 }
__construct(protected int $obj_id, protected string $instruction, protected int $time_stamp, protected string $pass_mode, protected int $nr_mandatory_random, protected int $pass_nr, protected bool $show_submissions, protected bool $compl_by_submission, protected int $certificate_visibility, protected int $tfeedback)
Definition: Settings.php:25
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23