5 require_once
"classes/class.ilObjectGUI.php";
33 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
35 $lng->loadLanguageModule(
"exercise");
36 $lng->loadLanguageModule(
"exc");
37 $this->ctrl->saveParameter($this,
38 array(
"ass_id",
"part_id",
"fsmode"));
40 if (
$_GET[
"ass_id"] > 0)
42 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
49 return $this->files ? $this->files : array();
54 $this->files = $a_files;
61 $next_class = $this->ctrl->getNextClass($this);
62 $cmd = $this->ctrl->getCmd();
68 case "ilfilesystemgui":
71 if (
$_GET[
"fsmode"] ==
"feedback" ||
72 $_GET[
"fsmode"] ==
"feedbackpart")
74 $ilCtrl->saveParameter($this, array(
"member_id"));
77 $ilTabs->clearTargets();
79 if (
$_GET[
"fsmode"] !=
"feedbackpart")
81 $ilTabs->setBackTarget($lng->txt(
"back"),
82 $ilCtrl->getLinkTarget($this,
"members"));
86 $ilTabs->setBackTarget($lng->txt(
"back"),
87 $ilCtrl->getLinkTarget($this,
"showParticipant"));
89 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
92 include_once(
"./classes/class.ilFileSystemGUI.php");
94 $fs_gui->
setTableId(
"excfbfil".(
int)$_GET[
"ass_id"].
"_".(
int)$_GET[
"member_id"]);
95 $fs_gui->setAllowDirectories(
false);
96 include_once(
"./Services/User/classes/class.ilUserUtil.php");
97 $fs_gui->setTitle($lng->txt(
"exc_fb_files").
" - ".
100 $pcommand = $fs_gui->getLastPerformedCommand();
101 if ($pcommand[
"cmd"] ==
"create_file")
103 $this->
object->sendFeedbackFileNotification($pcommand[
"name"], (
int) $_GET[
"member_id"],
104 (
int) $_GET[
"ass_id"]);
106 $ret = $this->ctrl->forwardCommand($fs_gui);
111 $ilTabs->activateTab(
"ass_files");
112 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
115 include_once(
"./classes/class.ilFileSystemGUI.php");
118 $fs_gui->setAllowDirectories(
false);
119 $ret = $this->ctrl->forwardCommand($fs_gui);
123 case "ilinfoscreengui":
124 $ilTabs->activateTab(
"info");
128 case 'ilpermissiongui':
129 $ilTabs->activateTab(
"permissions");
130 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
132 $ret =& $this->ctrl->forwardCommand($perm_gui);
135 case "illearningprogressgui":
136 $ilTabs->activateTab(
"learning_progress");
137 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
140 $this->object->getRefId(),
141 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
142 $this->ctrl->forwardCommand($new_gui);
143 $this->tabs_gui->setTabActive(
'learning_progress');
146 case 'ilrepositorysearchgui':
147 $ilTabs->activateTab(
"grades");
148 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
150 $rep_search->setTitle($this->lng->txt(
"exc_add_participant"));
151 $rep_search->setCallback($this,
'addMembersObject');
154 $this->tabs_gui->setTabActive(
'members');
155 $this->ctrl->setReturn($this,
'members');
156 $ret =& $this->ctrl->forwardCommand($rep_search);
157 #$this->__setSubTabs('members');
158 #$this->tabs_gui->setSubTabActive('members');
161 case 'ilobjectcopygui':
162 $ilCtrl->saveParameter($this,
'new_type');
163 $ilCtrl->setReturnByClass(get_class($this),
'create');
165 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
168 $this->ctrl->forwardCommand($cp);
172 $ilTabs->activateTab(
"export");
173 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
175 $exp_gui->addFormat(
"xml");
176 $ret = $this->ctrl->forwardCommand($exp_gui);
179 case 'ilshoppurchasegui':
180 include_once
'./Services/Payment/classes/class.ilShopPurchaseGUI.php';
183 $this->ctrl->forwardCommand($sp);
186 case "ilcommonactiondispatchergui":
187 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
189 $this->ctrl->forwardCommand($gui);
192 case "ilcertificategui":
194 $this->tabs_gui->activateTab(
"settings");
195 $this->tabs_gui->activateSubTab(
"certificate");
196 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
197 include_once
"./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
199 $this->ctrl->forwardCommand($output_gui);
243 $ilUser->getId(),
$_REQUEST[
"delivered"]);
249 $ilCtrl->redirect($this,
"submissionScreen");
262 $this->tabs_gui->setTabActive(
"content");
265 if (mktime() > $this->ass->getDeadline())
268 $ilCtrl->redirect($this,
"submissionScreen");
271 if (!is_array(
$_POST[
"delivered"]) || count(
$_POST[
"delivered"]) == 0)
274 $ilCtrl->redirect($this,
"submissionScreen");
278 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
280 $cgui->setFormAction($ilCtrl->getFormAction($this));
281 $cgui->setHeaderText($lng->txt(
"info_delete_sure"));
282 $cgui->setCancel($lng->txt(
"cancel"),
"submissionScreen");
283 $cgui->setConfirm($lng->txt(
"delete"),
"deleteDelivered");
288 foreach (
$_POST[
"delivered"] as $i)
294 if ($f[
"returned_id"] == $i)
299 $cgui->addItem(
"delivered[]", $i,
$title);
302 $tpl->setContent($cgui->getHTML());
318 if (mktime() > $this->ass->getDeadline())
321 $ilCtrl->redirect($this,
"submissionScreen");
324 if (count(
$_POST[
"delivered"]) && mktime() < $this->ass->getDeadline())
326 $this->
object->deleteDeliveredFiles($this->object->getId(), (int)
$_GET[
"ass_id"],
327 $_POST[
"delivered"], $ilUser->id);
329 $this->
object->handleSubmission((
int)
$_GET[
'ass_id']);
337 $ilCtrl->redirect($this,
"submissionScreen");
348 require_once
"./Services/Utilities/classes/class.ilUtil.php";
352 $this->tabs_gui->setTabActive(
"content");
355 if (mktime() > $this->ass->getDeadline())
362 include_once(
"./Modules/Exercise/classes/class.ilExcDeliveredFilesTableGUI.php");
364 $this->tpl->setVariable(
"DELIVERED_FILES_TABLE",
$tab->getHTML());
366 if (mktime() < $this->ass->getDeadline())
369 $this->tpl->setVariable(
"UPLOAD_SINGLE_FORM", $this->form->getHTML());
372 $this->tpl->setVariable(
"UPLOAD_MULTI_FORM", $this->form->getHTML());
383 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
387 include_once(
"./Services/Form/classes/class.ilFileWizardInputGUI.php");
391 $this->form->addItem($fi);
393 $this->form->addCommandButton(
"deliverFile", $lng->txt(
"upload"));
395 $this->form->setTitle($lng->txt(
"file_add"));
396 $this->form->setFormAction($ilCtrl->getFormAction($this));
406 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
410 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
413 $this->form->addItem($fi);
415 $this->form->addCommandButton(
"deliverUnzip", $lng->txt(
"upload"));
417 $this->form->setTitle($lng->txt(
"header_zip"));
418 $this->form->setFormAction($ilCtrl->getFormAction($this));
431 foreach ($_FILES[
"deliver"][
"name"] as $k => $v)
434 "name" => $_FILES[
"deliver"][
"name"][$k],
435 "type" => $_FILES[
"deliver"][
"type"][$k],
436 "tmp_name" => $_FILES[
"deliver"][
"tmp_name"][$k],
437 "error" => $_FILES[
"deliver"][
"error"][$k],
438 "size" => $_FILES[
"deliver"][
"size"][$k],
440 if(!$this->object->deliverFile(
$file, (
int)
$_GET[
"ass_id"], $ilUser->id))
453 $this->
object->handleSubmission((
int)$_GET[
'ass_id']);
455 $ilCtrl->redirect($this,
"submissionScreen");
467 if (preg_match(
"/zip/",$_FILES[
"deliver"][
"type"]) == 1)
469 if($this->object->processUploadedFile($_FILES[
"deliver"][
"tmp_name"],
"deliverFile",
false,
470 (
int)
$_GET[
"ass_id"]))
473 $this->
object->handleSubmission((
int)$_GET[
'ass_id']);
477 $ilCtrl->redirect($this,
"submissionScreen");
485 global $rbacsystem, $ilUser;
497 $this->ctrl->redirect($this,
"view");
501 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
503 $files = $storage->getFeedbackFiles($ilUser->getId());
505 foreach(
$files as $fb_file)
507 if($fb_file == urldecode(
$file))
515 echo
"FILE DOES NOT EXIST";
521 $not_started_yet =
false;
522 if ($ass->getStartTime() > 0 && time() - $ass->getStartTime() <= 0)
524 $not_started_yet =
true;
528 if (!$not_started_yet)
530 $p = $storage->getFeedbackFilePath($ilUser->getId(), urldecode(
$file));
554 $this->ctrl->redirect($this,
"view");
558 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
563 if($lfile[
"name"] == urldecode(
$file))
571 echo
"FILE DOES NOT EXIST";
577 $not_started_yet =
false;
578 if ($ass->getStartTime() > 0 && time() - $ass->getStartTime() <= 0)
580 $not_started_yet =
true;
584 if (!$not_started_yet)
586 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
588 $p = $storage->getAssignmentFilePath(urldecode(
$file));
597 $a_new_object->saveData();
600 ilUtil::redirect(
"ilias.php?baseClass=ilExerciseHandlerGUI&ref_id=".$a_new_object->
getRefId().
"&cmd=addAssignment");
608 $a_form->
setTitle($this->lng->txt(
"exc_edit_exercise"));
612 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"exc_show_submissions"),
"show_submissions");
613 $cb->
setInfo($this->lng->txt(
"exc_show_submissions_info"));
620 $op1 =
new ilRadioOption($this->lng->txt(
"exc_pass_all"),
"all",
621 $this->lng->txt(
"exc_pass_all_info"));
622 $radg->addOption($op1);
623 $op2 =
new ilRadioOption($this->lng->txt(
"exc_pass_minimum_nr"),
"nr",
624 $this->lng->txt(
"exc_pass_minimum_nr_info"));
625 $radg->addOption($op2);
630 $ni->setMaxLength(4);
631 $ni->setRequired(
true);
632 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
634 $min = max($mand, 1);
635 $ni->setMinValue($min);
636 $op2->addSubItem($ni);
640 $cbox =
new ilCheckboxInputGUI($this->lng->txt(
"exc_submission_notification"),
"notification");
641 $cbox->
setInfo($this->lng->txt(
"exc_submission_notification_info"));
644 $subcompl =
new ilCheckboxInputGUI($this->lng->txt(
'exc_completion_by_submission'),
'completion_by_submission');
645 $subcompl->
setInfo($this->lng->txt(
'exc_completion_by_submission_info'));
646 $subcompl->setValue(1);
657 $a_values[
"desc"] = $this->
object->getLongDescription();
658 $a_values[
"show_submissions"] = $this->
object->getShowSubmissions();
659 $a_values[
"pass_mode"] = $this->
object->getPassMode();
660 if ($a_values[
"pass_mode"] ==
"nr")
662 $a_values[
"pass_nr"] = $this->
object->getPassNr();
665 include_once
"./Services/Notification/classes/class.ilNotification.php";
668 $this->
object->getId());
670 $a_values[
'completion_by_submission'] = $this->
object->isCompletionBySubmissionEnabled();
676 $this->
object->setShowSubmissions($a_form->
getInput(
"show_submissions"));
677 $this->
object->setPassMode($a_form->
getInput(
"pass_mode"));
678 if ($this->object->getPassMode() ==
"nr")
680 $this->
object->setPassNr($a_form->
getInput(
"pass_nr"));
683 $this->
object->setCompletionBySubmission($a_form->
getInput(
'completion_by_submission') == 1 ?
true :
false);
685 include_once
"./Services/Notification/classes/class.ilNotification.php";
687 $ilUser->getId(), $this->
object->getId(),
688 (bool)$a_form->
getInput(
"notification"));
693 $this->ctrl->redirect($this,
"view");
702 if(!$this->object->addUploadedFile($_FILES[
"zipfile"],
true))
706 $this->ctrl->redirect($this,
"edit");
716 if(!$this->object->addUploadedFile($_FILES[
"file"]))
720 $this->ctrl->redirect($this,
"edit");
733 if (
$_POST[
"downloadReturned"])
735 $this->
object->members_obj->deliverReturnedFiles(key(
$_POST[
"downloadReturned"]));
750 case "redirectFeedbackMail":
754 case "delete_member":
768 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId()) &&
769 $this->object->getShowSubmissions() &&
770 $this->
object->getTimestamp() - time() <= 0)
780 $this->object->getId(), (int)
$_GET[
"ass_id"], (
int)
$_GET[
"member_id"]))
782 $this->ctrl->redirect($this,
"members");
795 $this->object->getId(), (int)
$_GET[
"ass_id"], (
int)
$_GET[
"member_id"],
true))
797 $this->ctrl->redirect($this,
"members");
807 if(!strlen(trim(
$_POST[
'user_login'])))
813 $users = explode(
',',
$_POST[
'user_login']);
816 foreach($users as $user)
825 $user_ids[] = $user_id;
844 if(!count($a_user_ids))
850 if(!$this->object->members_obj->assignMembers($a_user_ids))
860 $this->ctrl->redirect($this,
"members");
872 $ilTabs->activateTab(
"grades");
874 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
880 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
883 if (
$_GET[
"ass_id"] ==
"")
886 $_GET[
"ass_id"] = $a[
"id"];
895 $options[$a[
"id"]] = $a[
"title"];
897 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
900 $si->setValue(
$_GET[
"ass_id"]);
901 $ilToolbar->addInputItem($si);
903 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
904 $ilToolbar->addFormButton($this->lng->txt(
"exc_select_ass"),
906 $ilToolbar->addSeparator();
910 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
915 'auto_complete_name' => $lng->txt(
'user'),
916 'submit_name' => $lng->txt(
'add')
920 $ilToolbar->addSpacer();
922 $ilToolbar->addButton(
923 $lng->txt(
"exc_search_users"),
924 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
''));
925 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
928 $parent_id = $tree->getParentId(
$_GET[
"ref_id"]);
931 while ($parent_id != 1 && $type !=
"crs")
933 $parent_id = $tree->getParentId($parent_id);
939 $this->ctrl->setParameterByClass(
'ilRepositorySearchGUI',
"list_obj", $parent_obj_id);
940 $this->lng->loadLanguageModule(
"exercise");
942 $ilToolbar->addButton($this->lng->txt(
"exc_crs_add_members"),
943 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'listUsers'));
948 include_once(
"./Modules/Exercise/classes/class.ilExerciseMemberTableGUI.php");
950 $tpl->setContent($exc_tab->getHTML());
966 $ilTabs->activateTab(
"grades");
981 $ilTabs->activateTab(
"grades");
985 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
987 $members = $this->
object->members_obj->getMembers();
989 if (count($members) == 0)
996 foreach ($members as $mem_id)
1000 include_once(
"./Services/User/classes/class.ilObjUser.php");
1002 $mems[$mem_id] = $name;
1008 if (
$_GET[
"part_id"] ==
"" && count($mems) > 0)
1010 $_GET[
"part_id"] = key($mems);
1014 if (count($mems) > 1)
1017 foreach ($mems as $k => $m)
1020 $m[
"lastname"].
", ".$m[
"firstname"].
" [".$m[
"login"].
"]";
1022 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1025 $si->setValue(
$_GET[
"part_id"]);
1026 $ilToolbar->addInputItem($si);
1028 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1029 $ilToolbar->addFormButton($this->lng->txt(
"exc_select_part"),
1030 "selectParticipant");
1033 if (count($mems) > 0)
1035 include_once(
"./Modules/Exercise/classes/class.ilExParticipantTableGUI.php");
1037 $this->
object,
$_GET[
"part_id"]);
1038 $tpl->setContent($part_tab->getHTML());
1053 $ilTabs->activateTab(
"grades");
1068 $ilTabs->activateTab(
"grades");
1071 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
1073 $mems = $mem_obj->getMembers();
1075 if (count($mems) > 0)
1077 $ilToolbar->addButton($lng->txt(
"exc_export_excel"),
1078 $ilCtrl->getLinkTarget($this,
"exportExcel"));
1081 include_once(
"./Modules/Exercise/classes/class.ilExGradesTableGUI.php");
1083 $this->
object, $mem_obj);
1084 $tpl->setContent($grades_tab->getHTML());
1094 if (
$_GET[
"member_id"] !=
"")
1099 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1102 else if(count(
$_POST[
"member"]) > 0)
1104 include_once(
'./Services/User/classes/class.ilObjUser.php');
1106 foreach(
$_POST[
"member"] as $member => $val)
1111 $logins = implode($logins,
",");
1113 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1118 $this->ctrl->redirect($this,
"members");
1130 foreach($this->object->members_obj->getMembers() as $member_id)
1134 (int)
$_GET[
"ass_id"], $member_id);
1140 $members[$member_id] = $tmp_obj->getFirstname() .
" " . $tmp_obj->getLastname();
1146 (int)
$_GET[
"ass_id"], $members);
1159 include_once
"./Modules/Group/classes/class.ilObjGroup.php";
1161 $all_members = array();
1162 foreach($a_result as $group)
1166 $members = $tmp_grp_obj->getGroupMemberIds();
1167 $all_members = array_merge($all_members,$members);
1170 $all_members = array_unique($all_members);
1171 foreach($all_members as $member)
1173 $result[] = array(
"id" => $member);
1182 include_once
"./classes/class.ilObjectFactory.php";
1184 foreach($a_result as $obj)
1187 $this->tpl->setCurrentBlock(
"OBJ_SELECT_ROW");
1188 $this->tpl->setVariable(
"OBJ_ROW_TITLE",$tmp_obj->getTitle());
1189 $this->tpl->setVariable(
"OBJ_ROW_ID",$tmp_obj->getRefId());
1190 $this->tpl->setVariable(
"OBJ_ROW_DESCRIPTION",$tmp_obj->getDescription());
1191 $this->tpl->parseCurrentBlock();
1195 $this->tpl->setCurrentBlock(
"OBJ_SELECT");
1196 $this->tpl->setVariable(
"OBJ_SELECT_TITLE",$this->lng->txt(
"title"));
1197 $this->tpl->setVariable(
"OBJ_SELECT_DESCRIPTION",$this->lng->txt(
"description"));
1199 $this->tpl->setVariable(
"OBJ_BTN1_VALUE",$this->lng->txt(
"select"));
1200 $this->tpl->setVariable(
"OBJ_BTN2_VALUE",$this->lng->txt(
"cancel"));
1201 $this->tpl->parseCurrentBlock();
1213 if(!count(
$_POST[
"member"]))
1219 $this->
object->sendAssignment($this->object->getId(),
1223 $ilCtrl->redirect($this,
"members");
1234 $ilTabs->activateTab(
"grades");
1236 if (!is_array(
$_POST[
"member"]) || count(
$_POST[
"member"]) == 0)
1239 $ilCtrl->redirect($this,
"members");
1243 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1245 $cgui->setFormAction($ilCtrl->getFormAction($this));
1246 $cgui->setHeaderText($lng->txt(
"exc_msg_sure_to_deassign_participant"));
1247 $cgui->setCancel($lng->txt(
"cancel"),
"members");
1248 $cgui->setConfirm($lng->txt(
"remove"),
"deassignMembers");
1250 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1251 foreach (
$_POST[
"member"] as $k => $m)
1253 $cgui->addItem(
"member[$k]", $m,
1257 $tpl->setContent($cgui->getHTML());
1270 if(is_array(
$_POST[
"member"]))
1274 $this->
object->members_obj->deassignMember((
int)
$usr_id);
1277 $ilCtrl->redirect($this,
"members");
1282 $ilCtrl->redirect($this,
"members");
1290 if(!isset(
$_POST[
'comments_value']))
1295 $this->
object->members_obj->setNoticeForMember(
$_GET[
"member_id"],
1320 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
1324 $saved_for = array();
1326 foreach(
$_POST[
"id"] as $key => $value)
1330 if (count(
$_POST[
"member"]) > 0 &&
$_POST[
"member"][$key] !=
"1")
1336 if (count(
$_POST[
"member"]) > 0)
1339 $saved_for[] = $uname[
"lastname"].
", ".$uname[
"firstname"];
1345 $ass_id = (int)
$_GET[
"ass_id"];
1346 $user_id = (int) $key;
1350 $ass_id = (int) $key;
1351 $user_id = (int)
$_GET[
"part_id"];
1370 if (count($saved_for) > 0)
1372 $save_for_str =
"(".implode($saved_for,
" - ").
")";
1377 $ilCtrl->redirect($this,
"members");
1381 $ilCtrl->redirect($this,
"showParticipant");
1390 for($i=0; $i<24; $i++)
1392 $hours[$i] = $i < 10 ?
"0".$i : $i;
1397 for($i=0;$i<60;$i++)
1399 $minutes[$i] = $i < 10 ?
"0".$i : $i;
1404 for($i=1; $i<32; $i++)
1406 $days[$i] = $i < 10 ?
"0".$i : $i;
1411 for($i=1; $i<13; $i++)
1413 $month[$i] = $i < 10 ?
"0".$i : $i;
1418 for($i = date(
"Y",time());$i < date(
"Y",time()) + 3;++$i)
1428 foreach($a_result as $user)
1430 if(!$this->object->members_obj->isAssigned($user[
"id"]))
1432 $filtered[] = $user;
1436 return $filtered ? $filtered : array();
1448 $ilTabs->addSubTab(
"assignment", $lng->txt(
"exc_assignment_view"),
1449 $ilCtrl->getLinkTarget($this,
"members"));
1450 $ilTabs->addSubTab(
"participant", $lng->txt(
"exc_participant_view"),
1451 $ilCtrl->getLinkTarget($this,
"showParticipant"));
1452 $ilTabs->addSubTab(
"grades", $lng->txt(
"exc_grades_overview"),
1453 $ilCtrl->getLinkTarget($this,
"showGradesOverview"));
1454 $ilTabs->activateSubTab($a_activate);
1466 $ilTabs->addSubTab(
"content", $lng->txt(
"view"),
1467 $ilCtrl->getLinkTarget($this,
"showOverview"));
1468 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
1470 $ilTabs->addSubTab(
"list_assignments", $lng->txt(
"edit"),
1471 $ilCtrl->getLinkTarget($this,
"listAssignments"));
1473 $ilTabs->activateSubTab($a_activate);
1484 global $ilAccess, $ilUser,
$lng;
1486 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
1488 $tabs_gui->addTab(
"content",
1489 $lng->txt(
"exc_assignments"),
1490 $this->ctrl->getLinkTarget($this,
"showOverview"));
1493 $next_class = strtolower($this->ctrl->getNextClass());
1494 if ($ilAccess->checkAccess(
"visible",
"", $this->object->getRefId()))
1496 $tabs_gui->addTab(
"info",
1497 $lng->txt(
"info_short"),
1498 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
1502 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
1508 $tabs_gui->addTab(
"settings",
1509 $lng->txt(
"settings"),
1510 $this->ctrl->getLinkTarget($this,
'edit'));
1512 $tabs_gui->addTab(
"grades",
1513 $lng->txt(
"exc_submissions_and_grades"),
1514 $this->ctrl->getLinkTarget($this,
'members'));
1518 $save_sort_order =
$_GET[
"sort_order"];
1519 $save_sort_by =
$_GET[
"sort_by"];
1520 $save_offset =
$_GET[
"offset"];
1523 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
1526 $tabs_gui->addTab(
'learning_progress',
1527 $lng->txt(
'learning_progress'),
1528 $this->ctrl->getLinkTargetByClass(array(
'ilobjexercisegui',
'illearningprogressgui'),
''));
1531 $_GET[
"sort_order"] = $save_sort_order;
1532 $_GET[
"sort_by"] = $save_sort_by;
1533 $_GET[
"offset"] = $save_offset;
1536 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1538 $tabs_gui->addTab(
"export",
1539 $lng->txt(
"export"),
1540 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
1545 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->ref_id))
1547 $tabs_gui->addTab(
'permissions',
1548 $lng->txt(
"perm_settings"),
1549 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"));
1560 $this->ctrl->setCmd(
"showSummary");
1561 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1570 global $ilAccess, $ilUser, $ilTabs,
$lng;
1572 $ilTabs->activateTab(
"info");
1576 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1579 $info->enablePrivateNotes();
1581 $info->enableNews();
1582 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1584 $info->enableNewsEditing();
1585 $info->setBlockProperty(
"news",
"settings",
true);
1592 $info->addSection($this->lng->txt(
"exc_overview"));
1593 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
1597 foreach ($ass as $a)
1600 if ($a[
"mandatory"])
1605 $info->addProperty($lng->txt(
"exc_assignments"), $cnt);
1606 $info->addProperty($lng->txt(
"exc_mandatory"), $mcnt);
1607 if ($this->object->getPassMode() !=
"nr")
1609 $info->addProperty($lng->txt(
"exc_pass_mode"),
1610 $lng->txt(
"exc_msg_all_mandatory_ass"));
1614 $info->addProperty($lng->txt(
"exc_pass_mode"),
1615 sprintf($lng->txt(
"exc_msg_min_number_ass"), $this->
object->getPassNr()));
1619 include_once(
"Services/Tracking/classes/class.ilLPMarks.php");
1620 if ($ilAccess->checkAccess(
"read",
"", $this->ref_id))
1625 $st = $this->
object->determinStatusOfUser($ilUser->getId());
1626 $status = $st[
"overall_status"];
1627 if ($lpcomment !=
"" || $mark !=
"" || $status !=
"notgraded")
1629 $info->addSection($this->lng->txt(
"exc_feedback_from_tutor"));
1630 if ($lpcomment !=
"")
1632 $info->addProperty($this->lng->txt(
"exc_comment"),
1637 $info->addProperty($this->lng->txt(
"exc_mark"),
1647 if ($status !=
"notgraded")
1649 $img =
'<img border="0" src="'.ilUtil::getImagePath(
"scorm/".$status.
".gif").
'" '.
1650 ' alt="'.$lng->txt(
"exc_".$status).
'" title="'.$lng->txt(
"exc_".$status).
1651 '" style="vertical-align:middle;"/>';
1654 if ($st[
"failed_a_mandatory"])
1656 $add =
" (".$lng->txt(
"exc_msg_failed_mandatory").
")";
1658 else if ($status ==
"failed")
1660 $add =
" (".$lng->txt(
"exc_msg_missed_minimum_number").
")";
1662 $info->addProperty($this->lng->txt(
"status"),
1663 $img.
" ".$this->lng->txt(
"exc_".$status).$add);
1669 $this->ctrl->forwardCommand($info);
1675 $this->tabs_gui->activateSubTab(
"edit");
1681 $this->tabs_gui->addSubTab(
"edit",
1682 $this->lng->txt(
"general_settings"),
1683 $this->ctrl->getLinkTarget($this,
"edit"));
1685 include_once
'./Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
1688 $this->tabs_gui->addSubTab(
"certificate",
1689 $this->lng->txt(
"certificate"),
1690 $this->ctrl->getLinkTarget($this,
"certificate"));
1703 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1705 $_GET[
"ref_id"] = $a_target;
1706 $_GET[
"cmd"] =
"showOverview";
1707 $_GET[
"baseClass"] =
"ilExerciseHandlerGUI";
1708 include(
"ilias.php");
1711 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
1713 $_GET[
"ref_id"] = $a_target;
1714 $_GET[
"cmd"] =
"infoScreen";
1715 $_GET[
"baseClass"] =
"ilExerciseHandlerGUI";
1716 include(
"ilias.php");
1719 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1721 $_GET[
"cmd"] =
"frameset";
1722 $_GET[
"target"] =
"";
1723 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
1726 include(
"repository.php");
1730 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
1740 if (is_object($this->
object))
1742 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
1759 $ilTabs->activateTab(
"content");
1762 $ilToolbar->addButton($lng->txt(
"exc_add_assignment"),
1763 $ilCtrl->getLinkTarget($this,
"addAssignment"));
1765 include_once(
"./Modules/Exercise/classes/class.ilAssignmentsTableGUI.php");
1767 $tpl->setContent(
$t->getHTML());
1775 global
$tpl, $ilTabs;
1779 $ilTabs->activateTab(
"content");
1783 $tpl->setContent($this->form->getHTML());
1796 $lng->loadLanguageModule(
"form");
1797 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1799 $this->form->setTableWidth(
"600px");
1800 if ($a_mode ==
"edit")
1802 $this->form->setTitle($lng->txt(
"exc_edit_assignment"));
1806 $this->form->setTitle($lng->txt(
"exc_new_assignment"));
1808 $this->form->setFormAction($ilCtrl->getFormAction($this));
1811 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
1813 if(!$ilSetting->get(
'disable_wsp_blogs'))
1817 if($ilSetting->get(
'user_portfolios'))
1821 if(
sizeof($types) > 1)
1825 $ty->setRequired(
true);
1832 $this->form->addItem($ty);
1837 $ti->setRequired(
true);
1838 $this->form->addItem($ti);
1842 $this->form->addItem($cb);
1846 $edit_date->setShowTime(
true);
1847 $cb->addSubItem($edit_date);
1852 $edit_date->setRequired(
true);
1853 $this->form->addItem($edit_date);
1857 $cb->
setInfo($this->lng->txt(
"exc_mandatory_info"));
1858 $cb->setChecked(
true);
1859 $this->form->addItem($cb);
1864 $this->form->addItem($desc_input);
1867 if ($a_mode ==
"create")
1870 $files->setFilenames(array(0 =>
''));
1871 $this->form->addItem(
$files);
1875 if ($a_mode ==
"create")
1877 $this->form->addCommandButton(
"saveAssignment", $lng->txt(
"save"));
1878 $this->form->addCommandButton(
"listAssignments", $lng->txt(
"cancel"));
1882 $this->form->addCommandButton(
"updateAssignment", $lng->txt(
"save"));
1883 $this->form->addCommandButton(
"listAssignments", $lng->txt(
"cancel"));
1897 $ilTabs->activateTab(
"content");
1901 if ($this->form->checkInput())
1903 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
1906 if (
$_POST[
"start_time_cb"])
1910 $this->form->getItemByPostVar(
"start_time")->getDate();
1912 $this->form->getItemByPostVar(
"deadline")->getDate();
1917 $this->form->getItemByPostVar(
"start_time")
1918 ->setAlert($lng->txt(
"exc_start_date_should_be_before_end_date"));
1919 $this->form->getItemByPostVar(
"deadline")
1920 ->setAlert($lng->txt(
"exc_start_date_should_be_before_end_date"));
1921 $this->form->setValuesByPost();
1922 $tpl->setContent($this->form->getHtml());
1928 $ass->setTitle(
$_POST[
"title"]);
1929 $ass->setInstruction(
$_POST[
"instruction"]);
1930 $ass->setExerciseId($this->object->getId());
1931 $ass->setMandatory(
$_POST[
"mandatory"]);
1932 $ass->setType(
$_POST[
"type"]);
1934 if (
$_POST[
"start_time_cb"])
1937 $this->form->getItemByPostVar(
"start_time")->getDate();
1942 $ass->setStartTime(null);
1947 $this->form->getItemByPostVar(
"deadline")->getDate();
1953 $ass->uploadAssignmentFiles($_FILES[
"files"]);
1957 $ilCtrl->redirect($this,
"listAssignments");
1961 $this->form->setValuesByPost();
1962 $tpl->setContent($this->form->getHtml());
1976 $ilTabs->activateTab(
"ass_settings");
1980 $tpl->setContent($this->form->getHTML());
1992 $values[
"title"] = $ass->getTitle();
1993 if ($ass->getStartTime() > 0)
1995 $values[
"start_time_cb"] =
true;
1997 $values[
"mandatory"] = $ass->getMandatory();
1998 $values[
"instruction"] = $ass->getInstruction();
1999 $values[
"type"] = $ass->getType();
2001 $this->form->setValuesByArray($values);
2004 $ed_item = $this->form->getItemByPostVar(
"deadline");
2005 $ed_item->
setDate($edit_date);
2007 if ($ass->getStartTime() > 0)
2010 $ed_item = $this->form->getItemByPostVar(
"start_time");
2011 $ed_item->
setDate($edit_date);
2017 $this->form->getItemByPostVar(
"type")->setDisabled(
true);
2032 $ilTabs->activateTab(
"content");
2036 if ($this->form->checkInput())
2038 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
2041 if (
$_POST[
"start_time_cb"])
2045 $this->form->getItemByPostVar(
"start_time")->getDate();
2047 $this->form->getItemByPostVar(
"deadline")->getDate();
2052 $this->form->getItemByPostVar(
"start_time")
2053 ->setAlert($lng->txt(
"exc_start_date_should_be_before_end_date"));
2054 $this->form->getItemByPostVar(
"deadline")
2055 ->setAlert($lng->txt(
"exc_start_date_should_be_before_end_date"));
2056 $this->form->setValuesByPost();
2057 $tpl->setContent($this->form->getHtml());
2064 $ass->setTitle(
$_POST[
"title"]);
2065 $ass->setInstruction(
$_POST[
"instruction"]);
2066 $ass->setExerciseId($this->object->getId());
2067 $ass->setMandatory(
$_POST[
"mandatory"]);
2068 $ass->setType(
$_POST[
"type"]);
2070 if (
$_POST[
"start_time_cb"])
2073 $this->form->getItemByPostVar(
"start_time")->getDate();
2078 $ass->setStartTime(null);
2083 $this->form->getItemByPostVar(
"deadline")->getDate();
2088 $ilCtrl->redirect($this,
"listAssignments");
2092 $this->form->setValuesByPost();
2093 $tpl->setContent($this->form->getHtml());
2107 $ilTabs->activateTab(
"content");
2110 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
2113 $ilCtrl->redirect($this,
"listAssignments");
2117 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2119 $cgui->setFormAction($ilCtrl->getFormAction($this));
2120 $cgui->setHeaderText($lng->txt(
"exc_conf_del_assignments"));
2121 $cgui->setCancel($lng->txt(
"cancel"),
"listAssignments");
2122 $cgui->setConfirm($lng->txt(
"delete"),
"deleteAssignments");
2124 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
2126 foreach (
$_POST[
"id"] as $i)
2131 $tpl->setContent($cgui->getHTML());
2145 if (is_array(
$_POST[
"id"]))
2147 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
2148 foreach(
$_POST[
"id"] as $id)
2160 $ilCtrl->redirect($this,
"listAssignments");
2172 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
2176 $ilCtrl->redirect($this,
"listAssignments");
2188 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
2192 $ilCtrl->redirect($this,
"listAssignments");
2202 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
2204 $tpl->setDescription(
"");
2206 $ilTabs->clearTargets();
2208 $ilTabs->setBackTarget($lng->txt(
"back"),
2209 $ilCtrl->getLinkTarget($this,
"listAssignments"));
2211 $ilTabs->addTab(
"ass_settings",
2212 $lng->txt(
"settings"),
2213 $ilCtrl->getLinkTarget($this,
"editAssignment"));
2215 $ilTabs->addTab(
"ass_files",
2217 $ilCtrl->getLinkTargetByClass(
"ilfilesystemgui",
"listFiles"));
2231 global
$tpl, $ilTabs, $ilUser, $ilToolbar;
2235 include_once(
"./Services/Tracking/classes/class.ilLearningProgress.php");
2237 $this->
object->getRefId(),
'exc');
2239 $ilTabs->activateTab(
"content");
2243 if($this->object->hasUserCertificate($ilUser->getId()))
2245 include_once
"./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
2246 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
2250 $ilToolbar->addButton($this->lng->txt(
"certificate"),
2251 $this->ctrl->getLinkTarget($this,
"outCertificate"));
2255 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
2256 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
2258 $acc->setBehaviour(
"OneOpenSession");
2259 $acc->setId(
"exc_ow_".$this->object->getId());
2261 include_once(
"./Modules/Exercise/classes/class.ilExAssignmentGUI.php");
2264 foreach ($ass_data as $ass)
2266 $acc->addItem($ass_gui->getOverviewHeader($ass),
2267 $ass_gui->getOverviewBody($ass));
2270 $tpl->setContent($acc->getHTML());
2278 global
$tpl, $ilTabs;
2282 $ilTabs->activateTab(
"content");
2285 include_once(
"./Modules/Exercise/classes/class.ilPublicSubmissionsTableGUI.php");
2287 $this->
object, (
int)
$_GET[
"ass_id"]);
2288 $tpl->setContent(
$tab->getHTML());
2297 $this->
object->exportGradesExcel();
2309 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
2311 if (is_array(
$_POST[
"lcomment"]))
2313 foreach (
$_POST[
"lcomment"] as $k => $v)
2315 $marks_obj =
new ilLPMarks($this->object->getId(), (int) $k);
2318 $marks_obj->update();
2322 $ilCtrl->redirect($this,
"showGradesOverview");
2331 include_once
"./Services/Notification/classes/class.ilNotification.php";
2334 include_once
"./Modules/Exercise/classes/class.ilExerciseMailNotification.php";
2337 $not->setAssignmentId($assignment_id);
2338 $not->setRefId($this->ref_id);
2339 $not->setRecipients($users);
2351 $this->tabs_gui->setTabActive(
"content");
2354 if (mktime() > $this->ass->getDeadline())
2359 $tpl =
new ilTemplate(
"tpl.exc_select_resource.html",
true,
true,
"Modules/Exercise");
2360 $tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"exc_create_blog").
": ".$this->ass->getTitle());
2362 $tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2363 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
2364 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2365 $tpl->setVariable(
"CMD_SUBMIT",
"saveBlog");
2366 $tpl->setVariable(
"CMD_CANCEL",
"showOverview");
2370 $this->tpl->setContent(
$tpl->get());
2381 $this->tabs_gui->setTabActive(
"content");
2384 if (mktime() > $this->ass->getDeadline())
2389 $tpl =
new ilTemplate(
"tpl.exc_select_resource.html",
true,
true,
"Modules/Exercise");
2390 $tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"exc_select_blog").
": ".$this->ass->getTitle());
2392 $tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2393 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
2394 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2395 $tpl->setVariable(
"CMD_SUBMIT",
"setSelectedBlog");
2396 $tpl->setVariable(
"CMD_CANCEL",
"showOverview");
2400 $this->tpl->setContent(
$tpl->get());
2413 $parent_node =
$_POST[
"node"];
2415 include_once
"Modules/Blog/classes/class.ilObjBlog.php";
2416 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
2417 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
2420 $blog->setTitle($this->object->getTitle().
" - ".$this->ass->getTitle());
2425 $node_id =
$tree->insertObject($parent_node, $blog->getId());
2428 $access_handler->setPermissions($parent_node, $node_id);
2430 $this->
object->addResourceObject($node_id, $this->ass->getId(), $ilUser->getId());
2433 $this->ctrl->redirect($this,
"showOverview");
2442 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
2445 if($node && $node[
"type"] ==
"blog")
2448 $this->
object->addResourceObject($node[
"wsp_id"], $this->ass->getId(), $ilUser->getId());
2451 $this->ctrl->setParameter($this,
"blog_id", $node[
"wsp_id"]);
2452 $this->ctrl->redirect($this,
"askDirectionSubmission");
2471 foreach($submitted as $item)
2473 $files[] = $item[
"returned_id"];
2483 $this->tabs_gui->setTabActive(
"content");
2486 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
2492 $this->ctrl->setParameter($this,
"blog_id",
$_REQUEST[
"blog_id"]);
2493 $txt = $this->lng->txt(
"exc_direct_submit_blog");
2497 $this->ctrl->setParameter($this,
"prtf_id",
$_REQUEST[
"prtf_id"]);
2498 $txt = $this->lng->txt(
"exc_direct_submit_portfolio");
2500 $conf->setFormAction($this->ctrl->getFormAction($this,
"directSubmit"));
2502 $conf->setHeaderText($txt);
2503 $conf->setConfirm($this->lng->txt(
"submit"),
"directSubmit");
2504 $conf->setCancel($this->lng->txt(
"cancel"),
"showOverview");
2506 $tpl->setContent($conf->getHTML());
2519 $this->ctrl->setParameter($this,
"blog_id",
"");
2525 $this->ctrl->setParameter($this,
"prtf_id",
"");
2536 $this->ctrl->redirect($this,
"showOverview");
2549 if($this->
object && $this->ass)
2551 $blog_id = $a_blog_id;
2553 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
2555 if($blog_gui->object)
2557 $file = $blog_gui->buildExportFile();
2565 "tmp_name" =>
$file,
2568 $this->
object->deliverFile($meta, $this->ass->getId(), $ilUser->getId(),
true);
2571 $this->
object->handleSubmission($this->ass->getId());
2589 if($this->
object && $this->ass)
2591 $prtf_id = $a_portfolio_id;
2593 include_once
"Services/Portfolio/classes/class.ilObjPortfolio.php";
2595 if($prtf->getTitle())
2597 include_once
"Services/Portfolio/classes/class.ilPortfolioHTMLExport.php";
2599 $file = $export->buildExportFile();
2607 "tmp_name" =>
$file,
2610 $this->
object->deliverFile($meta, $this->ass->getId(), $ilUser->getId(),
true);
2613 $this->
object->handleSubmission($this->ass->getId());
2629 $this->tabs_gui->setTabActive(
"content");
2632 if (mktime() > $this->ass->getDeadline())
2637 $tpl =
new ilTemplate(
"tpl.exc_select_resource.html",
true,
true,
"Modules/Exercise");
2639 include_once
"Services/Portfolio/classes/class.ilObjPortfolio.php";
2643 $tpl->setCurrentBlock(
"item");
2644 foreach($portfolios as $portfolio)
2646 $tpl->setVariable(
"ITEM_ID", $portfolio[
"id"]);
2647 $tpl->setVariable(
"ITEM_TITLE", $portfolio[
"title"]);
2648 $tpl->parseCurrentBlock();
2652 $tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"exc_select_portfolio").
": ".$this->ass->getTitle());
2653 $tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2654 $tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
2655 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2656 $tpl->setVariable(
"CMD_SUBMIT",
"setSelectedPortfolio");
2657 $tpl->setVariable(
"CMD_CANCEL",
"showOverview");
2661 $this->tpl->setContent(
$tpl->get());
2670 include_once
"Services/Portfolio/classes/class.ilObjPortfolio.php";
2672 $portfolio->setTitle($this->object->getTitle().
" - ".$this->ass->getTitle());
2673 $portfolio->create();
2675 $this->
object->addResourceObject($portfolio->getId(), $this->ass->getId(), $ilUser->getId());
2678 $this->ctrl->redirect($this,
"showOverview");
2688 $this->
object->addResourceObject(
$_POST[
"item"], $this->ass->getId(), $ilUser->getId());
2691 $this->ctrl->setParameter($this,
"prtf_id",
$_POST[
"item"]);
2692 $this->ctrl->redirect($this,
"askDirectionSubmission");
2703 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
2704 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
2705 require_once
'Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php';
2710 'exc_wspexpand',
$tree, $access_handler);
2711 $exp->setTargetGet(
'wsp_id');
2713 if($a_cmd ==
"selectBlog")
2715 $exp->removeAllFormItemTypes();
2716 $exp->addFilter(
'blog');
2717 $exp->addFormItemForType(
'blog');
2720 if(
$_GET[
'exc_wspexpand'] ==
'')
2723 $expanded =
$tree->readRootId();
2727 $expanded =
$_GET[
'exc_wspexpand'];
2730 $exp->setExpandTarget($this->ctrl->getLinkTarget($this, $a_cmd));
2731 $exp->setPostVar(
'node');
2732 $exp->setExpand($expanded);
2735 return $exp->getOutput();
2741 $this->tabs_gui->activateTab(
"settings");
2742 $this->tabs_gui->activateSubTab(
"certificate");
2744 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
2745 include_once
"./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
2747 $output_gui->certificateEditor();
2754 if($this->object->hasUserCertificate($ilUser->getId()))
2760 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
2761 include_once
"./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
2763 $certificate->outCertificate(array(
"user_id" => $ilUser->getId()));