19 declare(strict_types=1);
42 public const TAB_LP =
'learning_progress';
60 $this->tpl = $DIC[
'tpl'];
61 $this->
ctrl = $DIC[
'ilCtrl'];
62 $this->usr = $DIC[
'ilUser'];
63 $this->error_object = $DIC[
'ilErr'];
64 $this->
lng = $DIC[
'lng'];
65 $this->
lng->loadLanguageModule(
'iass');
66 $this->tpl->loadStandardTemplate();
68 $this->request_wrapper = $DIC->http()->wrapper()->query();
69 $this->irss = $DIC[
'resource_storage'];
76 if (is_object($this->
object)) {
79 $this->
ctrl->getLinkTarget($this,
"view"),
81 $this->
object->getRefId()
90 $this->
object->getRefId(),
91 $this->
object->getId(),
98 $next_class = $this->
ctrl->getNextClass($this);
99 $cmd = $this->
ctrl->getCmd();
103 switch ($next_class) {
104 case 'ilpermissiongui':
105 $this->tabs_gui->activateTab(self::TAB_PERMISSION);
107 $this->
ctrl->forwardCommand($ilPermissionGUI);
109 case 'ilindividualassessmentsettingsgui':
110 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
111 $gui = $this->
object->getSettingsGUI();
112 $this->
ctrl->forwardCommand($gui);
114 case 'ilindividualassessmentmembersgui':
117 case 'ilinfoscreengui':
118 $this->tabs_gui->activateTab(self::TAB_INFO);
120 $this->
ctrl->forwardCommand($info);
122 case 'illearningprogressgui':
123 $this->tabs_gui->activateTab(self::TAB_LP);
126 $this->
object->getRefId(),
131 case "ilcommonactiondispatchergui":
133 $this->
ctrl->forwardCommand($gui);
136 $this->tabs_gui->activateTab(self::TAB_EXPORT);
138 $exp_gui->addFormat(
"xml");
139 $this->
ctrl->forwardCommand($exp_gui);
141 case 'ilobjectmetadatagui':
143 $this->tabs_gui->activateTab(self::TAB_META_DATA);
145 $this->
ctrl->forwardCommand($md_gui);
147 case 'ilobjectcopygui':
150 $this->
ctrl->forwardCommand($cp);
155 if ($this->
object->accessHandler()->mayViewAnyUser() || $this->
object->accessHandler()->mayEditMembers()) {
156 $this->
ctrl->setCmdClass(
'ilIndividualassessmentmembersgui');
160 if($cmd ===
'edit' && $this->
object->accessHandler()->simulateMember()) {
173 $this->tabs_gui->activateTab(self::TAB_INFO);
174 $this->
ctrl->setCmd(
'showSummary');
175 $this->
ctrl->setCmdClass(
'ilinfoscreengui');
177 $this->
ctrl->forwardCommand($info);
183 $this->tabs_gui->activateTab(self::TAB_MEMBERS);
184 $gui = $this->
object->getMembersGUI();
185 $this->
ctrl->forwardCommand($gui);
194 $record_gui->parse();
196 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
199 if ($this->
object->loadMembers()->userAllreadyMember($this->usr)) {
209 $member = $this->
object->membersStorage()->loadMember($this->
object, $this->usr);
211 if ($member->finalized()) {
214 if ($member->notify() && $member->finalized()) {
215 $info->
addProperty($this->
txt(
'grading_record'), nl2br($member->record()));
216 if (($member->viewFile()) && $member->fileName() && $member->fileName() !=
"") {
217 $tpl =
new ilTemplate(
"tpl.iass_user_file_download.html",
true,
true,
"Modules/IndividualAssessment");
229 $member = $this->
object->membersStorage()->loadMember($this->
object, $this->usr);
233 && $member->finalized()
234 && $member->viewFile()
235 && $member->fileName()
236 && $member->fileName() !=
"" 238 $identifier = $member->getGrading()->getFile();
239 $resource_id = $this->irss->manage()->find($identifier);
241 $this->irss->consume()->download($resource_id)->run();
248 $content = $this->
object->getSettings()->getContent();
249 if ($content !== null && $content !==
'') {
258 $info_settings = $this->
object->getInfoSettings();
261 $info->
addProperty($this->
txt(
'iass_contact'), $info_settings->getContact());
262 $info->
addProperty($this->
txt(
'iass_responsibility'), $info_settings->getResponsibility());
263 $info->
addProperty($this->
txt(
'iass_phone'), $info_settings->getPhone());
264 $info->
addProperty($this->
txt(
'iass_mails'), $info_settings->getMails());
265 $info->
addProperty($this->
txt(
'iass_consultation_hours'), $info_settings->getConsultationHours());
273 if ($val !== null && $val !==
'') {
277 if ($val !== null && $val !==
'') {
281 if ($val !== null && $val !==
'') {
285 if ($val !== null && $val !==
'') {
289 if ($val !== null && $val !==
'') {
297 if ($this->
object->accessHandler()->mayEditMembers()
298 || $this->
object->accessHandler()->mayGradeAnyUser()
299 || $this->
object->accessHandler()->mayAmendAllUsers()
300 || $this->
object->accessHandler()->mayViewAnyUser()) {
301 $this->tabs_gui->addTab(
303 $this->
txt(
'il_iass_members'),
308 if ($this->
object->accessHandler()->mayReadObject()) {
309 $this->tabs_gui->addTab(
311 $this->
txt(
'info_short'),
316 if ($this->
object->accessHandler()->mayEditObject()) {
317 $this->tabs_gui->addTab(
319 $this->
txt(
'settings'),
324 if (($this->
object->accessHandler()->mayViewAllUsers()
325 || $this->
object->accessHandler()->mayEditLearningProgressSettings()
326 || ($this->
object->loadMembers()->userAllreadyMember($this->usr)
327 && $this->
object->isActiveLP()))
329 $this->tabs_gui->addTab(
331 $this->
txt(
'learning_progress'),
332 $this->
ctrl->getLinkTargetByClass(
'illearningprogressgui')
336 if ($this->
object->accessHandler()->mayEditObject()) {
338 $mdtab = $mdgui->getTab();
340 $this->tabs_gui->addTab(
342 $this->
txt(
"meta_data"),
348 if ($this->
object->accessHandler()->mayEditObject()) {
349 $this->tabs_gui->addTarget(
351 $this->
ctrl->getLinkTargetByClass(
'ilexportgui',
''),
357 if ($this->
object->accessHandler()->mayEditPermissions()) {
358 $this->tabs_gui->addTarget(
359 self::TAB_PERMISSION,
360 $this->
ctrl->getLinkTargetByClass(
'ilpermissiongui',
'perm'),
370 if ($cmd ==
'settings') {
371 return $this->
ctrl->getLinkTargetByClass(
'ilindividualassessmentsettingsgui',
'edit');
373 if ($cmd ==
'info') {
374 return $this->
ctrl->getLinkTarget($this,
'view');
376 if ($cmd ==
'members') {
377 return $this->
ctrl->getLinkTargetByClass(
'ilindividualassessmentmembersgui',
'view');
379 return $this->
ctrl->getLinkTarget($this, $cmd);
385 $this->
ctrl->redirectToURL($link);
395 $this->error_object->raiseError($this->
txt(
"msg_no_perm_read"), $this->error_object->WARNING);
398 public static function _goto(
string $a_target,
string $a_add =
''): void
401 $a_target = (
int) $a_target;
402 if ($DIC[
'ilAccess']->checkAccess(
'write',
'', $a_target)) {
405 if ($DIC[
'ilAccess']->checkAccess(
'read',
'', $a_target)) {
414 return $this->
txt(
'iass_status_pending');
416 return $this->
txt(
'iass_status_completed');
418 return $this->
txt(
'iass_status_failed');
426 $this->tpl->setOnScreenMessage(
"success", $this->
txt(
"iass_added"),
true);
427 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
428 $this->
ctrl->redirectToUrl($this->
ctrl->getLinkTargetByClass(
429 'ilIndividualassessmentsettingsgui',
440 if ($this->
object->accessHandler()->mayReadObject()) {
441 $ref_id = $this->request_wrapper->retrieve(
"ref_id", $this->
refinery->kindlyTo()->int());
442 $link = ilLink::_getLink(
$ref_id,
"iass");
448 protected function txt(
string $code): string
450 return $this->
lng->txt($code);
getLinkTarget(string $cmd)
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
For the purpose of streamlining the grading and learning-process status definition outside of tests...
ILIAS ResourceStorage Services $irss
shouldShowContactInfo(ilIndividualAssessmentInfoSettings $info_settings)
addMemberDataToInfo(ilInfoScreenGUI $info)
ILIAS Refinery Factory $refinery
setVariable(string $variable, $value='')
Sets the given variable to the given value.
recordIndividualAssessmentRead()
ilAccessHandler $ilAccess
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Export User Interface Class.
afterSave(ilObject $new_object)
static _enabledLearningProgress()
addContactDataToInfo(ilInfoScreenGUI $info)
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilErrorHandling $error_object
addGeneralDataToInfo(ilInfoScreenGUI $info)
Class ilObjectGUI Basic methods of all Output classes.
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
getEntryForStatus(int $status)
addSection(string $a_title)
Last visited history for repository items.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
Error Handling & global info handling.
static _goto(string $a_target, string $a_add='')
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
const LP_CONTEXT_REPOSITORY
setInfoObject(ilInfoScreenGUI $info)
get info sections
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
ilNavigationHistory $ilNavigationHistory
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
addHeaderAction()
Add header action menu.
addItem(int $a_ref_id, string $a_link, string $a_type, string $a_title="", ?int $a_sub_obj_id=null, string $a_goto_link="")
Add an item to the stack.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call