ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjExerciseGUI Class Reference

Class ilObjExerciseGUI. More...

+ Inheritance diagram for ilObjExerciseGUI:
+ Collaboration diagram for ilObjExerciseGUI:

Public Member Functions

 ilObjExerciseGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor public.
 getFiles ()
 setFiles ($a_files)
 executeCommand ()
 execute command
 viewObject ()
 list childs of current object
 downloadObject ()
 User downloads (own) submitted files.
 confirmDeleteDeliveredObject ()
 Confirm deletion of delivered files.
 deleteDeliveredObject ()
 Delete file(s) submitted by user.
 submissionScreenObject ()
 Displays a form which allows members to deliver their solutions.
 uploadFormObject ()
 Display form for single file upload.
 uploadZipFormObject ()
 Display form for zip file upload.
 initUploadForm ()
 Init upload form form.
 initZipUploadForm ()
 Init upload form form.
 deliverFileObject ()
 Upload files.
 deliverUnzipObject ()
 Upload zip file.
 downloadFeedbackFileObject ()
 Download feedback file.
 downloadFileObject ()
 Download assignment file.
 cancelEditObject ()
 uploadZipObject ()
 uploadFileObject ()
 updateMembersObject ()
 update data of members table
 downloadReturnedObject ()
 Download submitted files of user.
 downloadNewReturnedObject ()
 Download newly submitted files of user.
 addUserFromAutoCompleteObject ()
 Add user as member.
 addMembersObject ($a_user_ids=array())
 Add new partipant.
 membersObject ()
 All participants and submission of one assignment.
 selectAssignmentObject ()
 Select assignment.
 showParticipantObject ()
 Show Participant.
 selectParticipantObject ()
 Select participant.
 showGradesOverviewObject ()
 Show grades overview.
 redirectFeedbackMailObject ()
 set feedback status for member and redirect to mail screen
 downloadAllObject ()
 Download all submitted files (of all members).
 __getMembersOfObject ($a_result, $a_type)
 __showObjectSelect ($a_result, $a_type)
 sendMembersObject ()
 Send assignment per mail to participants.
 confirmDeassignMembersObject ()
 Confirm deassigning members.
 deassignMembersObject ()
 Deassign members from exercise.
 saveCommentsObject ()
 saveStatusParticipantObject ()
 Save assignment status (participant view)
 saveStatusAllObject ()
 saveStatusObject ($a_part_view=false, $a_force_all=false)
 Save status of selecte members.
 __getDateSelect ($a_type, $a_selected)
 __filterAssignedUsers ($a_result)
 addSubmissionSubTabs ($a_activate)
 adds tabs to tab gui object
 addContentSubTabs ($a_activate)
 Add subtabs of content view.
 getTabs ($tabs_gui)
 adds tabs to tab gui object
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed
 infoScreen ()
 show information screen
 editObject ()
 edit object
 addLocatorItems ()
 Add locator item.
 listAssignmentsObject ()
 List assignments.
 addAssignmentObject ()
 Create assignment.
 initAssignmentForm ($a_mode="create")
 Init assignment form.
 saveAssignmentObject ()
 Save assignment.
 editAssignmentObject ()
 Edit assignment.
 getAssignmentValues ()
 Get current values for assignment from.
 updateAssignmentObject ()
 Update assignment.
 confirmAssignmentsDeletionObject ()
 Confirm assignments deletion.
 deleteAssignmentsObject ()
 Delete assignments.
 saveAssignmentOrderObject ()
 Save assignments order.
 orderAssignmentsByDeadlineObject ()
 Order by deadline.
 setAssignmentHeader ()
 Set assignment header.
 showOverviewObject ()
 Show overview of assignments.
 listPublicSubmissionsObject ()
 List all submissions.
 exportExcelObject ()
 Export as excel.
 saveGradesObject ()
 Save grades.
 removeExistingSubmissions ()
 remove existing files/submissions for assignment
 submitBlog ($a_blog_id)
 Submit blog for assignment.
 submitPortfolio ($a_portfolio_id)
 Submit portfolio for assignment.
 certificateObject ()
 outCertificateObject ()
 submissionScreenTeamObject ()
 Displays a form which allows members to manage team uploads.
 addTeamMemberActionObject ($a_user_ids=array())
 confirmDeleteTeamObject ()
 confirmRemoveTeamMemberObject ($a_full_delete=false)
 removeTeamMemberObject ($a_full_delete=false)
 submissionScreenTeamLogObject ()
 createSingleMemberTeamObject ()
 showTeamLogObject ()
 editAssignmentTextObject (ilPropertyFormGUI $a_form=null)
 updateAssignmentTextAndReturnObject ()
 updateAssignmentTextObject ($a_return=false)
 showAssignmentTextObject ()
 listTextAssignmentWithPeerReviewObject ()
 listTextAssignmentObject ($a_show_peer_review=false)
 editPeerReviewObject ()
 updatePeerReviewObject ()
 updatePeerReviewCommentsObject ()
 updatePeerReviewTextObject ()
 downloadPeerReviewObject ()
 showPersonalPeerReviewObject ()
 showPeerReviewOverviewObject ()
 confirmResetPeerReviewObject ()
 resetPeerReviewObject ()
 downloadGlobalFeedbackFileObject ()
 initMultiFeedbackForm ($a_ass_id)
 showMultiFeedbackObject (ilPropertyFormGUI $a_form=null)
 Show multi-feedback screen.
 downloadMultiFeedbackZipObject ()
 Download multi-feedback structrue file.
 uploadMultiFeedbackObject ()
 Upload multi feedback file.
 showMultiFeedbackConfirmationTableObject ()
 Show multi feedback confirmation table.
 cancelMultiFeedbackObject ()
 Cancel Multi Feedback.
 saveMultiFeedbackObject ()
 Save multi feedback.
 saveCommentForLearnersObject ()
 Save comment for learner (asynch)
 createTeamObject ()
 createAdoptedTeamObject ()
 adoptTeamAssignmentsFormObject ()
 adoptTeamAssignmentsObject ()
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Static Public Member Functions

static _goto ($a_target, $a_raw)
 redirect script
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.

Protected Member Functions

 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Init properties form.
 getEditFormCustomValues (array &$a_values)
 Get values for properties form.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 setSettingsSubTabs ()
 handleDisabledAssignmentFields (ilExAssignment $a_ass, ilPropertyFormGUI $a_form)
 sendNotifications ($assignment_id)
 Send submission notifications.
 createBlogObject ()
 selectBlogObject ()
 saveBlogObject ()
 setSelectedBlogObject ()
 askDirectionSubmissionObject ()
 directSubmitObject ()
 selectPortfolioObject ()
 initPortfolioTemplateForm (array $a_templates)
 createPortfolioTemplateObject (ilPropertyFormGUI $a_form=null)
 setSelectedPortfolioTemplateObject ()
 createPortfolioObject ()
 setSelectedPortfolioObject ()
 renderWorkspaceExplorer ($a_cmd)
 initTeamSubmission ($a_back_cmd, $a_mandatory_team=true)
 initAssignmentTextForm (ilExAssignment $a_ass, $a_read_only=false, $a_cancel_cmd="showOverview", $a_peer_review_cmd=null, $a_peer_rating_html=null)
 canPeerReviewBeEdited ()
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 initEditForm ()
 Init object edit form.
 getEditFormValues ()
 Get values for edit form.
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput())
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 getTabs (&$tabs_gui)
 get tabs abstract method.
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
const CFORM_NEW = 1
const CFORM_IMPORT = 2
const CFORM_CLONE = 3

Detailed Description

Member Function Documentation

ilObjExerciseGUI::__filterAssignedUsers (   $a_result)

Definition at line 1780 of file class.ilObjExerciseGUI.php.

{
foreach($a_result as $user)
{
if(!$this->object->members_obj->isAssigned($user["id"]))
{
$filtered[] = $user;
}
}
return $filtered ? $filtered : array();
}
ilObjExerciseGUI::__getDateSelect (   $a_type,
  $a_selected 
)

Definition at line 1739 of file class.ilObjExerciseGUI.php.

References ilUtil\formSelect().

{
switch($a_type)
{
case "hour":
for($i=0; $i<24; $i++)
{
$hours[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,"d_hour",$hours,false,true);
case "minutes":
for($i=0;$i<60;$i++)
{
$minutes[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,"d_minutes",$minutes,false,true);
case "day":
for($i=1; $i<32; $i++)
{
$days[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,"d_day",$days,false,true);
case "month":
for($i=1; $i<13; $i++)
{
$month[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,"d_month",$month,false,true);
case "year":
for($i = date("Y",time());$i < date("Y",time()) + 3;++$i)
{
$year[$i] = $i;
}
return ilUtil::formSelect($a_selected,"d_year",$year,false,true);
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::__getMembersOfObject (   $a_result,
  $a_type 
)

Definition at line 1434 of file class.ilObjExerciseGUI.php.

References $result, and ilObjectFactory\getInstanceByRefId().

{
switch($a_type)
{
case "usr":
return $a_result;
case "grp":
include_once "./Modules/Group/classes/class.ilObjGroup.php";
$all_members = array();
foreach($a_result as $group)
{
$tmp_grp_obj = ilObjectFactory::getInstanceByRefId($group["id"]);
$members = $tmp_grp_obj->getGroupMemberIds();
$all_members = array_merge($all_members,$members);
}
// FORMAT ARRAY
$all_members = array_unique($all_members);
foreach($all_members as $member)
{
$result[] = array("id" => $member);
}
return $result;
}
return true;
}

+ Here is the call graph for this function:

ilObjExerciseGUI::__showObjectSelect (   $a_result,
  $a_type 
)

Definition at line 1463 of file class.ilObjExerciseGUI.php.

References ilObjectFactory\getInstanceByRefId().

{
include_once "./Services/Object/classes/class.ilObjectFactory.php";
foreach($a_result as $obj)
{
$tmp_obj =& ilObjectFactory::getInstanceByRefId($obj["id"]);
$this->tpl->setCurrentBlock("OBJ_SELECT_ROW");
$this->tpl->setVariable("OBJ_ROW_TITLE",$tmp_obj->getTitle());
$this->tpl->setVariable("OBJ_ROW_ID",$tmp_obj->getRefId());
$this->tpl->setVariable("OBJ_ROW_DESCRIPTION",$tmp_obj->getDescription());
$this->tpl->parseCurrentBlock();
unset($tmp_obj);
}
$this->tpl->setCurrentBlock("OBJ_SELECT");
$this->tpl->setVariable("OBJ_SELECT_TITLE",$this->lng->txt("title"));
$this->tpl->setVariable("OBJ_SELECT_DESCRIPTION",$this->lng->txt("description"));
$this->tpl->setVariable("OBJ_BTN1_VALUE",$this->lng->txt("select"));
$this->tpl->setVariable("OBJ_BTN2_VALUE",$this->lng->txt("cancel"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

static ilObjExerciseGUI::_goto (   $a_target,
  $a_raw 
)
static

redirect script

Parameters
string$a_target

Definition at line 2055 of file class.ilObjExerciseGUI.php.

References $_GET, $ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

{
global $ilErr, $lng, $ilAccess;
$ass_id = null;
$parts = explode("_", $a_raw);
if(sizeof($parts) == 2)
{
$ass_id = (int)$parts[1];
}
if ($ilAccess->checkAccess("read", "", $a_target))
{
if($ass_id)
{
$_GET["ass_id_goto"] = $ass_id;
}
$_GET["ref_id"] = $a_target;
$_GET["cmd"] = "showOverview";
$_GET["baseClass"] = "ilExerciseHandlerGUI";
include("ilias.php");
}
else if ($ilAccess->checkAccess("visible", "", $a_target))
{
$_GET["ref_id"] = $a_target;
$_GET["cmd"] = "infoScreen";
$_GET["baseClass"] = "ilExerciseHandlerGUI";
include("ilias.php");
}
else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
}
$ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::addAssignmentObject ( )

Create assignment.

Definition at line 2137 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\$tpl, addContentSubTabs(), ilObjectGUI\checkPermission(), and initAssignmentForm().

{
global $tpl, $ilTabs;
$this->checkPermission("write");
$ilTabs->activateTab("content");
$this->addContentSubTabs("list_assignments");
$this->initAssignmentForm("create");
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::addContentSubTabs (   $a_activate)

Add subtabs of content view.

Parameters
object$tabs_guiilTabsGUI object

Definition at line 1816 of file class.ilObjExerciseGUI.php.

References $ilCtrl, and ilObjectGUI\$lng.

Referenced by addAssignmentObject(), adoptTeamAssignmentsFormObject(), askDirectionSubmissionObject(), confirmAssignmentsDeletionObject(), createBlogObject(), createTeamObject(), listAssignmentsObject(), listPublicSubmissionsObject(), saveAssignmentObject(), showOverviewObject(), and updateAssignmentObject().

{
global $ilTabs, $lng, $ilCtrl, $ilAccess;
$ilTabs->addSubTab("content", $lng->txt("view"),
$ilCtrl->getLinkTarget($this, "showOverview"));
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
$ilTabs->addSubTab("list_assignments", $lng->txt("edit"),
$ilCtrl->getLinkTarget($this, "listAssignments"));
}
$ilTabs->activateSubTab($a_activate);
}

+ Here is the caller graph for this function:

ilObjExerciseGUI::addLocatorItems ( )

Add locator item.

Reimplemented from ilObjectGUI.

Definition at line 2099 of file class.ilObjExerciseGUI.php.

References $_GET.

{
global $ilLocator;
if (is_object($this->object))
{
// #17955
$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "showOverview"), "", $_GET["ref_id"]);
}
}
ilObjExerciseGUI::addMembersObject (   $a_user_ids = array())

Add new partipant.

Definition at line 1084 of file class.ilObjExerciseGUI.php.

References $ilErr, ilObjectGUI\checkPermission(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

Referenced by addUserFromAutoCompleteObject().

{
global $ilAccess,$ilErr;
$this->checkPermission("write");
if(!count($a_user_ids))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"));
return false;
}
if(!$this->object->members_obj->assignMembers($a_user_ids))
{
ilUtil::sendFailure($this->lng->txt("exc_members_already_assigned"));
return false;
}
else
{
/* #16921
// #9946 - create team for new user(s) for each team upload assignment
foreach(ilExAssignment::getAssignmentDataOfExercise($this->object->getId()) as $ass)
{
if($ass["type"] == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$ass_obj = new ilExAssignment($ass["id"]);
foreach($a_user_ids as $user_id)
{
$ass_obj->getTeamId($user_id, true);
}
}
}
*/
ilUtil::sendSuccess($this->lng->txt("exc_members_assigned"),true);
}
$this->ctrl->redirect($this, "members");
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::addSubmissionSubTabs (   $a_activate)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Definition at line 1798 of file class.ilObjExerciseGUI.php.

References $ilCtrl, and ilObjectGUI\$lng.

Referenced by membersObject(), showGradesOverviewObject(), showMultiFeedbackConfirmationTableObject(), showMultiFeedbackObject(), showParticipantObject(), and showTeamLogObject().

{
global $ilTabs, $lng, $ilCtrl;
$ilTabs->addSubTab("assignment", $lng->txt("exc_assignment_view"),
$ilCtrl->getLinkTarget($this, "members"));
$ilTabs->addSubTab("participant", $lng->txt("exc_participant_view"),
$ilCtrl->getLinkTarget($this, "showParticipant"));
$ilTabs->addSubTab("grades", $lng->txt("exc_grades_overview"),
$ilCtrl->getLinkTarget($this, "showGradesOverview"));
$ilTabs->activateSubTab($a_activate);
}

+ Here is the caller graph for this function:

ilObjExerciseGUI::addTeamMemberActionObject (   $a_user_ids = array())

Definition at line 3701 of file class.ilObjExerciseGUI.php.

References $ilUser, ilExerciseMembers\_writeReturned(), ilObjectGUI\checkPermission(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilExAssignment\updateStatusReturnedForUser().

Referenced by addUserFromAutoCompleteObject().

{
global $ilUser;
$this->checkPermission("read");
if(!count($a_user_ids))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"));
return false;
}
$team_id = $this->ass->getTeamId($ilUser->getId());
$has_files = $this->ass->getDeliveredFiles($this->object->getId(),
$this->ass->getId(),
$ilUser->getId());
$all_members = $this->ass->getMembersOfAllTeams();
$members = $this->ass->getTeamMembers($team_id);
foreach($a_user_ids as $user_id)
{
if(!in_array($user_id, $all_members))
{
$this->ass->addTeamMember($team_id, $user_id, $this->ref_id);
// #14277
if (!$this->object->members_obj->isAssigned($user_id))
{
$this->object->members_obj->assignMember($user_id);
}
// see ilObjExercise::deliverFile()
if($has_files)
{
ilExAssignment::updateStatusReturnedForUser($this->ass->getId(), $user_id, 1);
ilExerciseMembers::_writeReturned($this->object->getId(), $user_id, 1);
}
// :TODO: log, notification
}
else if(!in_array($user_id, $members))
{
ilUtil::sendFailure($this->lng->txt("exc_members_already_assigned"), true);
}
}
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
$this->ctrl->redirect($this, "submissionScreenTeam");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::addUserFromAutoCompleteObject ( )

Add user as member.

Definition at line 1035 of file class.ilObjExerciseGUI.php.

References $_POST, $_REQUEST, ilObjUser\_lookupId(), addMembersObject(), addTeamMemberActionObject(), membersObject(), ilUtil\sendFailure(), and submissionScreenTeamObject().

{
if(!strlen(trim($_POST['user_login'])))
{
ilUtil::sendFailure($this->lng->txt('msg_no_search_string'));
$this->membersObject();
return false;
}
$users = explode(',', $_POST['user_login']);
$user_ids = array();
foreach($users as $user)
{
$user_id = ilObjUser::_lookupId($user);
if(!$user_id)
{
ilUtil::sendFailure($this->lng->txt('user_not_known'));
// add team member
if($_REQUEST['ctx'])
{
return $this->submissionScreenTeamObject();
}
else
{
return $this->membersObject();
}
}
$user_ids[] = $user_id;
}
if($_REQUEST['ctx'])
{
return $this->addTeamMemberActionObject($user_ids);
}
if(!$this->addMembersObject($user_ids));
{
$this->membersObject();
return false;
}
return true;
}

+ Here is the call graph for this function:

ilObjExerciseGUI::adoptTeamAssignmentsFormObject ( )

Definition at line 4975 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $options, ilObjectGUI\$tpl, addContentSubTabs(), ilObjectGUI\checkPermission(), ilExAssignment\getAdoptableTeamAssignments(), and ilRadioGroupInputGUI\setValue().

{
global $ilCtrl, $ilTabs, $lng, $tpl;
$this->checkPermission("write");
if(!$this->ass)
{
$ilCtrl->redirect($this, "listAssignments");
}
$ilTabs->activateTab("content");
$this->addContentSubTabs("list_assignments");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setTitle($lng->txt("exc_team_assignment_adopt"));
$form->setFormAction($ilCtrl->getFormAction($this, "adoptTeamAssignments"));
$options = ilExAssignment::getAdoptableTeamAssignments($this->ass->getExerciseId());
// we must not have existing teams in assignment
if(array_key_exists($this->ass->getId(), $options))
{
$ilCtrl->redirect($this, "listAssignments");
}
$teams = new ilRadioGroupInputGUI($lng->txt("exc_assignment"), "ass_adpt");
$teams->setValue(-1);
$teams->addOption(new ilRadioOption($lng->txt("exc_team_assignment_adopt_none"), -1));
foreach($options as $id => $item)
{
$option = new ilRadioOption($item["title"], $id);
$option->setInfo($lng->txt("exc_team_assignment_adopt_teams").": ".$item["teams"]);
$teams->addOption($option);
}
$form->addItem($teams);
$form->addCommandButton("adoptTeamAssignments", $lng->txt("save"));
$form->addCommandButton("listAssignments", $lng->txt("cancel"));
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::adoptTeamAssignmentsObject ( )

Definition at line 5022 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
$this->checkPermission("write");
$src_ass_id = (int)$_POST["ass_adpt"];
if($this->ass && $src_ass_id > 0)
{
// no notifications, assignment is not ready
$this->ass->adoptTeams($src_ass_id);
ilUtil::sendSuccess($lng->txt("settings_saved"), true);
}
$ilCtrl->redirect($this, "listAssignments");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

Definition at line 771 of file class.ilObjExerciseGUI.php.

References ilObject\getRefId(), ilUtil\redirect(), and ilUtil\sendSuccess().

{
$a_new_object->saveData();
ilUtil::sendSuccess($this->lng->txt("exc_added"), true);
ilUtil::redirect("ilias.php?baseClass=ilExerciseHandlerGUI&ref_id=".$a_new_object->getRefId()."&cmd=addAssignment");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::askDirectionSubmissionObject ( )
protected

Definition at line 3236 of file class.ilObjExerciseGUI.php.

References $_REQUEST, ilObjectGUI\$tpl, $txt, and addContentSubTabs().

{
global $tpl;
$this->tabs_gui->setTabActive("content");
$this->addContentSubTabs("content");
include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
$conf = new ilConfirmationGUI();
if($_REQUEST["blog_id"])
{
$this->ctrl->setParameter($this, "blog_id", $_REQUEST["blog_id"]);
$txt = $this->lng->txt("exc_direct_submit_blog");
}
else
{
$this->ctrl->setParameter($this, "prtf_id", $_REQUEST["prtf_id"]);
$txt = $this->lng->txt("exc_direct_submit_portfolio");
}
$conf->setFormAction($this->ctrl->getFormAction($this, "directSubmit"));
$conf->setHeaderText($txt);
$conf->setConfirm($this->lng->txt("exc_direct_submit"), "directSubmit");
$conf->setCancel($this->lng->txt("cancel"), "showOverview");
$tpl->setContent($conf->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::cancelEditObject ( )

Definition at line 887 of file class.ilObjExerciseGUI.php.

{
$this->ctrl->redirect($this, "view");
}
ilObjExerciseGUI::cancelMultiFeedbackObject ( )

Cancel Multi Feedback.

Definition at line 4785 of file class.ilObjExerciseGUI.php.

References $_GET, and ilObjectGUI\checkPermission().

{
$this->checkPermission("write");
$ass = new ilExAssignment((int) $_GET["ass_id"]);
$ass->clearMultiFeedbackDirectory();
$this->ctrl->redirect($this, "members");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::canPeerReviewBeEdited ( )
protected

Definition at line 4295 of file class.ilObjExerciseGUI.php.

Referenced by editPeerReviewObject(), updatePeerReviewCommentsObject(), updatePeerReviewObject(), and updatePeerReviewTextObject().

{
// #16130
return ($this->ass &&
$this->ass->getPeerReview() &&
$this->ass->getDeadline() &&
$this->ass->getDeadline() < time() &&
(!$this->ass->getPeerReviewDeadline() ||
$this->ass->getPeerReviewDeadline() > time()));
}

+ Here is the caller graph for this function:

ilObjExerciseGUI::certificateObject ( )

Definition at line 3576 of file class.ilObjExerciseGUI.php.

References setSettingsSubTabs().

{
$this->tabs_gui->activateTab("settings");
$this->tabs_gui->activateSubTab("certificate");
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once "./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
$output_gui = new ilCertificateGUI(new ilExerciseCertificateAdapter($this->object));
$output_gui->certificateEditor();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::confirmAssignmentsDeletionObject ( )

Confirm assignments deletion.

Definition at line 2824 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, addContentSubTabs(), ilObjectGUI\checkPermission(), ilExAssignment\lookupTitle(), and ilUtil\sendInfo().

{
global $ilCtrl, $tpl, $lng, $ilTabs;
$this->checkPermission("write");
$ilTabs->activateTab("content");
$this->addContentSubTabs("list_assignments");
if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
{
ilUtil::sendInfo($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "listAssignments");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("exc_conf_del_assignments"));
$cgui->setCancel($lng->txt("cancel"), "listAssignments");
$cgui->setConfirm($lng->txt("delete"), "deleteAssignments");
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
foreach ($_POST["id"] as $i)
{
$cgui->addItem("id[]", $i, ilExAssignment::lookupTitle($i));
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::confirmDeassignMembersObject ( )

Confirm deassigning members.

Definition at line 1531 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilUserUtil\getNamePresentation(), ilExAssignment\getTeamMembersByAssignmentId(), ilUtil\sendFailure(), and ilExAssignment\TYPE_UPLOAD_TEAM.

{
global $ilCtrl, $tpl, $lng, $ilTabs;
$this->checkPermission("write");
$ilTabs->activateTab("grades");
if (!is_array($_POST["member"]) || count($_POST["member"]) == 0)
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "members");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("exc_msg_sure_to_deassign_participant"));
$cgui->setCancel($lng->txt("cancel"), "members");
$cgui->setConfirm($lng->txt("remove"), "deassignMembers");
// team upload?
if($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$members = array();
foreach(array_keys($_POST["member"]) as $user_id)
{
$tmembers = ilExAssignment::getTeamMembersByAssignmentId($this->ass->getId(), $user_id);
foreach($tmembers as $tuser_id)
{
$members[$tuser_id] = 1;
}
}
}
else
{
$members = $_POST["member"];
}
include_once("./Services/User/classes/class.ilUserUtil.php");
foreach ($members as $k => $m)
{
$cgui->addItem("member[$k]", $m,
ilUserUtil::getNamePresentation((int) $k, false, false, "", true));
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::confirmDeleteDeliveredObject ( )

Confirm deletion of delivered files.

Definition at line 362 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilExAssignment\getDeliveredFiles(), and ilUtil\sendFailure().

{
global $ilCtrl, $tpl, $lng, $ilUser;
$this->checkPermission("read");
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "submissionScreen"));
// $this->tabs_gui->setTabActive("content");
// $this->addContentSubTabs("content");
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendFailure($this->lng->txt("exercise_time_over"), true);
$ilCtrl->redirect($this, "submissionScreen");
}
if (!is_array($_POST["delivered"]) || count($_POST["delivered"]) == 0)
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$ilCtrl->redirect($this, "submissionScreen");
}
else
{
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText($lng->txt("info_delete_sure"));
$cgui->setCancel($lng->txt("cancel"), "submissionScreen");
$cgui->setConfirm($lng->txt("delete"), "deleteDelivered");
$files = ilExAssignment::getDeliveredFiles($this->object->getId(), (int) $_GET["ass_id"],
$ilUser->getId());
//var_dump($files);
foreach ($_POST["delivered"] as $i)
{
reset ($files);
$title = "";
foreach ($files as $f)
{
if ($f["returned_id"] == $i)
{
$title = $f["filetitle"];
}
}
$cgui->addItem("delivered[]", $i, $title);
}
$tpl->setContent($cgui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::confirmDeleteTeamObject ( )

Definition at line 3751 of file class.ilObjExerciseGUI.php.

References confirmRemoveTeamMemberObject().

{
}

+ Here is the call graph for this function:

ilObjExerciseGUI::confirmRemoveTeamMemberObject (   $a_full_delete = false)

Definition at line 3756 of file class.ilObjExerciseGUI.php.

References $_POST, $file, $ilUser, ilObjectGUI\$tpl, ilExAssignment\getDeliveredFiles(), ilUserUtil\getNamePresentation(), initTeamSubmission(), removeTeamMemberObject(), and ilUtil\sendFailure().

Referenced by confirmDeleteTeamObject().

{
global $ilUser, $tpl;
$team_id = $this->ass->getTeamId($ilUser->getId());
$members = $this->ass->getTeamMembers($team_id);
$ids = (bool)$a_full_delete
? $members
: $_POST["id"];
if(!sizeof($ids))
{
ilUtil::sendFailure($this->lng->txt("select_one"), true);
$this->ctrl->redirect($this, "submissionScreenTeam");
}
$team_deleted = false;
if(sizeof($members) <= sizeof($ids))
{
if(sizeof($members) == 1 && $members[0] == $ilUser->getId())
{
// direct team deletion - no confirmation
return $this->removeTeamMemberObject($a_full_delete);
}
else
{
ilUtil::sendFailure($this->lng->txt("exc_team_at_least_one"), true);
$this->ctrl->redirect($this, "submissionScreenTeam");
}
}
// #11957
$team_id = $this->initTeamSubmission("showOverview");
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setHeaderText($this->lng->txt("exc_team_member_remove_sure"));
$cgui->setCancel($this->lng->txt("cancel"), "submissionScreenTeam");
$cgui->setConfirm($this->lng->txt("remove"), "removeTeamMember");
$files = ilExAssignment::getDeliveredFiles($this->ass->getExerciseId(),
$this->ass->getId(), $ilUser->getId());
include_once "Services/User/classes/class.ilUserUtil.php";
foreach($ids as $id)
{
$details = array();
foreach ($files as $file)
{
if($file["owner_id"] == $id)
{
$details[] = $file["filetitle"];
}
}
if(sizeof($details))
{
$uname .= ": ".implode(", ", $details);
}
$cgui->addItem("id[]", $id, $uname);
}
$tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::confirmResetPeerReviewObject ( )

Definition at line 4608 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$tpl, and ilObjectGUI\checkPermission().

{
global $ilCtrl, $tpl, $ilTabs;
if(!$this->ass ||
!$this->ass->getPeerReview())
{
$ilCtrl->redirect($this, "showOverview");
}
$this->checkPermission("write");
$ilTabs->clearTargets();
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$cgui->setHeaderText(sprintf($this->lng->txt("exc_peer_review_reset_sure"), $this->ass->getTitle()));
$cgui->setCancel($this->lng->txt("cancel"), "showPeerReviewOverview");
$cgui->setConfirm($this->lng->txt("delete"), "resetPeerReview");
$tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::createAdoptedTeamObject ( )

Definition at line 4950 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\checkPermission(), and ilUtil\sendSuccess().

{
global $ilCtrl, $ilUser, $lng;
$this->checkPermission("read");
if($this->ass->getDeadline() == 0 ||
mktime() < $this->ass->getDeadline())
{
$src_ass_id = (int)$_POST["ass_adpt"];
if($src_ass_id > 0)
{
$this->ass->adoptTeams($src_ass_id, $ilUser->getId(), $this->ref_id);
}
else
{
$this->ass->getTeamId($ilUser->getId(), true);
}
ilUtil::sendSuccess($lng->txt("settings_saved"), true);
}
$ilCtrl->redirect($this, "showOverview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::createBlogObject ( )
protected

Definition at line 3099 of file class.ilObjExerciseGUI.php.

References $ilUser, ilObjectGUI\$tpl, addContentSubTabs(), ilObjectGUI\checkPermission(), renderWorkspaceExplorer(), and ilUtil\sendInfo().

Referenced by saveBlogObject().

{
global $ilUser;
$this->checkPermission("read");
// $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "showOverview"));
$this->tabs_gui->setTabActive("content");
$this->addContentSubTabs("content");
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
}
$tpl = new ilTemplate("tpl.exc_select_resource.html", true, true, "Modules/Exercise");
$tpl->setVariable("TXT_TITLE", $this->lng->txt("exc_create_blog").": ".$this->ass->getTitle());
$tpl->setVariable("TREE", $this->renderWorkspaceExplorer("createBlog"));
$tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
$tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
$tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$tpl->setVariable("CMD_SUBMIT", "saveBlog");
$tpl->setVariable("CMD_CANCEL", "showOverview");
ilUtil::sendInfo($this->lng->txt("exc_create_blog_select_info"));
$this->tpl->setContent($tpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::createPortfolioObject ( )
protected

Definition at line 3502 of file class.ilObjExerciseGUI.php.

References $ilUser, ilObjectGUI\checkPermission(), and ilUtil\sendSuccess().

Referenced by setSelectedPortfolioTemplateObject().

{
global $ilUser;
$this->checkPermission("read");
include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
$portfolio = new ilObjPortfolio();
$portfolio->setTitle($this->object->getTitle()." - ".$this->ass->getTitle());
$portfolio->create();
$this->object->addResourceObject($portfolio->getId(), $this->ass->getId(), $ilUser->getId());
ilUtil::sendSuccess($this->lng->txt("exc_portfolio_created"), true);
$this->ctrl->redirect($this, "showOverview");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::createPortfolioTemplateObject ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 3445 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\checkPermission(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), and initPortfolioTemplateForm().

Referenced by setSelectedPortfolioTemplateObject().

{
$this->checkPermission("read");
include_once "Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
if(!sizeof($templates))
{
$this->ctrl->redirect($this, "showOverview");
}
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "showOverview"));
if(!$a_form)
{
$a_form = $this->initPortfolioTemplateForm($templates);
}
$this->tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::createSingleMemberTeamObject ( )

Definition at line 3891 of file class.ilObjExerciseGUI.php.

References $_GET, $cmd, and ilUtil\sendSuccess().

{
if(isset($_GET["lmem"]))
{
$user_id = $_GET["lmem"];
$cmd = "members";
}
else
{
$user_id = $_GET["lpart"];
$cmd = "showParticipant";
}
if($user_id)
{
$this->ass->getTeamId($user_id, true);
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
}
$this->ctrl->redirect($this, $cmd);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::createTeamObject ( )

Definition at line 4870 of file class.ilObjExerciseGUI.php.

References $ilCtrl, $ilUser, ilObjectGUI\$lng, $options, ilObjectGUI\$tpl, addContentSubTabs(), ilObjectGUI\checkPermission(), ilExAssignment\getAdoptableTeamAssignments(), ilExAssignment\getAssignmentTeamMap(), ilUserUtil\getNamePresentation(), ilUtil\sendSuccess(), and ilRadioGroupInputGUI\setValue().

{
global $ilCtrl, $ilUser, $ilTabs, $lng, $tpl;
$this->checkPermission("read");
if($this->ass->getDeadline() == 0 ||
mktime() < $this->ass->getDeadline())
{
$options = ilExAssignment::getAdoptableTeamAssignments($this->ass->getExerciseId(), $this->ass->getId(), $ilUser->getId());
if(sizeof($options))
{
$ilTabs->activateTab("content");
$this->addContentSubTabs("content");
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setTitle($lng->txt("exc_team_assignment_adopt_user"));
$form->setFormAction($ilCtrl->getFormAction($this, "createAdoptedTeam"));
$teams = new ilRadioGroupInputGUI($lng->txt("exc_assignment"), "ass_adpt");
$teams->setValue(-1);
$teams->addOption(new ilRadioOption($lng->txt("exc_team_assignment_adopt_none_user"), -1));
$current_map = ilExAssignment::getAssignmentTeamMap($this->ass->getId());
include_once "Services/User/classes/class.ilUserUtil.php";
foreach($options as $id => $item)
{
$members = array();
$free = false;
foreach($item["user_team"] as $user_id)
{
$members[$user_id] = ilUserUtil::getNamePresentation($user_id);
if(array_key_exists($user_id, $current_map))
{
$members[$user_id] .= " (".$lng->txt("exc_team_assignment_adopt_already_assigned").")";
}
else
{
$free = true;
}
}
asort($members);
$members = implode("<br />", $members);
$option = new ilRadioOption($item["title"], $id);
$option->setInfo($members);
if(!$free)
{
$option->setDisabled(true);
}
$teams->addOption($option);
}
$form->addItem($teams);
$form->addCommandButton("createAdoptedTeam", $lng->txt("save"));
$form->addCommandButton("showOverview", $lng->txt("cancel"));
$tpl->setContent($form->getHTML());
return;
}
$this->ass->getTeamId($ilUser->getId(), true);
// #18046
if (!$this->object->members_obj->isAssigned($ilUser->getId()))
{
$this->object->members_obj->assignMember($ilUser->getId());
}
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
}
$ilCtrl->redirect($this, "showOverview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::deassignMembersObject ( )

Deassign members from exercise.

Definition at line 1584 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

Referenced by updateMembersObject().

{
global $ilCtrl, $lng;
$this->checkPermission("write");
if(is_array($_POST["member"]))
{
foreach(array_keys($_POST["member"]) as $usr_id)
{
$this->object->members_obj->deassignMember((int) $usr_id);
}
ilUtil::sendSuccess($lng->txt("exc_msg_participants_removed"), true);
$ilCtrl->redirect($this, "members");
}
else
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
$ilCtrl->redirect($this, "members");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::deleteAssignmentsObject ( )

Delete assignments.

Definition at line 2861 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, $ilDB, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
global $ilDB, $ilCtrl, $lng;
$this->checkPermission("write");
$delete = false;
if (is_array($_POST["id"]))
{
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
foreach($_POST["id"] as $id)
{
$ass->delete();
$delete = true;
}
}
if ($delete)
{
ilUtil::sendSuccess($lng->txt("exc_assignments_deleted"), true);
}
$ilCtrl->redirect($this, "listAssignments");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::deleteDeliveredObject ( )

Delete file(s) submitted by user.

Parameters
@return

Definition at line 422 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, $ilCtrl, $ilUser, ilObjectGUI\checkPermission(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilUser, $ilCtrl;
$this->checkPermission("read");
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendFailure($this->lng->txt("exercise_time_over"), true);
$ilCtrl->redirect($this, "submissionScreen");
}
if (count($_POST["delivered"]) && (mktime() < $this->ass->getDeadline() ||
$this->ass->getDeadline() == 0))
{
$this->object->deleteDeliveredFiles($this->object->getId(), (int) $_GET["ass_id"],
$_POST["delivered"], $ilUser->id);
$this->object->handleSubmission((int)$_GET['ass_id']);
ilUtil::sendSuccess($this->lng->txt("exc_submitted_files_deleted"), true);
}
else
{
ilUtil::sendFailure($this->lng->txt("please_select_a_delivered_file_to_delete"), true);
}
$ilCtrl->redirect($this, "submissionScreen");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::deliverFileObject ( )

Upload files.

Definition at line 578 of file class.ilObjExerciseGUI.php.

References $_GET, $file, $ilCtrl, $ilUser, ilObjectGUI\$lng, $success, ilObjectGUI\checkPermission(), ilUtil\sendFailure(), ilUtil\sendInfo(), sendNotifications(), and ilUtil\sendSuccess().

{
global $ilUser, $lng, $ilCtrl;
$this->checkPermission("read");
// #15322
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
return;
}
$success = false;
foreach ($_FILES["deliver"]["name"] as $k => $v)
{
$file = array(
"name" => $_FILES["deliver"]["name"][$k],
"type" => $_FILES["deliver"]["type"][$k],
"tmp_name" => $_FILES["deliver"]["tmp_name"][$k],
"error" => $_FILES["deliver"]["error"][$k],
"size" => $_FILES["deliver"]["size"][$k],
);
if(!$this->object->deliverFile($file, (int) $_GET["ass_id"], $ilUser->id))
{
ilUtil::sendFailure($this->lng->txt("exc_upload_error"), true);
}
else
{
$success = true;
}
}
{
ilUtil::sendSuccess($this->lng->txt("file_added"), true);
$this->sendNotifications((int)$_GET["ass_id"]);
$this->object->handleSubmission((int)$_GET['ass_id']);
}
$ilCtrl->redirect($this, "submissionScreen");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::deliverUnzipObject ( )

Upload zip file.

Definition at line 624 of file class.ilObjExerciseGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\checkPermission(), ilUtil\sendInfo(), and sendNotifications().

{
global $ilCtrl;
$this->checkPermission("read");
// #15322
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
return;
}
if (preg_match("/zip/",$_FILES["deliver"]["type"]) == 1)
{
if($this->object->processUploadedFile($_FILES["deliver"]["tmp_name"], "deliverFile", false,
(int) $_GET["ass_id"]))
{
$this->sendNotifications((int)$_GET["ass_id"]);
$this->object->handleSubmission((int)$_GET['ass_id']);
}
}
$ilCtrl->redirect($this, "submissionScreen");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::directSubmitObject ( )
protected

Definition at line 3266 of file class.ilObjExerciseGUI.php.

References $_REQUEST, $ilUser, $success, ilUtil\sendFailure(), ilUtil\sendSuccess(), submitBlog(), and submitPortfolio().

{
global $ilUser;
$success = false;
// submit current version of blog
if($_REQUEST["blog_id"])
{
$success = $this->submitBlog($_REQUEST["blog_id"]);
$this->ctrl->setParameter($this, "blog_id", "");
}
// submit current version of portfolio
else if($_REQUEST["prtf_id"])
{
$success = $this->submitPortfolio($_REQUEST["prtf_id"]);
$this->ctrl->setParameter($this, "prtf_id", "");
}
{
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
}
else
{
ilUtil::sendFailure($this->lng->txt("msg_failed"), true);
}
$this->ctrl->redirect($this, "showOverview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadAllObject ( )

Download all submitted files (of all members).

Definition at line 1407 of file class.ilObjExerciseGUI.php.

References $_GET, ilObject\_exists(), ilObjectGUI\checkPermission(), ilExAssignment\downloadAllDeliveredFiles(), exit, ilObjectFactory\getInstanceByObjId(), and ilExAssignment\updateTutorDownloadTime().

{
$this->checkPermission("write");
$members = array();
foreach($this->object->members_obj->getMembers() as $member_id)
{
// update download time
(int) $_GET["ass_id"], $member_id);
// get member object (ilObjUser)
if (ilObject::_exists($member_id))
{
$tmp_obj =& ilObjectFactory::getInstanceByObjId($member_id);
$members[$member_id] = $tmp_obj->getFirstname() . " " . $tmp_obj->getLastname();
unset($tmp_obj);
}
}
(int) $_GET["ass_id"], $members);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadFeedbackFileObject ( )

Download feedback file.

Definition at line 653 of file class.ilObjExerciseGUI.php.

References $_GET, $_REQUEST, $file, $ilUser, ilObjectGUI\checkPermission(), ilUtil\deliverFile(), exit, ilUtil\sendFailure(), and ilExAssignment\TYPE_UPLOAD_TEAM.

{
global $rbacsystem, $ilUser;
$file = $_REQUEST["file"];
// check read permission
$this->checkPermission("read");
if (!isset($file))
{
ilUtil::sendFailure($this->lng->txt("exc_select_one_file"),true);
$this->ctrl->redirect($this, "view");
}
$ass = new ilExAssignment((int) $_GET["ass_id"]);
if($ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$feedback_id = "t".$ass->getTeamId($ilUser->getId());
}
else
{
$feedback_id = $ilUser->getId();
}
// check, whether file belongs to assignment
include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
$storage = new ilFSStorageExercise($this->object->getId(), (int) $_GET["ass_id"]);
$files = $storage->getFeedbackFiles($feedback_id);
$file_exist = false;
foreach($files as $fb_file)
{
if($fb_file == $file)
{
$file_exist = true;
break;
}
}
if(!$file_exist)
{
echo "FILE DOES NOT EXIST";
}
// check whether assignment as already started
$not_started_yet = false;
if ($ass->getStartTime() > 0 && time() - $ass->getStartTime() <= 0)
{
$not_started_yet = true;
}
// deliver file
if (!$not_started_yet)
{
$p = $storage->getFeedbackFilePath($feedback_id, $file);
}
return true;
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadFileObject ( )

Download assignment file.

Definition at line 718 of file class.ilObjExerciseGUI.php.

References $_GET, $_REQUEST, $file, ilObjectGUI\checkPermission(), ilUtil\deliverFile(), exit, getFiles(), and ilUtil\sendFailure().

{
global $rbacsystem;
$file = $_REQUEST["file"];
// check read permission
$this->checkPermission("read");
if (!isset($file))
{
ilUtil::sendFailure($this->lng->txt("exc_select_one_file"),true);
$this->ctrl->redirect($this, "view");
}
// check, whether file belongs to assignment
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$files = ilExAssignment::getFiles($this->object->getId(), (int) $_GET["ass_id"]);
$file_exist = false;
foreach($files as $lfile)
{
if($lfile["name"] == $file)
{
$file_exist = true;
break;
}
}
if(!$file_exist)
{
echo "FILE DOES NOT EXIST";
}
// check whether assignment as already started
$ass = new ilExAssignment((int) $_GET["ass_id"]);
$not_started_yet = false;
if ($ass->getStartTime() > 0 && time() - $ass->getStartTime() <= 0)
{
$not_started_yet = true;
}
// deliver file
if (!$not_started_yet)
{
include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
$storage = new ilFSStorageExercise($this->object->getId(), (int) $_GET["ass_id"]);
$p = $storage->getAssignmentFilePath($file);
}
return true;
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadGlobalFeedbackFileObject ( )

Definition at line 4648 of file class.ilObjExerciseGUI.php.

References $ilCtrl, $ilUser, ilUtil\deliverFile(), ilExAssignment\FEEDBACK_DATE_DEADLINE, and ilExAssignment\getLastSubmission().

{
global $ilCtrl, $ilUser;
$needs_dl = ($this->ass->getFeedbackDate() == ilExAssignment::FEEDBACK_DATE_DEADLINE);
if(!$this->ass ||
!$this->ass->getFeedbackFile() ||
($needs_dl && !$this->ass->getDeadline()) ||
($needs_dl && $this->ass->getDeadline() > time()) ||
(!$needs_dl && !ilExAssignment::getLastSubmission($this->ass->getId(), $ilUser->getId())))
{
$ilCtrl->redirect($this, "showOverview");
}
ilUtil::deliverFile($this->ass->getFeedbackFilePath(), $this->ass->getFeedbackFile());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadMultiFeedbackZipObject ( )

Download multi-feedback structrue file.

Definition at line 4728 of file class.ilObjExerciseGUI.php.

References $_GET.

{
$ass = new ilExAssignment((int) $_GET["ass_id"]);
$ass->sendMultiFeedbackStructureFile($this->object);
}
ilObjExerciseGUI::downloadNewReturnedObject ( )

Download newly submitted files of user.

Definition at line 1002 of file class.ilObjExerciseGUI.php.

References $_GET, ilObjectGUI\checkPermission(), ilExAssignment\deliverReturnedFiles(), and exit.

{
global $ilAccess;
$peer_review_mask_filename = false;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
// ok: read access + peer review
$ass = new ilExAssignment((int) $_GET["ass_id"]);
if(!($ilAccess->checkAccess("read", "", $this->object->getRefId()) &&
$ass->hasPeerReviewAccess((int) $_GET["member_id"])))
{
$this->checkPermission("write");
}
else
{
$peer_review_mask_filename = true;
}
}
$this->object->getId(), (int) $_GET["ass_id"], (int) $_GET["member_id"],
true, $peer_review_mask_filename))
{
$this->ctrl->redirect($this, "members");
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadObject ( )

User downloads (own) submitted files.

Parameters
@return

Definition at line 337 of file class.ilObjExerciseGUI.php.

References $_GET, $_REQUEST, $ilCtrl, $ilUser, ilObjectGUI\checkPermission(), ilExAssignment\downloadSelectedFiles(), exit, and ilUtil\sendFailure().

{
global $ilUser, $ilCtrl;
$this->checkPermission("read");
if (count($_REQUEST["delivered"]))
{
if(!is_array($_REQUEST["delivered"]))
{
$_REQUEST["delivered"] = array($_REQUEST["delivered"]);
}
ilExAssignment::downloadSelectedFiles($this->object->getId(), (int) $_GET["ass_id"],
$ilUser->getId(), $_REQUEST["delivered"]);
}
else
{
ilUtil::sendFailure($this->lng->txt("please_select_a_delivered_file_to_download"), true);
$ilCtrl->redirect($this, "submissionScreen");
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadPeerReviewObject ( )

Definition at line 4454 of file class.ilObjExerciseGUI.php.

References $_GET, $file, $ilCtrl, $ilUser, ilObjectGUI\checkPermission(), and ilUtil\deliverFile().

{
global $ilCtrl, $ilUser;
if(!$this->ass ||
!$this->ass->getPeerReview() ||
!$this->ass->hasPeerReviewFileUpload() ||
!$_GET["fu"] ||
!$_GET["fuf"])
{
$ilCtrl->redirect($this, "showOverview");
}
$parts = explode("__", $_GET["fu"]);
$giver_id = $parts[0];
$peer_id = $parts[1];
if($giver_id == $ilUser->getId() ||
$peer_id == $ilUser->getId())
{
$this->checkPermission("read");
}
else
{
$this->checkPermission("write");
}
$peer_items = $this->ass->getPeerReviewsByPeerId($peer_id, true);
if(sizeof($peer_items))
{
foreach($peer_items as $item)
{
if($item["giver_id"] == $giver_id)
{
$files = $this->ass->getPeerUploadFiles($peer_id, $giver_id);
foreach($files as $file)
{
if(md5($file) == trim($_GET["fuf"]))
{
ilUtil::deliverFile($file, basename($file));
break(2);
}
}
}
}
}
$ilCtrl->redirect($this, "showOverview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::downloadReturnedObject ( )

Download submitted files of user.

Definition at line 960 of file class.ilObjExerciseGUI.php.

References $_GET, ilObjectGUI\checkPermission(), ilExAssignment\deliverReturnedFiles(), and exit.

{
global $ilAccess;
$peer_review_mask_filename = false;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
if ($ilAccess->checkAccess("read", "", $this->object->getRefId()) &&
$this->object->getShowSubmissions() &&
$this->object->getTimestamp() - time() <= 0)
{
// ok: read access + public submissions
}
else
{
// ok: read access + peer review
$ass = new ilExAssignment((int) $_GET["ass_id"]);
if(!($ilAccess->checkAccess("read", "", $this->object->getRefId()) &&
$ass->hasPeerReviewAccess((int) $_GET["member_id"])))
{
$this->checkPermission("write");
}
else
{
$peer_review_mask_filename = true;
}
}
}
$this->object->getId(), (int) $_GET["ass_id"], (int) $_GET["member_id"],
false, $peer_review_mask_filename))
{
$this->ctrl->redirect($this, "members");
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::editAssignmentObject ( )

Edit assignment.

Definition at line 2508 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), getAssignmentValues(), initAssignmentForm(), and setAssignmentHeader().

{
global $tpl, $ilTabs, $tpl;
$this->checkPermission("write");
$ilTabs->activateTab("ass_settings");
$this->initAssignmentForm("edit");
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::editAssignmentTextObject ( ilPropertyFormGUI  $a_form = null)

Definition at line 4016 of file class.ilObjExerciseGUI.php.

References $ilCtrl, $ilUser, ilRTE\_replaceMediaObjectImageSrc(), ilObjectGUI\checkPermission(), ilDatePresentation\formatDate(), ilExAssignment\getDeliveredFiles(), IL_CAL_UNIX, initAssignmentTextForm(), ilUtil\sendInfo(), and ilExAssignment\TYPE_TEXT.

Referenced by updateAssignmentTextObject().

{
global $ilTabs, $ilCtrl, $ilUser;
if(!$this->ass ||
$this->ass->getType() != ilExAssignment::TYPE_TEXT ||
($this->ass->getDeadline() && $this->ass->getDeadline() - time() < 0))
{
$ilCtrl->redirect($this, "showOverview");
}
$this->checkPermission("read");
//$ilTabs->activateTab("content");
//$this->addContentSubTabs("content");
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "showOverview"));
global $ilHelp;
$ilHelp->setScreenIdComponent("exc");
$ilHelp->setScreenId("text_submission");
if($this->ass->getDeadline())
{
ilUtil::sendInfo($this->lng->txt("exc_edit_until").": ".
ilDatePresentation::formatDate(new ilDateTime($this->ass->getDeadline(),IL_CAL_UNIX)));
}
if(!$a_form)
{
$a_form = $this->initAssignmentTextForm($this->ass);
$files = ilExAssignment::getDeliveredFiles($this->ass->getExerciseId(), $this->ass->getId(), $ilUser->getId());
if($files)
{
$files = array_shift($files);
if(trim($files["atext"]))
{
$text = $a_form->getItemByPostVar("atxt");
// mob id to mob src
$text->setValue(ilRTE::_replaceMediaObjectImageSrc($files["atext"], 1));
}
}
}
$this->tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::editObject ( )

edit object

public

Reimplemented from ilObjectGUI.

Definition at line 2028 of file class.ilObjExerciseGUI.php.

References setSettingsSubTabs().

{
$this->tabs_gui->activateSubTab("edit");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::editPeerReviewObject ( )

Definition at line 4306 of file class.ilObjExerciseGUI.php.

References $ilCtrl, $ilUser, ilObjectGUI\$tpl, canPeerReviewBeEdited(), ilObjectGUI\checkPermission(), ilDatePresentation\formatDate(), ilExAssignment\getNumberOfMissingFeedbacks(), IL_CAL_UNIX, ilUtil\sendFailure(), and ilUtil\sendInfo().

{
global $ilCtrl, $ilUser, $tpl;
if(!$this->canPeerReviewBeEdited())
{
$ilCtrl->redirect($this, "showOverview");
}
$this->checkPermission("read");
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "showOverview"));
$peer_items = $this->ass->getPeerReviewsByGiver($ilUser->getId());
if(!sizeof($peer_items))
{
ilUtil::sendFailure($this->lng->txt("exc_peer_review_no_peers"), true);
$ilCtrl->redirect($this, "showOverview");
}
$missing = ilExAssignment::getNumberOfMissingFeedbacks($this->ass->getId(), $this->ass->getPeerReviewMin());
if($missing)
{
$dl = $this->ass->getPeerReviewDeadline();
if(!$dl || $dl < time())
{
ilUtil::sendInfo(sprintf($this->lng->txt("exc_peer_review_missing_info"), $missing));
}
else
{
ilUtil::sendInfo(sprintf($this->lng->txt("exc_peer_review_missing_info_deadline"), $missing,
}
}
$tpl->addJavaScript("Modules/Exercise/js/ilExcPeerReview.js");
$tpl->addOnLoadCode("il.ExcPeerReview.setAjax('".
$ilCtrl->getLinkTarget($this, "updatePeerReviewComments", "", true, false).
"')");
include_once "Modules/Exercise/classes/class.ilExAssignmentPeerReviewTableGUI.php";
$tbl = new ilExAssignmentPeerReviewTableGUI($this, "editPeerReview", $this->ass, $ilUser->getId(), $peer_items, "exc_peer_review_give", "showOverview");
$tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 57 of file class.ilObjExerciseGUI.php.

References $_GET, $_REQUEST, $cmd, $ilCtrl, $ilUser, ilObjectGUI\$lng, $ret, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilFSStorageExercise\create(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilUserUtil\getNamePresentation(), infoScreen(), initTeamSubmission(), ilExAssignment\lookupTitle(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjectGUI\prepareOutput(), ilUtil\sendInfo(), setAssignmentHeader(), setSettingsSubTabs(), ilFileSystemGUI\setTableId(), ilFileSystemGUI\setTitle(), and ilExAssignment\TYPE_UPLOAD_TEAM.

{
global $ilUser,$ilCtrl, $ilTabs, $lng;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
//echo "-".$next_class."-".$cmd."-"; exit;
switch($next_class)
{
case "ilfilesystemgui":
if($_GET["fsmode"] == "peer")
{
$ilCtrl->saveParameter($this, array("fu"));
// see self::downloadPeerReview()
$parts = explode("__", $_GET["fu"]);
$giver_id = $parts[0];
$peer_id = $parts[1];
if($giver_id == $ilUser->getId() ||
$peer_id == $ilUser->getId())
{
$this->checkPermission("read");
}
else
{
$this->checkPermission("write");
}
/* could be 1st review and not saved yet
$valid = false;
$peer_items = $this->ass->getPeerReviewsByPeerId($peer_id, true);
if(sizeof($peer_items))
{
foreach($peer_items as $item)
{
if($item["giver_id"] == $giver_id)
{
$valid = true;
}
}
}
if(!$valid)
{
$ilCtrl->redirect($this, "editPeerReview");
}
*/
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "editPeerReview"));
include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
$fstorage = new ilFSStorageExercise($this->object->getId(), $this->ass->getId());
$fstorage->create();
include_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
$fs_gui = new ilFileSystemGUI($fstorage->getPeerReviewUploadPath($peer_id, $giver_id));
$fs_gui->setTableId("excfbpeer");
$fs_gui->setAllowDirectories(false);
$fs_gui->setTitle($this->ass->getTitle().": ".
$lng->txt("exc_peer_review")." - ".
$lng->txt("exc_peer_review_give"));
$ret = $this->ctrl->forwardCommand($fs_gui);
}
else if ($_GET["fsmode"] == "feedback" ||
$_GET["fsmode"] == "feedbackpart") // feedback files
{
$this->checkPermission("write");
$ilCtrl->saveParameter($this, array("member_id"));
//$this->setAssignmentHeader();
//$ilTabs->activateTab("ass_files");
$ilTabs->clearTargets();
if ($_GET["fsmode"] != "feedbackpart")
{
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "members"));
}
else
{
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "showParticipant"));
}
ilUtil::sendInfo($lng->txt("exc_fb_tutor_info"));
include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
$fstorage = new ilFSStorageExercise($this->object->getId(), (int) $_GET["ass_id"]);
$fstorage->create();
include_once("./Services/User/classes/class.ilUserUtil.php");
$noti_rec_ids = array();
if($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$team_id = $this->ass->getTeamId((int) $_GET["member_id"]);
$feedback_id = "t".$team_id;
$fs_title = array();
foreach($this->ass->getTeamMembers($team_id) as $team_user_id)
{
$fs_title[] = ilUserUtil::getNamePresentation($team_user_id, false, false, "", true);
$noti_rec_ids[] = $team_user_id;
}
$fs_title = implode(" / ", $fs_title);
}
else
{
$feedback_id = $noti_rec_ids = (int) $_GET["member_id"];
$fs_title = ilUserUtil::getNamePresentation((int) $_GET["member_id"], false, false, "", true);
}
include_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
$fs_gui = new ilFileSystemGUI($fstorage->getFeedbackPath($feedback_id));
$fs_gui->setTableId("excfbfil".(int)$_GET["ass_id"]."_".$feedback_id);
$fs_gui->setAllowDirectories(false);
$fs_gui->setTitle($lng->txt("exc_fb_files")." - ".
ilExAssignment::lookupTitle((int) $_GET["ass_id"])." - ".
$fs_title);
$pcommand = $fs_gui->getLastPerformedCommand();
if (is_array($pcommand) && $pcommand["cmd"] == "create_file")
{
$this->object->sendFeedbackFileNotification($pcommand["name"],
$noti_rec_ids, (int) $_GET["ass_id"]);
}
$ret = $this->ctrl->forwardCommand($fs_gui);
}
else // assignment files
{
$ilTabs->activateTab("ass_files");
include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
$fstorage = new ilFSStorageExercise($this->object->getId(), (int) $_GET["ass_id"]);
$fstorage->create();
include_once("./Services/FileSystem/classes/class.ilFileSystemGUI.php");
$fs_gui = new ilFileSystemGUI($fstorage->getPath());
$fs_gui->setTitle($lng->txt("exc_instruction_files"));
$fs_gui->setTableId("excassfil".$_GET["ass_id"]);
$fs_gui->setAllowDirectories(false);
$ret = $this->ctrl->forwardCommand($fs_gui);
}
break;
case "ilinfoscreengui":
$ilTabs->activateTab("info");
$this->infoScreen(); // forwards command
break;
case 'ilpermissiongui':
$ilTabs->activateTab("permissions");
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case "illearningprogressgui":
$ilTabs->activateTab("learning_progress");
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$this->object->getRefId(),
$_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
$this->ctrl->forwardCommand($new_gui);
$this->tabs_gui->setTabActive('learning_progress');
break;
case 'ilrepositorysearchgui':
$ilTabs->activateTab("grades");
include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
$rep_search = new ilRepositorySearchGUI();
if(!$_REQUEST["ctx"])
{
$rep_search->setTitle($this->lng->txt("exc_add_participant"));
$rep_search->setCallback($this,'addMembersObject');
// Set tabs
$this->tabs_gui->setTabActive('members');
$this->ctrl->setReturn($this,'members');
#$this->__setSubTabs('members');
#$this->tabs_gui->setSubTabActive('members');
}
else
{
$this->ctrl->saveParameterByClass('ilRepositorySearchGUI', 'ctx', 1);
$rep_search->setTitle($this->lng->txt("exc_team_member_add"));
$rep_search->setCallback($this,'addTeamMemberActionObject');
// Set tabs
$this->initTeamSubmission("submissionScreenTeam");
$this->ctrl->setReturn($this,'submissionScreenTeam');
}
$ret =& $this->ctrl->forwardCommand($rep_search);
break;
case 'ilobjectcopygui':
$ilCtrl->saveParameter($this, 'new_type');
$ilCtrl->setReturnByClass(get_class($this),'create');
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('exc');
$this->ctrl->forwardCommand($cp);
break;
case "ilexportgui":
$ilTabs->activateTab("export");
include_once("./Services/Export/classes/class.ilExportGUI.php");
$exp_gui = new ilExportGUI($this);
$exp_gui->addFormat("xml");
$ret = $this->ctrl->forwardCommand($exp_gui);
// $this->tpl->show();
break;
case 'ilshoppurchasegui':
include_once './Services/Payment/classes/class.ilShopPurchaseGUI.php';
$sp = new ilShopPurchaseGUI($_GET['ref_id']);
$this->ctrl->forwardCommand($sp);
break;
case "ilcommonactiondispatchergui":
include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
$this->ctrl->forwardCommand($gui);
break;
case "ilcertificategui":
$this->tabs_gui->activateTab("settings");
$this->tabs_gui->activateSubTab("certificate");
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once "./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
$output_gui = new ilCertificateGUI(new ilExerciseCertificateAdapter($this->object));
$this->ctrl->forwardCommand($output_gui);
break;
case "ilratinggui":
$this->ass->updatePeerReviewTimestamp((int)$_REQUEST["peer_id"]);
include_once("./Services/Rating/classes/class.ilRatingGUI.php");
$rating_gui = new ilRatingGUI();
$rating_gui->setObject($this->ass->getId(), "ass",
(int)$_REQUEST["peer_id"], "peer");
$this->ctrl->forwardCommand($rating_gui);
$ilCtrl->redirect($this, "editPeerReview");
break;
default:
$this->ctrl->setParameter($this, "fsmode", ""); // #15115
if(!$cmd)
{
$cmd = "infoScreen";
}
$cmd .= "Object";
$this->$cmd();
break;
}
$this->addHeaderAction();
return true;
}

+ Here is the call graph for this function:

ilObjExerciseGUI::exportExcelObject ( )

Export as excel.

Definition at line 3050 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\checkPermission(), and exit.

{
$this->checkPermission("write");
$this->object->exportGradesExcel();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::getAssignmentValues ( )

Get current values for assignment from.

Definition at line 2526 of file class.ilObjExerciseGUI.php.

References $_GET, handleDisabledAssignmentFields(), IL_CAL_UNIX, ilDateTime\setDate(), and ilExAssignment\TYPE_UPLOAD_TEAM.

Referenced by editAssignmentObject().

{
$values = array();
$ass = new ilExAssignment($_GET["ass_id"]);
$values["title"] = $ass->getTitle();
if ($ass->getStartTime() > 0)
{
$values["start_time_cb"] = true;
}
$values["mandatory"] = $ass->getMandatory();
$values["instruction"] = $ass->getInstruction();
$values["type"] = $ass->getType();
if ($ass->getDeadline() > 0)
{
$values["deadline_cb"] = true;
}
if($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$this->form->removeItemByPostVar("peer");
$this->form->removeItemByPostVar("peer_min");
$this->form->removeItemByPostVar("peer_dl");
}
else
{
if ($ass->getPeerReviewDeadline() > 0)
{
$values["peer_dl_tgl"] = true;
$peer_dl_date = new ilDateTime($ass->getPeerReviewDeadline(), IL_CAL_UNIX);
$peer_dl = $this->form->getItemByPostVar("peer_dl");
$peer_dl->setDate($peer_dl_date);
}
}
$this->form->setValuesByArray($values);
if ($ass->getStartTime() > 0)
{
$edit_date = new ilDateTime($ass->getStartTime(), IL_CAL_UNIX);
$ed_item = $this->form->getItemByPostVar("start_time");
$ed_item->setDate($edit_date);
}
if($ass->getFeedbackFile())
{
$this->form->getItemByPostVar("fb")->setChecked(true);
$this->form->getItemByPostVar("fb_file")->setValue(basename($ass->getFeedbackFilePath()));
}
$this->form->getItemByPostVar("fb_cron")->setChecked($ass->hasFeedbackCron());
$this->form->getItemByPostVar("fb_date")->setValue($ass->getFeedbackDate());
$this->handleDisabledAssignmentFields($ass, $this->form);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::getEditFormCustomValues ( array &  $a_values)
protected

Get values for properties form.

Reimplemented from ilObjectGUI.

Definition at line 849 of file class.ilObjExerciseGUI.php.

References $ilUser, ilNotification\hasNotification(), and ilNotification\TYPE_EXERCISE_SUBMISSION.

{
global $ilUser;
$a_values["desc"] = $this->object->getLongDescription();
$a_values["show_submissions"] = $this->object->getShowSubmissions();
$a_values["pass_mode"] = $this->object->getPassMode();
if ($a_values["pass_mode"] == "nr")
{
$a_values["pass_nr"] = $this->object->getPassNr();
}
include_once "./Services/Notification/classes/class.ilNotification.php";
$a_values["notification"] = ilNotification::hasNotification(
$this->object->getId());
$a_values['completion_by_submission'] = (int) $this->object->isCompletionBySubmissionEnabled();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::getFiles ( )

Definition at line 47 of file class.ilObjExerciseGUI.php.

Referenced by downloadFileObject().

{
return $this->files ? $this->files : array();
}

+ Here is the caller graph for this function:

ilObjExerciseGUI::getTabs (   $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Definition at line 1836 of file class.ilObjExerciseGUI.php.

References $_GET, $ilUser, ilObjectGUI\$lng, and ilLearningProgressAccess\checkAccess().

{
global $ilAccess, $ilUser, $lng, $ilHelp;
$ilHelp->setScreenIdComponent("exc");
if ($ilAccess->checkAccess("read", "", $this->object->getRefId()))
{
$tabs_gui->addTab("content",
$lng->txt("exc_assignments"),
$this->ctrl->getLinkTarget($this, "showOverview"));
}
$next_class = strtolower($this->ctrl->getNextClass());
if ($ilAccess->checkAccess("visible", "", $this->object->getRefId()))
{
$tabs_gui->addTab("info",
$lng->txt("info_short"),
$this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
}
// edit properties
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
/*$tabs_gui->addTab("assignments",
$lng->txt("exc_edit_assignments"),
$this->ctrl->getLinkTarget($this, 'listAssignments'));*/
$tabs_gui->addTab("settings",
$lng->txt("settings"),
$this->ctrl->getLinkTarget($this, 'edit'));
$tabs_gui->addTab("grades",
$lng->txt("exc_submissions_and_grades"),
$this->ctrl->getLinkTarget($this, 'members'));
}
// learning progress
$save_sort_order = $_GET["sort_order"]; // hack, because exercise sort parameters
$save_sort_by = $_GET["sort_by"]; // must not be forwarded to learning progress
$save_offset = $_GET["offset"];
$_GET["offset"] = $_GET["sort_by"] = $_GET["sort_order"] = "";
include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
if(ilLearningProgressAccess::checkAccess($this->object->getRefId()))
{
$tabs_gui->addTab('learning_progress',
$lng->txt('learning_progress'),
$this->ctrl->getLinkTargetByClass(array('ilobjexercisegui','illearningprogressgui'),''));
}
$_GET["sort_order"] = $save_sort_order; // hack, part ii
$_GET["sort_by"] = $save_sort_by;
$_GET["offset"] = $save_offset;
// export
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$tabs_gui->addTab("export",
$lng->txt("export"),
$this->ctrl->getLinkTargetByClass("ilexportgui", ""));
}
// permissions
if ($ilAccess->checkAccess("edit_permission", "", $this->ref_id))
{
$tabs_gui->addTab('permissions',
$lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"));
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::handleDisabledAssignmentFields ( ilExAssignment  $a_ass,
ilPropertyFormGUI  $a_form 
)
protected

Definition at line 2579 of file class.ilObjExerciseGUI.php.

References ilExAssignment\getAllDeliveredFiles(), ilExAssignment\getDeadline(), ilExAssignment\getId(), ilPropertyFormGUI\getItemByPostVar(), ilExAssignment\getPeerReview(), ilExAssignment\getPeerReviewMin(), ilExAssignment\getType(), ilExAssignment\hasPeerReviewFileUpload(), ilExAssignment\hasPeerReviewGroups(), ilExAssignment\hasPeerReviewPersonalized(), IL_CAL_UNIX, ilDateTime\setDate(), and ilExAssignment\TYPE_UPLOAD_TEAM.

Referenced by getAssignmentValues(), and updateAssignmentObject().

{
// potentially disabled elements are initialized here to re-use this
// method after setValuesByPost() - see updateAssignmentObject()
// if there are any submissions we cannot change type anymore
if(sizeof(ilExAssignment::getAllDeliveredFiles($this->object->getId(), $a_ass->getId())) ||
{
$a_form->getItemByPostVar("type")->setDisabled(true);
}
if($a_ass->getDeadline() > 0)
{
$a_form->getItemByPostVar("deadline_cb")->setChecked(true);
$edit_date = new ilDateTime($a_ass->getDeadline(), IL_CAL_UNIX);
$ed_item = $a_form->getItemByPostVar("deadline");
$ed_item->setDate($edit_date);
}
// team assignments do not support peer review
{
return;
}
$a_form->getItemByPostVar("peer")->setChecked($a_ass->getPeerReview());
$a_form->getItemByPostVar("peer_min")->setValue($a_ass->getPeerReviewMin());
$a_form->getItemByPostVar("peer_file")->setChecked($a_ass->hasPeerReviewFileUpload());
$a_form->getItemByPostVar("peer_prsl")->setChecked($a_ass->hasPeerReviewPersonalized());
// with no active peer review there is nothing to protect
if(!$a_ass->getPeerReview())
{
return;
}
// #14450
if($a_ass->hasPeerReviewGroups())
{
// deadline(s) are past and must not change
$a_form->getItemByPostVar("deadline_cb")->setDisabled(true);
$a_form->getItemByPostVar("deadline")->setDisabled(true);
// JourFixe, 2015-05-11 - editable again
// $a_form->getItemByPostVar("peer_dl")->setDisabled(true);
$a_form->getItemByPostVar("peer")->setDisabled(true);
$a_form->getItemByPostVar("peer_min")->setDisabled(true);
$a_form->getItemByPostVar("peer_file")->setDisabled(true);
$a_form->getItemByPostVar("peer_prsl")->setDisabled(true);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::ilObjExerciseGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor public.

Definition at line 28 of file class.ilObjExerciseGUI.php.

References $_GET, ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

{
global $lng;
$this->type = "exc";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
$lng->loadLanguageModule("exercise");
$lng->loadLanguageModule("exc");
$this->ctrl->saveParameter($this,
array("ass_id", "part_id", "fsmode"));
if ($_GET["ass_id"] > 0)
{
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$this->ass = new ilExAssignment((int) $_GET["ass_id"]);
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::infoScreen ( )

show information screen

Definition at line 1924 of file class.ilObjExerciseGUI.php.

References $_GET, $ilUser, $img, ilObjectGUI\$lng, ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilObjectGUI\checkPermission(), and ilExAssignment\getAssignmentDataOfExercise().

Referenced by executeCommand(), and infoScreenObject().

{
global $ilAccess, $ilUser, $ilTabs, $lng;
$ilTabs->activateTab("info");
$this->checkPermission("visible");
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
$info->enableNewsEditing();
$info->setBlockProperty("news", "settings", true);
}
// standard meta data
//$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
// instructions
$info->addSection($this->lng->txt("exc_overview"));
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$ass = ilExAssignment::getAssignmentDataOfExercise($this->object->getId());
$cnt = 0;
$mcnt = 0;
foreach ($ass as $a)
{
$cnt++;
if ($a["mandatory"])
{
$mcnt++;
}
}
$info->addProperty($lng->txt("exc_assignments"), $cnt);
$info->addProperty($lng->txt("exc_mandatory"), $mcnt);
if ($this->object->getPassMode() != "nr")
{
$info->addProperty($lng->txt("exc_pass_mode"),
$lng->txt("exc_msg_all_mandatory_ass"));
}
else
{
$info->addProperty($lng->txt("exc_pass_mode"),
sprintf($lng->txt("exc_msg_min_number_ass"), $this->object->getPassNr()));
}
// feedback from tutor
include_once("Services/Tracking/classes/class.ilLPMarks.php");
if ($ilAccess->checkAccess("read", "", $this->ref_id))
{
$lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
$mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
//$status = ilExerciseMembers::_lookupStatus($this->object->getId(), $ilUser->getId());
$st = $this->object->determinStatusOfUser($ilUser->getId());
$status = $st["overall_status"];
if ($lpcomment != "" || $mark != "" || $status != "notgraded")
{
$info->addSection($this->lng->txt("exc_feedback_from_tutor"));
if ($lpcomment != "")
{
$info->addProperty($this->lng->txt("exc_comment"),
$lpcomment);
}
if ($mark != "")
{
$info->addProperty($this->lng->txt("exc_mark"),
$mark);
}
//if ($status == "")
//{
// $info->addProperty($this->lng->txt("status"),
// $this->lng->txt("message_no_delivered_files"));
//}
//else
if ($status != "notgraded")
{
$img = '<img src="'.ilUtil::getImagePath("scorm/".$status.".svg").'" '.
' alt="'.$lng->txt("exc_".$status).'" title="'.$lng->txt("exc_".$status).
'" />';
$add = "";
if ($st["failed_a_mandatory"])
{
$add = " (".$lng->txt("exc_msg_failed_mandatory").")";
}
else if ($status == "failed")
{
$add = " (".$lng->txt("exc_msg_missed_minimum_number").")";
}
$info->addProperty($this->lng->txt("status"),
$img." ".$this->lng->txt("exc_".$status).$add);
}
}
}
// forward the command
$this->ctrl->forwardCommand($info);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 1914 of file class.ilObjExerciseGUI.php.

References infoScreen().

Referenced by viewObject().

{
$this->ctrl->setCmd("showSummary");
$this->ctrl->setCmdClass("ilinfoscreengui");
$this->infoScreen();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::initAssignmentForm (   $a_mode = "create")

Init assignment form.

Parameters
int$a_mode"create"/"edit"

Definition at line 2155 of file class.ilObjExerciseGUI.php.

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilExAssignment\FEEDBACK_DATE_DEADLINE, ilExAssignment\FEEDBACK_DATE_SUBMISSION, ilCheckboxInputGUI\setChecked(), ilFileWizardInputGUI\setFilenames(), ilFormPropertyGUI\setInfo(), ilTextInputGUI\setMaxLength(), ilSelectInputGUI\setOptions(), ilFormPropertyGUI\setRequired(), ilTextAreaInputGUI\setRows(), ilDateTimeInputGUI\setShowTime(), ilExAssignment\TYPE_BLOG, ilExAssignment\TYPE_PORTFOLIO, ilExAssignment\TYPE_TEXT, ilExAssignment\TYPE_UPLOAD, and ilExAssignment\TYPE_UPLOAD_TEAM.

Referenced by addAssignmentObject(), editAssignmentObject(), saveAssignmentObject(), and updateAssignmentObject().

{
// init form
$lng->loadLanguageModule("form");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setTableWidth("600px");
if ($a_mode == "edit")
{
$this->form->setTitle($lng->txt("exc_edit_assignment"));
}
else
{
$this->form->setTitle($lng->txt("exc_new_assignment"));
}
$this->form->setFormAction($ilCtrl->getFormAction($this));
// type
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$types = array(ilExAssignment::TYPE_UPLOAD => $this->lng->txt("exc_type_upload"),
ilExAssignment::TYPE_UPLOAD_TEAM => $this->lng->txt("exc_type_upload_team"),
ilExAssignment::TYPE_TEXT => $this->lng->txt("exc_type_text"));
if(!$ilSetting->get('disable_wsp_blogs'))
{
$types[ilExAssignment::TYPE_BLOG] = $this->lng->txt("exc_type_blog");
}
if($ilSetting->get('user_portfolios'))
{
$types[ilExAssignment::TYPE_PORTFOLIO] = $this->lng->txt("exc_type_portfolio");
}
if(sizeof($types) > 1)
{
$ty = new ilSelectInputGUI($this->lng->txt("exc_assignment_type"), "type");
$ty->setOptions($types);
$ty->setRequired(true);
}
else
{
$ty = new ilHiddenInputGUI("type");
$ty->setValue(ilExAssignment::TYPE_UPLOAD);
}
$this->form->addItem($ty);
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "title");
$ti->setMaxLength(200);
$ti->setRequired(true);
$this->form->addItem($ti);
// start time y/n
$cb = new ilCheckboxInputGUI($this->lng->txt("exc_start_time"), "start_time_cb");
$this->form->addItem($cb);
// start time
$edit_date = new ilDateTimeInputGUI("", "start_time");
$edit_date->setShowTime(true);
$cb->addSubItem($edit_date);
// deadline y/n
$dcb = new ilCheckboxInputGUI($this->lng->txt("exc_deadline"), "deadline_cb");
$dcb->setChecked(true);
$this->form->addItem($dcb);
// Deadline
$edit_date = new ilDateTimeInputGUI($lng->txt(""), "deadline");
$edit_date->setShowTime(true);
$dcb->addSubItem($edit_date);
// mandatory
$cb = new ilCheckboxInputGUI($this->lng->txt("exc_mandatory"), "mandatory");
$cb->setInfo($this->lng->txt("exc_mandatory_info"));
$cb->setChecked(true);
$this->form->addItem($cb);
// Work Instructions
$desc_input = new ilTextAreaInputGUI($lng->txt("exc_instruction"), "instruction");
$desc_input->setRows(20);
$desc_input->setUseRte(true);
$desc_input->setRteTagSet("mini");
$this->form->addItem($desc_input);
// files
if ($a_mode == "create")
{
$files = new ilFileWizardInputGUI($this->lng->txt('objs_file'),'files');
$files->setFilenames(array(0 => ''));
$this->form->addItem($files);
}
// peer review
$peer = new ilCheckboxInputGUI($lng->txt("exc_peer_review"), "peer");
$peer->setInfo($this->lng->txt("exc_peer_review_ass_setting_info"));
$this->form->addItem($peer);
if ($a_mode == "create")
{
$peer->setInfo($lng->txt("exc_peer_review_info"));
}
$peer_min = new ilNumberInputGUI($lng->txt("exc_peer_review_min_number"), "peer_min");
$peer_min->setInfo($lng->txt("exc_peer_review_min_number_info"));
$peer_min->setRequired(true);
$peer_min->setValue(5);
$peer_min->setSize(3);
$peer_min->setValue(2);
$peer->addSubItem($peer_min);
$peer_dl = new ilDateTimeInputGUI($lng->txt("exc_peer_review_deadline"), "peer_dl");
$peer_dl->setInfo($lng->txt("exc_peer_review_deadline_info"));
$peer_dl->enableDateActivation("", "peer_dl_tgl");
$peer_dl->setShowTime(true);
$peer->addSubItem($peer_dl);
$peer_file = new ilCheckboxInputGUI($lng->txt("exc_peer_review_file"), "peer_file");
$peer_file->setInfo($lng->txt("exc_peer_review_file_info"));
$peer->addSubItem($peer_file);
$peer_prsl = new ilCheckboxInputGUI($lng->txt("exc_peer_review_personal"), "peer_prsl");
$peer_prsl->setInfo($lng->txt("exc_peer_review_personal_info"));
$peer->addSubItem($peer_prsl);
if($a_mode != "create" && // #13745
$this->ass &&
$this->ass->getDeadline() && $this->ass->getDeadline() < time())
{
$peer_prsl->setDisabled(true);
}
// global feedback
$fb = new ilCheckboxInputGUI($lng->txt("exc_global_feedback_file"), "fb");
$this->form->addItem($fb);
$fb_file = new ilFileInputGUI($lng->txt("file"), "fb_file");
$fb_file->setRequired(true); // will be disabled on update if file exists (see below)
// $fb_file->setAllowDeletion(true); makes no sense if required (overwrite or keep)
$fb->addSubItem($fb_file);
// #15467
if($a_mode != "create" &&
$this->ass &&
$this->ass->getFeedbackFile())
{
$fb_file->setRequired(false);
}
$fb_date = new ilRadioGroupInputGUI($lng->txt("exc_global_feedback_file_date"), "fb_date");
$fb_date->setRequired(true);
$fb_date->addOption(new ilRadioOption($lng->txt("exc_global_feedback_file_date_deadline"), ilExAssignment::FEEDBACK_DATE_DEADLINE));
$fb_date->addOption(new ilRadioOption($lng->txt("exc_global_feedback_file_date_upload"), ilExAssignment::FEEDBACK_DATE_SUBMISSION));
$fb->addSubItem($fb_date);
$fb_cron = new ilCheckboxInputGUI($lng->txt("exc_global_feedback_file_cron"), "fb_cron");
$fb_cron->setInfo($lng->txt("exc_global_feedback_file_cron_info"));
$fb->addSubItem($fb_cron);
// save and cancel commands
if ($a_mode == "create")
{
$this->form->addCommandButton("saveAssignment", $lng->txt("save"));
$this->form->addCommandButton("listAssignments", $lng->txt("cancel"));
}
else
{
$this->form->addCommandButton("updateAssignment", $lng->txt("save"));
$this->form->addCommandButton("listAssignments", $lng->txt("cancel"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::initAssignmentTextForm ( ilExAssignment  $a_ass,
  $a_read_only = false,
  $a_cancel_cmd = "showOverview",
  $a_peer_review_cmd = null,
  $a_peer_rating_html = null 
)
protected

Definition at line 3946 of file class.ilObjExerciseGUI.php.

References $ilCtrl, $ilUser, ilExAssignment\getMandatory(), ilExAssignment\getTitle(), ilTextAreaInputGUI\setCols(), ilCustomInputGUI\setHtml(), and ilFormPropertyGUI\setRequired().

Referenced by editAssignmentTextObject(), showAssignmentTextObject(), and updateAssignmentTextObject().

{
global $ilCtrl, $ilUser;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt("exc_assignment")." \"".$a_ass->getTitle()."\"");
if(!$a_read_only)
{
$text = new ilTextAreaInputGUI($this->lng->txt("exc_your_text"), "atxt");
$text->setRequired((bool)$a_ass->getMandatory());
$text->setRows(40);
$form->addItem($text);
// custom rte tags
$text->setUseRte(true);
$text->setRTESupport($ilUser->getId(), "exca~", "exc_ass");
// see ilObjForumGUI
$text->disableButtons(array(
'charmap',
'undo',
'redo',
'justifyleft',
'justifycenter',
'justifyright',
'justifyfull',
'anchor',
'fullscreen',
'cut',
'copy',
'paste',
'pastetext',
// 'formatselect' #13234
));
$form->setFormAction($ilCtrl->getFormAction($this, "updateAssignmentText"));
$form->addCommandButton("updateAssignmentTextAndReturn", $this->lng->txt("save_return"));
$form->addCommandButton("updateAssignmentText", $this->lng->txt("save"));
}
else
{
$text = new ilNonEditableValueGUI($this->lng->txt("exc_files_returned_text"), "atxt", true);
$form->addItem($text);
if(!$a_peer_review_cmd)
{
$form->setFormAction($ilCtrl->getFormAction($this, "showOverview"));
}
else
{
$rating = new ilCustomInputGUI($this->lng->txt("exc_peer_review_rating"));
$rating->setHtml($a_peer_rating_html);
$form->addItem($rating);
$comm = new ilTextAreaInputGUI($this->lng->txt("exc_peer_review_comment"), "comm");
$comm->setCols(75);
$comm->setRows(15);
$form->addItem($comm);
$form->setFormAction($ilCtrl->getFormAction($this, $a_peer_review_cmd));
$form->addCommandButton($a_peer_review_cmd, $this->lng->txt("save"));
}
}
$form->addCommandButton($a_cancel_cmd, $this->lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Init properties form.

Reimplemented from ilObjectGUI.

Definition at line 782 of file class.ilObjExerciseGUI.php.

References $section, ilPropertyFormGUI\addItem(), ilExAssignment\countMandatory(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setSize(), and ilPropertyFormGUI\setTitle().

{
$a_form->setTitle($this->lng->txt("exc_edit_exercise"));
$section->setTitle($this->lng->txt('exc_passing_exc'));
$a_form->addItem($section);
// pass mode
$radg = new ilRadioGroupInputGUI($this->lng->txt("exc_pass_mode"), "pass_mode");
$op1 = new ilRadioOption($this->lng->txt("exc_pass_all"), "all",
$this->lng->txt("exc_pass_all_info"));
$radg->addOption($op1);
$op2 = new ilRadioOption($this->lng->txt("exc_pass_minimum_nr"), "nr",
$this->lng->txt("exc_pass_minimum_nr_info"));
$radg->addOption($op2);
// minimum number of assignments to pass
$ni = new ilNumberInputGUI($this->lng->txt("exc_min_nr"), "pass_nr");
$ni->setSize(4);
$ni->setMaxLength(4);
$ni->setRequired(true);
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$mand = ilExAssignment::countMandatory($this->object->getId());
$min = max($mand, 1);
$ni->setMinValue($min, true);
$ni->setInfo($this->lng->txt("exc_min_nr_info"));
$op2->addSubItem($ni);
$a_form->addItem($radg);
// completion by submission
$subcompl = new ilRadioGroupInputGUI($this->lng->txt("exc_passed_status_determination"), "completion_by_submission");
$op1 = new ilRadioOption($this->lng->txt("exc_completion_by_tutor"), 0, "");
$subcompl->addOption($op1);
$op2 = new ilRadioOption($this->lng->txt("exc_completion_by_submission"), 1,$this->lng->txt("exc_completion_by_submission_info"));
$subcompl->addOption($op2);
$a_form->addItem($subcompl);
/*$subcompl = new ilCheckboxInputGUI($this->lng->txt('exc_completion_by_submission'), 'completion_by_submission');
$subcompl->setInfo($this->lng->txt('exc_completion_by_submission_info'));
$subcompl->setValue(1);
$a_form->addItem($subcompl);*/
$section->setTitle($this->lng->txt('exc_publishing'));
$a_form->addItem($section);
// show submissions
$cb = new ilCheckboxInputGUI($this->lng->txt("exc_show_submissions"), "show_submissions");
$cb->setInfo($this->lng->txt("exc_show_submissions_info"));
$a_form->addItem($cb);
$section->setTitle($this->lng->txt('exc_notification'));
$a_form->addItem($section);
// submission notifications
$cbox = new ilCheckboxInputGUI($this->lng->txt("exc_submission_notification"), "notification");
$cbox->setInfo($this->lng->txt("exc_submission_notification_info"));
$a_form->addItem($cbox);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::initMultiFeedbackForm (   $a_ass_id)

Definition at line 4670 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\$lng, ilExAssignment\lookupTitle(), and ilFileInputGUI\setSuffixes().

Referenced by showMultiFeedbackObject(), and uploadMultiFeedbackObject().

{
global $lng;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->addCommandButton("uploadMultiFeedback", $lng->txt("upload"));
$form->addCommandButton("members", $lng->txt("cancel"));
// multi feedback file
$fi = new ilFileInputGUI($lng->txt("exc_multi_feedback_file"), "mfzip");
$fi->setSuffixes(array("zip"));
$fi->setRequired(true);
$form->addItem($fi);
$form->setTitle(ilExAssignment::lookupTitle($a_ass_id));
$form->setFormAction($this->ctrl->getFormAction($this, "uploadMultiFeedback"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::initPortfolioTemplateForm ( array  $a_templates)
protected

Definition at line 3422 of file class.ilObjExerciseGUI.php.

References ilFormPropertyGUI\setRequired().

Referenced by createPortfolioTemplateObject(), and setSelectedPortfolioTemplateObject().

{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt("exc_create_portfolio").": ".$this->ass->getTitle());
$form->setFormAction($this->ctrl->getFormAction($this, "setSelectedPortfolioTemplate"));
$prtt = new ilRadioGroupInputGUI($this->lng->txt("obj_prtt"), "prtt");
$prtt->setRequired(true);
$prtt->addOption(new ilRadioOption($this->lng->txt("exc_create_portfolio_no_template"), -1));
foreach($a_templates as $id => $title)
{
$prtt->addOption(new ilRadioOption('"'.$title.'"', $id));
}
$prtt->setValue(-1);
$form->addItem($prtt);
$form->addCommandButton("setSelectedPortfolioTemplate", $this->lng->txt("save"));
$form->addCommandButton("showOverview", $this->lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::initTeamSubmission (   $a_back_cmd,
  $a_mandatory_team = true 
)
protected

Definition at line 3604 of file class.ilObjExerciseGUI.php.

References $ilUser, ilObjectGUI\checkPermission(), and ilExAssignment\TYPE_UPLOAD_TEAM.

Referenced by confirmRemoveTeamMemberObject(), executeCommand(), submissionScreenObject(), submissionScreenTeamLogObject(), and submissionScreenTeamObject().

{
global $ilUser, $ilHelp;
$this->checkPermission("read");
if($a_mandatory_team && $this->ass->getType() != ilExAssignment::TYPE_UPLOAD_TEAM)
{
$this->ctrl->redirect($this, "submissionScreen");
}
$this->tabs_gui->clearTargets();
$ilHelp->setScreenIdComponent("exc");
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, $a_back_cmd));
if($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$this->tabs_gui->addTab("submissions", $this->lng->txt("files"),
$this->ctrl->getLinkTarget($this, "submissionScreen"));
$this->tabs_gui->addTab("team", $this->lng->txt("exc_team"),
$this->ctrl->getLinkTarget($this, "submissionScreenTeam"));
$this->tabs_gui->addTab("log", $this->lng->txt("exc_team_log"),
$this->ctrl->getLinkTarget($this, "submissionScreenTeamLog"));
$this->tabs_gui->activateTab("team");
$team_id = $this->ass->getTeamId($ilUser->getId());
if(!$team_id)
{
$team_id = $this->ass->getTeamId($ilUser->getId(), true);
// #12337
if (!$this->object->members_obj->isAssigned($ilUser->getId()))
{
$this->object->members_obj->assignMember($ilUser->getId());
}
}
return $team_id;
}
else
{
$ilHelp->setScreenId("submissions");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::initUploadForm ( )

Init upload form form.

Definition at line 531 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilFileWizardInputGUI\setFilenames().

Referenced by uploadFormObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// file input
include_once("./Services/Form/classes/class.ilFileWizardInputGUI.php");
$fi = new ilFileWizardInputGUI($lng->txt("file"), "deliver");
$fi->setFilenames(array(0 => ''));
//$fi->setInfo($lng->txt(""));
$this->form->addItem($fi);
$this->form->addCommandButton("deliverFile", $lng->txt("upload"));
$this->form->addCommandButton("submissionScreen", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("file_add"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::initZipUploadForm ( )

Init upload form form.

Definition at line 555 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilFileInputGUI\setSuffixes().

Referenced by uploadZipFormObject().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// desc
include_once("./Services/Form/classes/class.ilFileInputGUI.php");
$fi = new ilFileInputGUI($lng->txt("file"), "deliver");
$fi->setSuffixes(array("zip"));
$this->form->addItem($fi);
$this->form->addCommandButton("deliverUnzip", $lng->txt("upload"));
$this->form->addCommandButton("submissionScreen", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("header_zip"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::listAssignmentsObject ( )

List assignments.

Definition at line 2117 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $t, ilObjectGUI\$tpl, addContentSubTabs(), and ilObjectGUI\checkPermission().

{
global $tpl, $ilTabs, $ilToolbar, $lng, $ilCtrl;
$this->checkPermission("write");
$ilTabs->activateTab("content");
$this->addContentSubTabs("list_assignments");
$ilToolbar->addButton($lng->txt("exc_add_assignment"),
$ilCtrl->getLinkTarget($this, "addAssignment"));
include_once("./Modules/Exercise/classes/class.ilAssignmentsTableGUI.php");
$t = new ilAssignmentsTableGUI($this, "listAssignments", $this->object);
$tpl->setContent($t->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::listPublicSubmissionsObject ( )

List all submissions.

Definition at line 3017 of file class.ilObjExerciseGUI.php.

References $_GET, $tab, ilObjectGUI\$tpl, addContentSubTabs(), ilObjectGUI\checkPermission(), and ilExAssignment\TYPE_TEXT.

{
global $tpl, $ilTabs;
$this->checkPermission("read");
if(!$this->object->getShowSubmissions())
{
$this->ctrl->redirect($this, "view");
}
$ilTabs->activateTab("content");
$this->addContentSubTabs("content");
if($this->ass->getType() != ilExAssignment::TYPE_TEXT)
{
include_once("./Modules/Exercise/classes/class.ilPublicSubmissionsTableGUI.php");
$tab = new ilPublicSubmissionsTableGUI($this, "listPublicSubmissions",
$this->object, (int) $_GET["ass_id"]);
$tpl->setContent($tab->getHTML());
}
else
{
// #13271
include_once "Modules/Exercise/classes/class.ilExAssignmentListTextTableGUI.php";
$tbl = new ilExAssignmentListTextTableGUI($this, "listPublicSubmissions", $this->ass, false, true);
$tpl->setContent($tbl->getHTML());
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::listTextAssignmentObject (   $a_show_peer_review = false)

Definition at line 4267 of file class.ilObjExerciseGUI.php.

References $cmd, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and ilExAssignment\TYPE_TEXT.

Referenced by listTextAssignmentWithPeerReviewObject().

{
global $tpl, $ilToolbar, $ilCtrl, $ilTabs, $lng;
$this->checkPermission("write");
if(!$this->ass || $this->ass->getType() != ilExAssignment::TYPE_TEXT)
{
$ilCtrl->redirect($this, "member");
}
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "members"));
if($a_show_peer_review)
{
$cmd = "listTextAssignmentWithPeerReview";
}
else
{
$cmd = "listTextAssignment";
}
include_once "Modules/Exercise/classes/class.ilExAssignmentListTextTableGUI.php";
$tbl = new ilExAssignmentListTextTableGUI($this, $cmd, $this->ass, $a_show_peer_review);
$tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::listTextAssignmentWithPeerReviewObject ( )

Definition at line 4262 of file class.ilObjExerciseGUI.php.

References listTextAssignmentObject().

{
}

+ Here is the call graph for this function:

ilObjExerciseGUI::membersObject ( )

All participants and submission of one assignment.

Definition at line 1128 of file class.ilObjExerciseGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, $options, $si, ilObjectGUI\$tpl, ilObjectGUI\$tree, addSubmissionSubTabs(), ilObjectGUI\checkPermission(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilExAssignment\getAllDeliveredFiles(), ilExAssignment\getAssignmentDataOfExercise(), ilUtil\sendInfo(), and ilExAssignment\TYPE_TEXT.

Referenced by addUserFromAutoCompleteObject(), saveCommentsObject(), and selectAssignmentObject().

{
global $rbacsystem, $tree, $tpl, $ilToolbar, $ilCtrl, $ilTabs, $lng;
$ilTabs->activateTab("grades");
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$this->checkPermission("write");
$this->addSubmissionSubTabs("assignment");
// assignment selection
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$ass = ilExAssignment::getAssignmentDataOfExercise($this->object->getId());
if ($_GET["ass_id"] == "")
{
$a = current($ass);
$_GET["ass_id"] = $a["id"];
}
reset($ass);
if (count($ass) > 1)
{
$options = array();
foreach ($ass as $a)
{
$options[$a["id"]] = $a["title"];
}
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$si = new ilSelectInputGUI($this->lng->txt(""), "ass_id");
$si->setOptions($options);
$si->setValue($_GET["ass_id"]);
$ilToolbar->addInputItem($si);
$ilToolbar->addFormButton($this->lng->txt("exc_select_ass"),
"selectAssignment");
$ilToolbar->addSeparator();
}
// add member
include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
$this,
$ilToolbar,
array(
'auto_complete_name' => $lng->txt('user'),
'submit_name' => $lng->txt('add'),
'add_search' => true,
'add_from_container' => $_GET["ref_id"]
)
);
// we do not want the ilRepositorySearchGUI form action
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
$ilToolbar->addSeparator();
// multi-feebdack
$ilToolbar->addButton($this->lng->txt("exc_multi_feedback"),
$this->ctrl->getLinkTarget($this, "showMultiFeedback"));
if (count($ass) > 0)
{
$ctype = null;
foreach($ass as $item)
{
if($item["id"] == $_GET["ass_id"])
{
$ctype = $item["type"];
}
}
{
$ilToolbar->addSeparator();
$ilToolbar->addFormButton($lng->txt("exc_list_text_assignment"), "listTextAssignment");
}
else if(count(ilExAssignment::getAllDeliveredFiles($this->object->getId(), $_GET["ass_id"])))
{
$ilToolbar->addSeparator();
$ilToolbar->addFormButton($lng->txt("download_all_returned_files"), "downloadAll");
}
include_once("./Modules/Exercise/classes/class.ilExerciseMemberTableGUI.php");
$exc_tab = new ilExerciseMemberTableGUI($this, "members", $this->object, $_GET["ass_id"]);
$tpl->setContent($exc_tab->getHTML());
}
else
{
ilUtil::sendInfo($lng->txt("exc_no_assignments_available"));
}
return;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::orderAssignmentsByDeadlineObject ( )

Order by deadline.

Definition at line 2905 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), ilExAssignment\orderAssByDeadline(), and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
$this->checkPermission("write");
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
ilExAssignment::orderAssByDeadline($this->object->getId());
ilUtil::sendSuccess($lng->txt("exc_saved_order"), true);
$ilCtrl->redirect($this, "listAssignments");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::outCertificateObject ( )

Definition at line 3588 of file class.ilObjExerciseGUI.php.

References $ilUser, ilUtil\sendFailure(), and showOverviewObject().

{
global $ilUser;
if($this->object->hasUserCertificate($ilUser->getId()))
{
ilUtil::sendFailure($this->lng->txt("msg_failed"));
$this->showOverviewObject();
}
include_once "./Services/Certificate/classes/class.ilCertificate.php";
include_once "./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
$certificate = new ilCertificate(new ilExerciseCertificateAdapter($this->object));
$certificate->outCertificate(array("user_id" => $ilUser->getId()));
}

+ Here is the call graph for this function:

ilObjExerciseGUI::redirectFeedbackMailObject ( )

set feedback status for member and redirect to mail screen

Definition at line 1353 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, ilObjUser\_lookupLogin(), ilObjectGUI\checkPermission(), ilMailFormCall\getRedirectTarget(), ilExAssignment\getTeamMembersByAssignmentId(), ilUtil\redirect(), ilUtil\sendFailure(), ilExAssignment\TYPE_UPLOAD_TEAM, and ilExAssignment\updateStatusFeedbackForUser().

Referenced by updateMembersObject().

{
$this->checkPermission("write");
$members = array();
if ($_GET["member_id"] != "")
{
if($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$members = ilExAssignment::getTeamMembersByAssignmentId($this->ass->getId(), $_GET["member_id"]);
}
else
{
$members = array($_GET["member_id"]);
}
}
else if(count($_POST["member"]) > 0)
{
if($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
foreach(array_keys($_POST["member"]) as $user_id)
{
$members = array_merge($members, ilExAssignment::getTeamMembersByAssignmentId($this->ass->getId(), $user_id));
}
$members = array_unique($members);
}
else
{
$members = array_keys($_POST["member"]);
}
}
if($members)
{
$logins = array();
foreach($members as $user_id)
{
ilExAssignment::updateStatusFeedbackForUser($this->ass->getId(), $user_id, 1);
$logins[] = ilObjUser::_lookupLogin($user_id);
}
$logins = implode($logins, ",");
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
ilUtil::redirect(ilMailFormCall::getRedirectTarget($this, 'members', array(), array('type' => 'new', 'rcp_to' => $logins)));
}
ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
$this->ctrl->redirect($this, "members");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::removeExistingSubmissions ( )

remove existing files/submissions for assignment

Definition at line 3220 of file class.ilObjExerciseGUI.php.

References $ilUser, ilExAssignment\deleteDeliveredFiles(), and ilExAssignment\getDeliveredFiles().

Referenced by setSelectedBlogObject(), setSelectedPortfolioObject(), submitBlog(), and submitPortfolio().

{
global $ilUser;
$submitted = ilExAssignment::getDeliveredFiles($this->ass->getExerciseId(), $this->ass->getId(), $ilUser->getId());
if($submitted)
{
$files = array();
foreach($submitted as $item)
{
$files[] = $item["returned_id"];
}
ilExAssignment::deleteDeliveredFiles($this->ass->getExerciseId(), $this->ass->getId(), $files, $ilUser->getId());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::removeTeamMemberObject (   $a_full_delete = false)

Definition at line 3823 of file class.ilObjExerciseGUI.php.

References $_POST, $ilUser, ilExerciseMembers\_writeReturned(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilExAssignment\updateStatusReturnedForUser().

Referenced by confirmRemoveTeamMemberObject().

{
global $ilUser;
$team_id = $this->ass->getTeamId($ilUser->getId());
$members = $this->ass->getTeamMembers($team_id);
$ids = (bool)$a_full_delete
? $members
: $_POST["id"];
if(!sizeof($ids))
{
ilUtil::sendFailure($this->lng->txt("select_one"), true);
$this->ctrl->redirect($this, "submissionScreenTeam");
}
$team_deleted = (bool)$a_full_delete;
if(!$team_deleted)
{
if(sizeof($members) <= sizeof($ids))
{
if(sizeof($members) == 1 && $members[0] == $ilUser->getId())
{
$team_deleted = true;
}
else
{
ilUtil::sendFailure($this->lng->txt("exc_team_at_least_one"), true);
$this->ctrl->redirect($this, "submissionScreenTeam");
}
}
}
foreach($ids as $user_id)
{
$this->ass->removeTeamMember($team_id, $user_id, $this->ref_id);
ilExAssignment::updateStatusReturnedForUser($this->ass->getId(), $user_id, 0);
ilExerciseMembers::_writeReturned($this->object->getId(), $user_id, 0);
// :TODO: log, notification
}
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
if(!$team_deleted)
{
$this->ctrl->redirect($this, "submissionScreenTeam");
}
else
{
$this->ctrl->redirect($this, "showOverview");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::renderWorkspaceExplorer (   $a_cmd)
protected

Definition at line 3537 of file class.ilObjExerciseGUI.php.

References $_GET, $ilUser, ilObjectGUI\$tree, and ilWorkspaceExplorer\SEL_TYPE_RADIO.

Referenced by createBlogObject(), and selectBlogObject().

{
global $ilUser;
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
require_once 'Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php';
$tree = new ilWorkspaceTree($ilUser->getId());
$access_handler = new ilWorkspaceAccessHandler($tree);
'exc_wspexpand', $tree, $access_handler);
$exp->setTargetGet('wsp_id');
if($a_cmd == "selectBlog")
{
$exp->removeAllFormItemTypes();
$exp->addFilter('blog');
$exp->addFormItemForType('blog');
}
if($_GET['exc_wspexpand'] == '')
{
// not really used as session is already set [see above]
$expanded = $tree->readRootId();
}
else
{
$expanded = $_GET['exc_wspexpand'];
}
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, $a_cmd));
$exp->setPostVar('node');
$exp->setExpand($expanded);
$exp->setOutput(0);
return $exp->getOutput();
}

+ Here is the caller graph for this function:

ilObjExerciseGUI::resetPeerReviewObject ( )

Definition at line 4632 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\checkPermission(), and ilUtil\sendSuccess().

{
global $ilCtrl;
if($this->ass &&
$this->ass->getPeerReview())
{
$this->checkPermission("write");
$this->ass->resetPeerReviews();
ilUtil::sendSuccess($this->lng->txt("exc_peer_review_reset_done"), true);
}
$ilCtrl->redirect($this, "showPeerReviewOverview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveAssignmentObject ( )

Save assignment.

Definition at line 2332 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, $valid, addContentSubTabs(), ilObjectGUI\checkPermission(), ilExAssignment\getAdoptableTeamAssignments(), IL_CAL_UNIX, initAssignmentForm(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilExAssignment\TYPE_UPLOAD_TEAM.

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$this->checkPermission("write");
$ilTabs->activateTab("content");
$this->addContentSubTabs("list_assignments");
$this->initAssignmentForm("create");
if ($this->form->checkInput())
{
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
// additional checks
$valid = true;
if ($_POST["start_time_cb"] && $_POST["deadline_cb"])
{
// check whether start date is before end date
$start_date =
$this->form->getItemByPostVar("start_time")->getDate();
$end_date =
$this->form->getItemByPostVar("deadline")->getDate();
if ($start_date->get(IL_CAL_UNIX) >=
$end_date->get(IL_CAL_UNIX))
{
$this->form->getItemByPostVar("start_time")
->setAlert($lng->txt("exc_start_date_should_be_before_end_date"));
$this->form->getItemByPostVar("deadline")
->setAlert($lng->txt("exc_start_date_should_be_before_end_date"));
$valid = false;
}
}
{
$this->form->getItemByPostVar("peer")
->setAlert($lng->txt("exc_team_upload_not_supported"));
$valid = false;
}
if(!$_POST["deadline_cb"])
{
if($_POST["peer"])
{
$this->form->getItemByPostVar("peer")
->setAlert($lng->txt("exc_needs_deadline"));
$valid = false;
}
if($_POST["fb"])
{
$this->form->getItemByPostVar("fb")
->setAlert($lng->txt("exc_needs_deadline"));
$valid = false;
}
}
else
{
$_POST["peer"] &&
$_POST["peer_dl_tgl"])
{
$peer_dl = $this->form->getItemByPostVar("peer_dl")->getDate();
$peer_dl = $peer_dl->get(IL_CAL_UNIX);
$end_date = $this->form->getItemByPostVar("deadline")->getDate();
$end_date = $end_date->get(IL_CAL_UNIX);
// #13877
if ($peer_dl < $end_date)
{
$this->form->getItemByPostVar("peer_dl")
->setAlert($lng->txt("exc_peer_deadline_mismatch"));
$valid = false;
}
}
}
if(!$valid)
{
ilUtil::sendFailure($lng->txt("form_input_not_valid"));
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
return;
}
$ass = new ilExAssignment();
$ass->setTitle($_POST["title"]);
$ass->setInstruction($_POST["instruction"]);
$ass->setExerciseId($this->object->getId());
$ass->setMandatory($_POST["mandatory"]);
$ass->setType($_POST["type"]);
if ($_POST["start_time_cb"])
{
$date =
$this->form->getItemByPostVar("start_time")->getDate();
$ass->setStartTime($date->get(IL_CAL_UNIX));
}
else
{
$ass->setStartTime(null);
}
// deadline
if ($_POST["deadline_cb"])
{
$date =
$this->form->getItemByPostVar("deadline")->getDate();
$ass->setDeadline($date->get(IL_CAL_UNIX));
}
else
{
$ass->setDeadline(null);
}
{
$ass->setPeerReview($_POST["peer"]);
$ass->setPeerReviewMin($_POST["peer_min"]);
$ass->setPeerReviewFileUpload($_POST["peer_file"]);
if($ass->getDeadline() && $ass->getDeadline() > time())
{
$ass->setPeerReviewPersonalized($_POST["peer_prsl"]);
}
if($_POST["peer_dl_tgl"])
{
$peer_dl = $this->form->getItemByPostVar("peer_dl")->getDate();
$ass->setPeerReviewDeadline($peer_dl->get(IL_CAL_UNIX));
}
else
{
$ass->setPeerReviewDeadline(null);
}
}
$ass->setFeedbackCron($_POST["fb_cron"]); // #13380
$ass->setFeedbackDate($_POST["fb_date"]);
$ass->save();
// save files
$ass->uploadAssignmentFiles($_FILES["files"]);
if($_FILES["fb_file"]["tmp_name"])
{
$ass->handleFeedbackFileUpload($_FILES["fb_file"]);
$ass->update();
}
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
if($ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
if(sizeof(ilExAssignment::getAdoptableTeamAssignments($this->object->getId(), $ass->getId())))
{
$ilCtrl->setParameter($this, "ass_id", $ass->getId());
$ilCtrl->redirect($this, "adoptTeamAssignmentsForm");
}
}
$ilCtrl->redirect($this, "listAssignments");
}
else
{
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveAssignmentOrderObject ( )

Save assignments order.

Definition at line 2889 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), ilExAssignment\saveAssOrderOfExercise(), and ilUtil\sendSuccess().

{
global $lng, $ilCtrl;
$this->checkPermission("write");
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
ilExAssignment::saveAssOrderOfExercise($this->object->getId(), $_POST["order"]);
ilUtil::sendSuccess($lng->txt("exc_saved_order"), true);
$ilCtrl->redirect($this, "listAssignments");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveBlogObject ( )
protected

Definition at line 3160 of file class.ilObjExerciseGUI.php.

References $_POST, $ilUser, ilObjectGUI\$tree, createBlogObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilUser;
if(!$_POST["node"])
{
ilUtil::sendFailure($this->lng->txt("select_one"));
return $this->createBlogObject();
}
$parent_node = $_POST["node"];
include_once "Modules/Blog/classes/class.ilObjBlog.php";
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
$blog = new ilObjBlog();
$blog->setTitle($this->object->getTitle()." - ".$this->ass->getTitle());
$blog->create();
$tree = new ilWorkspaceTree($ilUser->getId());
$node_id = $tree->insertObject($parent_node, $blog->getId());
$access_handler = new ilWorkspaceAccessHandler($tree);
$access_handler->setPermissions($parent_node, $node_id);
$this->object->addResourceObject($node_id, $this->ass->getId(), $ilUser->getId());
ilUtil::sendSuccess($this->lng->txt("exc_blog_created"), true);
$this->ctrl->redirect($this, "showOverview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveCommentForLearnersObject ( )

Save comment for learner (asynch)

Definition at line 4810 of file class.ilObjExerciseGUI.php.

References $_POST, $comment, $res, ilObjectGUI\checkPermission(), exit, ilUtil\shortenText(), ilUtil\stripSlashes(), ilExAssignment\TYPE_UPLOAD_TEAM, and ilExAssignment\updateCommentForUser().

{
$this->checkPermission("write");
$res = array("result"=>false);
if($this->ctrl->isAsynch())
{
$ass_id = (int)$_POST["ass_id"];
$user_id = (int)$_POST["mem_id"];
$comment = trim($_POST["comm"]);
if($ass_id && $user_id)
{
include_once "Modules/Exercise/classes/class.ilExAssignment.php";
// team upload?
if(is_object($this->ass) && $this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$team_id = $this->ass->getTeamId($user_id);
$user_ids = $this->ass->getTeamMembers($team_id);
}
else
{
$user_ids = array($user_id);
}
$all_members = new ilExerciseMembers($this->object);
$all_members = $all_members->getMembers();
$reci_ids = array();
foreach($user_ids as $user_id)
{
if(in_array($user_id, $all_members))
{
if(trim($comment))
{
$reci_ids[] = $user_id;
}
}
}
if(sizeof($reci_ids))
{
// send notification
$this->object->sendFeedbackFileNotification(null, $reci_ids,
$ass_id, true);
}
$res = array("result"=>true, "snippet"=>ilUtil::shortenText($comment, 25, true));
}
}
echo(json_encode($res));
exit();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveCommentsObject ( )

Definition at line 1606 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
$this->checkPermission("write");
if(!isset($_POST['comments_value']))
{
return;
}
$this->object->members_obj->setNoticeForMember($_GET["member_id"],
ilUtil::stripSlashes($_POST["comments_value"]));
ilUtil::sendSuccess($this->lng->txt("exc_members_comments_saved"));
$this->membersObject();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveGradesObject ( )

Save grades.

Definition at line 3060 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
global $ilCtrl, $lng;
$this->checkPermission("write");
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
if (is_array($_POST["lcomment"]))
{
foreach ($_POST["lcomment"] as $k => $v)
{
$marks_obj = new ilLPMarks($this->object->getId(), (int) $k);
$marks_obj->setComment(ilUtil::stripSlashes($v));
$marks_obj->setMark(ilUtil::stripSlashes($_POST["mark"][$k]));
$marks_obj->update();
}
}
ilUtil::sendSuccess($lng->txt("exc_msg_saved_grades"), true);
$ilCtrl->redirect($this, "showGradesOverview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveMultiFeedbackObject ( )

Save multi feedback.

Definition at line 4797 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, ilObjectGUI\checkPermission(), and ilUtil\sendSuccess().

{
$this->checkPermission("write");
$ass = new ilExAssignment((int) $_GET["ass_id"]);
$ass->saveMultiFeedbackFiles($_POST["file"]);
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "members");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveStatusAllObject ( )

Definition at line 1630 of file class.ilObjExerciseGUI.php.

References saveStatusObject().

{
$this->saveStatusObject(false, true);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::saveStatusObject (   $a_part_view = false,
  $a_force_all = false 
)

Save status of selecte members.

Definition at line 1638 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), ilExAssignment\lookupMarkOfUser(), ilUtil\sendSuccess(), ilUtil\stripSlashes(), ilExAssignment\TYPE_UPLOAD_TEAM, ilExAssignment\updateMarkOfUser(), ilExAssignment\updateNoticeForUser(), ilExAssignment\updateStatusOfUser(), and ilExAssignment\updateStatusTimeOfUser().

Referenced by saveStatusAllObject(), saveStatusParticipantObject(), and updateMembersObject().

{
global $ilCtrl;
$this->checkPermission("write");
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
// include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$saved_for = array();
foreach($_POST["id"] as $key => $value)
{
if (!$a_part_view)
{
if (!$a_force_all && $_POST["member"][$key] != "1")
{
continue;
}
else
{
$uname = ilObjUser::_lookupName($key);
$saved_for[] = $uname["lastname"].", ".$uname["firstname"];
}
}
if (!$a_part_view)
{
$ass_id = (int) $_GET["ass_id"];
$user_id = (int) $key;
}
else
{
$ass_id = (int) $key;
$user_id = (int) $_GET["part_id"];
}
// team upload?
if(is_object($this->ass) and $this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$team_id = $this->ass->getTeamId($user_id);
$user_ids = $this->ass->getTeamMembers($team_id);
if (count($_POST["member"]) > 0)
{
foreach($user_ids as $user_id)
{
if($user_id != $key)
{
$uname = ilObjUser::_lookupName($user_id);
$saved_for[] = $uname["lastname"].", ".$uname["firstname"];
}
}
}
}
else
{
$user_ids = array($user_id);
}
foreach($user_ids as $user_id)
{
ilUtil::stripSlashes($_POST["status"][$key]));
ilUtil::stripSlashes($_POST["notice"][$key]));
if (ilUtil::stripSlashes($_POST['mark'][$key]) !=
{
}
ilUtil::stripSlashes($_POST['mark'][$key]));
/*
ilExAssignment::updateCommentForUser($ass_id, $user_id,
ilUtil::stripSlashes($_POST['lcomment'][$key]));
*/
}
}
if (count($saved_for) > 0)
{
$save_for_str = "(".implode($saved_for, " - ").")";
}
if($save_for_str || $a_part_view)
{
ilUtil::sendSuccess($this->lng->txt("exc_status_saved")." ".$save_for_str,true);
}
if (!$a_part_view)
{
$ilCtrl->redirect($this, "members");
}
else
{
$ilCtrl->redirect($this, "showParticipant");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::saveStatusParticipantObject ( )

Save assignment status (participant view)

Definition at line 1625 of file class.ilObjExerciseGUI.php.

References saveStatusObject().

{
$this->saveStatusObject(true);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::selectAssignmentObject ( )

Select assignment.

Definition at line 1225 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, membersObject(), and ilUtil\stripSlashes().

{
global $ilTabs;
$ilTabs->activateTab("grades");
$_GET["ass_id"] = ilUtil::stripSlashes($_POST["ass_id"]);
$this->membersObject();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::selectBlogObject ( )
protected

Definition at line 3129 of file class.ilObjExerciseGUI.php.

References $ilUser, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), renderWorkspaceExplorer(), and ilUtil\sendInfo().

{
global $ilUser;
$this->checkPermission("read");
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "showOverview"));
// $this->tabs_gui->setTabActive("content");
// $this->addContentSubTabs("content");
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
}
$tpl = new ilTemplate("tpl.exc_select_resource.html", true, true, "Modules/Exercise");
$tpl->setVariable("TXT_TITLE", $this->lng->txt("exc_select_blog").": ".$this->ass->getTitle());
$tpl->setVariable("TREE", $this->renderWorkspaceExplorer("selectBlog"));
$tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
$tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
$tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$tpl->setVariable("CMD_SUBMIT", "setSelectedBlog");
$tpl->setVariable("CMD_CANCEL", "showOverview");
ilUtil::sendInfo($this->lng->txt("exc_select_blog_info"));
$this->tpl->setContent($tpl->get());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::selectParticipantObject ( )

Select participant.

Definition at line 1312 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, showParticipantObject(), and ilUtil\stripSlashes().

{
global $ilTabs;
$ilTabs->activateTab("grades");
$_GET["part_id"] = ilUtil::stripSlashes($_POST["part_id"]);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::selectPortfolioObject ( )
protected

Definition at line 3378 of file class.ilObjExerciseGUI.php.

References $ilUser, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilObjPortfolio\getPortfoliosOfUser(), and ilUtil\sendInfo().

Referenced by setSelectedBlogObject(), and setSelectedPortfolioObject().

{
global $ilUser;
$this->checkPermission("read");
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "showOverview"));
// $this->tabs_gui->setTabActive("content");
// $this->addContentSubTabs("content");
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
}
$tpl = new ilTemplate("tpl.exc_select_resource.html", true, true, "Modules/Exercise");
include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
$portfolios = ilObjPortfolio::getPortfoliosOfUser($ilUser->getId());
if($portfolios)
{
$tpl->setCurrentBlock("item");
foreach($portfolios as $portfolio)
{
$tpl->setVariable("ITEM_ID", $portfolio["id"]);
$tpl->setVariable("ITEM_TITLE", $portfolio["title"]);
$tpl->parseCurrentBlock();
}
}
$tpl->setVariable("TXT_TITLE", $this->lng->txt("exc_select_portfolio").": ".$this->ass->getTitle());
$tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
$tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
$tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$tpl->setVariable("CMD_SUBMIT", "setSelectedPortfolio");
$tpl->setVariable("CMD_CANCEL", "showOverview");
ilUtil::sendInfo($this->lng->txt("exc_select_portfolio_info"));
$this->tpl->setContent($tpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::sendMembersObject ( )

Send assignment per mail to participants.

Definition at line 1490 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\checkPermission(), ilExAssignment\getTeamMembersByAssignmentId(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilExAssignment\TYPE_UPLOAD_TEAM.

Referenced by updateMembersObject().

{
global $ilCtrl;
$this->checkPermission("write");
if(!count($_POST["member"]))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
}
else
{
// team upload?
if($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM)
{
$members = array();
foreach(array_keys($_POST["member"]) as $user_id)
{
$tmembers = ilExAssignment::getTeamMembersByAssignmentId($this->ass->getId(), $user_id);
foreach($tmembers as $tuser_id)
{
$members[$tuser_id] = 1;
}
}
}
else
{
$members = $_POST["member"];
}
$this->object->sendAssignment($this->object->getId(),
(int) $_GET["ass_id"], $members);
ilUtil::sendSuccess($this->lng->txt("exc_sent"),true);
}
$ilCtrl->redirect($this, "members");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::sendNotifications (   $assignment_id)
protected

Send submission notifications.

Parameters
int$assignment_id

Definition at line 3085 of file class.ilObjExerciseGUI.php.

References ilNotification\getNotificationsForObject(), ilNotification\TYPE_EXERCISE_SUBMISSION, and ilExerciseMailNotification\TYPE_SUBMISSION_UPLOAD.

Referenced by deliverFileObject(), deliverUnzipObject(), submitBlog(), submitPortfolio(), and updateAssignmentTextObject().

{
include_once "./Services/Notification/classes/class.ilNotification.php";
include_once "./Modules/Exercise/classes/class.ilExerciseMailNotification.php";
$not->setAssignmentId($assignment_id);
$not->setRefId($this->ref_id);
$not->setRecipients($users);
$not->send();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::setAssignmentHeader ( )

Set assignment header.

Definition at line 2921 of file class.ilObjExerciseGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilExAssignment\lookupTitle().

Referenced by editAssignmentObject(), and executeCommand().

{
global $ilTabs, $lng, $ilCtrl, $tpl, $ilHelp;
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$tpl->setTitle(ilExAssignment::lookupTitle((int) $_GET["ass_id"]));
$tpl->setDescription("");
$ilTabs->clearTargets();
$ilHelp->setScreenIdComponent("exc");
$ilTabs->setBackTarget($lng->txt("back"),
$ilCtrl->getLinkTarget($this, "listAssignments"));
$ilTabs->addTab("ass_settings",
$lng->txt("settings"),
$ilCtrl->getLinkTarget($this, "editAssignment"));
$ilTabs->addTab("ass_files",
$lng->txt("exc_instruction_files"),
$ilCtrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::setFiles (   $a_files)

Definition at line 52 of file class.ilObjExerciseGUI.php.

{
$this->files = $a_files;
}
ilObjExerciseGUI::setSelectedBlogObject ( )
protected

Definition at line 3193 of file class.ilObjExerciseGUI.php.

References $_POST, $ilUser, ilObjectGUI\$tree, removeExistingSubmissions(), selectPortfolioObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilUser;
if($_POST["node"])
{
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($ilUser->getId());
$node = $tree->getNodeData($_POST["node"]);
if($node && $node["type"] == "blog")
{
$this->object->addResourceObject($node["wsp_id"], $this->ass->getId(), $ilUser->getId());
ilUtil::sendSuccess($this->lng->txt("exc_blog_selected"), true);
$this->ctrl->setParameter($this, "blog_id", $node["wsp_id"]);
$this->ctrl->redirect($this, "askDirectionSubmission");
}
}
ilUtil::sendFailure($this->lng->txt("select_one"));
return $this->selectPortfolioObject();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::setSelectedPortfolioObject ( )
protected

Definition at line 3519 of file class.ilObjExerciseGUI.php.

References $_POST, $ilUser, removeExistingSubmissions(), selectPortfolioObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilUser;
if($_POST["item"])
{
$this->object->addResourceObject($_POST["item"], $this->ass->getId(), $ilUser->getId());
ilUtil::sendSuccess($this->lng->txt("exc_portfolio_selected"), true);
$this->ctrl->setParameter($this, "prtf_id", $_POST["item"]);
$this->ctrl->redirect($this, "askDirectionSubmission");
}
ilUtil::sendFailure($this->lng->txt("select_one"));
return $this->selectPortfolioObject();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::setSelectedPortfolioTemplateObject ( )
protected

Definition at line 3467 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\checkPermission(), createPortfolioObject(), createPortfolioTemplateObject(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), and initPortfolioTemplateForm().

{
$this->checkPermission("read");
include_once "Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
if(!sizeof($templates))
{
$this->ctrl->redirect($this, "showOverview");
}
$form = $this->initPortfolioTemplateForm($templates);
if($form->checkInput())
{
$prtt = $form->getInput("prtt");
if($prtt > 0 && array_key_exists($prtt, $templates))
{
$title = $this->object->getTitle()." - ".$this->ass->getTitle();
$this->ctrl->setParameterByClass("ilObjPortfolioGUI", "exc_id", $this->object->getRefId());
$this->ctrl->setParameterByClass("ilObjPortfolioGUI", "ass_id", $this->ass->getId());
$this->ctrl->setParameterByClass("ilObjPortfolioGUI", "pt", $title);
$this->ctrl->setParameterByClass("ilObjPortfolioGUI", "prtt", $prtt);
$this->ctrl->redirectByClass(array("ilPersonalDesktopGUI", "ilPortfolioRepositoryGUI", "ilObjPortfolioGUI"), "createPortfolioFromTemplate");
}
else
{
// do not use template
return $this->createPortfolioObject();
}
}
$form->setValuesByPost();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::setSettingsSubTabs ( )
protected

Definition at line 2035 of file class.ilObjExerciseGUI.php.

References ilCertificate\isActive().

Referenced by certificateObject(), editObject(), and executeCommand().

{
$this->tabs_gui->addSubTab("edit",
$this->lng->txt("general_settings"),
$this->ctrl->getLinkTarget($this, "edit"));
include_once "Services/Certificate/classes/class.ilCertificate.php";
{
$this->tabs_gui->addSubTab("certificate",
$this->lng->txt("certificate"),
$this->ctrl->getLinkTarget($this, "certificate"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::showAssignmentTextObject ( )

Definition at line 4150 of file class.ilObjExerciseGUI.php.

References $_GET, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilRTE\_replaceMediaObjectImageSrc(), ilObjectGUI\checkPermission(), ilExAssignment\getDeliveredFiles(), ilUserUtil\getNamePresentation(), initAssignmentTextForm(), and ilExAssignment\TYPE_TEXT.

{
global $ilCtrl, $ilUser, $lng, $tpl;
if(!$this->ass ||
$this->ass->getType() != ilExAssignment::TYPE_TEXT)
{
$ilCtrl->redirect($this, "showOverview");
}
$add_rating = null;
// tutor
if((int)$_GET["grd"])
{
$this->checkPermission("write");
if((int)$_GET["grd"] == 1)
{
$user_id = (int)$_GET["member_id"];
$cancel_cmd = "members";
}
else
{
$user_id = (int)$_GET["part_id"];
$cancel_cmd = "showParticipant";
}
}
// peer review
else if($this->ass->hasPeerReviewAccess((int)$_GET["member_id"]))
{
$this->checkPermission("read");
$user_id = (int)$_GET["member_id"];
$cancel_cmd = "editPeerReview";
// rating
$add_rating = "updatePeerReviewText";
$ilCtrl->setParameter($this, "peer_id", $user_id);
include_once './Services/Rating/classes/class.ilRatingGUI.php';
$rating = new ilRatingGUI();
$rating->setObject($this->ass->getId(), "ass", $user_id, "peer");
$rating->setUserId($ilUser->getId());
$rating = '<div id="rtr_widget">'.$rating->getHTML(false, true,
"il.ExcPeerReview.saveSingleRating(".$user_id.", %rating%)").'</div>';
$ilCtrl->setParameter($this, "ssrtg", 1);
$tpl->addJavaScript("Modules/Exercise/js/ilExcPeerReview.js");
$tpl->addOnLoadCode("il.ExcPeerReview.setAjax('".
$ilCtrl->getLinkTarget($this, "updatePeerReviewComments", "", true, false).
"')");
$ilCtrl->setParameter($this, "ssrtg", "");
}
// personal
else
{
$this->checkPermission("read");
$user_id = $ilUser->getId();
$cancel_cmd = "showOverview";
}
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, $cancel_cmd));
$a_form = $this->initAssignmentTextForm($this->ass, true, $cancel_cmd, $add_rating, $rating);
if(($user_id != $ilUser->getId() || (bool)$_GET["grd"]))
{
if(!stristr($cancel_cmd, "peer"))
{
include_once "Services/User/classes/class.ilUserUtil.php";
$a_form->setDescription(ilUserUtil::getNamePresentation($user_id));
}
else
{
if(!$this->ass->hasPeerReviewPersonalized())
{
$a_form->setDescription($lng->txt("id").": ".(int)$_GET["seq"]);
}
else
{
include_once "Services/User/classes/class.ilUserUtil.php";
$a_form->setDescription(ilUserUtil::getNamePresentation($user_id));
}
foreach($this->ass->getPeerReviewsByPeerId($user_id) as $item)
{
if($item["giver_id"] == $ilUser->getId())
{
$a_form->getItemByPostVar("comm")->setValue($item["pcomment"]);
break;
}
}
}
}
$files = ilExAssignment::getDeliveredFiles($this->ass->getExerciseId(), $this->ass->getId(), $user_id);
if($files)
{
$files = array_shift($files);
if(trim($files["atext"]))
{
$text = $a_form->getItemByPostVar("atxt");
// mob id to mob src
$text->setValue(ilRTE::_replaceMediaObjectImageSrc($files["atext"], 1));
}
}
$this->tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::showGradesOverviewObject ( )

Show grades overview.

Definition at line 1325 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$tree, addSubmissionSubTabs(), and ilObjectGUI\checkPermission().

{
global $rbacsystem, $tree, $tpl, $ilToolbar, $ilCtrl, $ilTabs, $lng;
$this->checkPermission("write");
$ilTabs->activateTab("grades");
$this->addSubmissionSubTabs("grades");
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$mem_obj = new ilExerciseMembers($this->object);
$mems = $mem_obj->getMembers();
if (count($mems) > 0)
{
$ilToolbar->addButton($lng->txt("exc_export_excel"),
$ilCtrl->getLinkTarget($this, "exportExcel"));
}
include_once("./Modules/Exercise/classes/class.ilExGradesTableGUI.php");
$grades_tab = new ilExGradesTableGUI($this, "showGradesOverview",
$this->object, $mem_obj);
$tpl->setContent($grades_tab->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::showMultiFeedbackConfirmationTableObject ( )

Show multi feedback confirmation table.

Parameters
@return

Definition at line 4768 of file class.ilObjExerciseGUI.php.

References $_GET, $tab, ilObjectGUI\$tpl, addSubmissionSubTabs(), and ilObjectGUI\checkPermission().

{
global $ilTabs, $tpl;
$ilTabs->activateTab("grades");
$this->checkPermission("write");
$this->addSubmissionSubTabs("assignment");
$ass = new ilExAssignment((int) $_GET["ass_id"]);
include_once("./Modules/Exercise/classes/class.ilFeedbackConfirmationTable2GUI.php");
$tab = new ilFeedbackConfirmationTable2GUI($this, "showMultiFeedbackConfirmationTable", $ass);
$tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::showMultiFeedbackObject ( ilPropertyFormGUI  $a_form = null)

Show multi-feedback screen.

Parameters
@return

Definition at line 4697 of file class.ilObjExerciseGUI.php.

References $_GET, ilObjectGUI\$lng, ilObjectGUI\$tpl, addSubmissionSubTabs(), ilObjectGUI\checkPermission(), ilLinkButton\getInstance(), initMultiFeedbackForm(), and ilUtil\sendInfo().

Referenced by uploadMultiFeedbackObject().

{
global $ilTabs, $ilToolbar, $lng, $tpl;
$ass_id = (int)$_GET["ass_id"];
ilUtil::sendInfo($lng->txt("exc_multi_feedb_info"));
$ilTabs->activateTab("grades");
$this->checkPermission("write");
$this->addSubmissionSubTabs("assignment");
// #13719
include_once("./Services/UIComponent/Button/classes/class.ilLinkButton.php");
$button->setCaption("exc_download_zip_structure");
$button->setUrl($this->ctrl->getLinkTarget($this, "downloadMultiFeedbackZip"));
$button->setOmitPreventDoubleSubmission(true);
$ilToolbar->addButtonInstance($button);
if(!$a_form)
{
$a_form = $this->initMultiFeedbackForm($ass_id);
}
$tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::showOverviewObject ( )

Show overview of assignments.

Definition at line 2953 of file class.ilObjExerciseGUI.php.

References $_GET, $ilUser, ilObjectGUI\$tpl, ilCertificate\_isComplete(), ilLearningProgress\_tracProgress(), addContentSubTabs(), ilObjectGUI\checkPermission(), and ilExAssignment\getAssignmentDataOfExercise().

Referenced by outCertificateObject().

{
global $tpl, $ilTabs, $ilUser, $ilToolbar;
$this->checkPermission("read");
include_once("./Services/Tracking/classes/class.ilLearningProgress.php");
ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),
$this->object->getRefId(), 'exc');
$ilTabs->activateTab("content");
$this->addContentSubTabs("content");
// show certificate?
if($this->object->hasUserCertificate($ilUser->getId()))
{
include_once "./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
include_once "./Services/Certificate/classes/class.ilCertificate.php";
$adapter = new ilExerciseCertificateAdapter($this->object);
{
$ilToolbar->addButton($this->lng->txt("certificate"),
$this->ctrl->getLinkTarget($this, "outCertificate"));
}
}
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
$acc = new ilAccordionGUI();
$acc->setId("exc_ow_".$this->object->getId());
$ass_data = ilExAssignment::getAssignmentDataOfExercise($this->object->getId());
include_once("./Modules/Exercise/classes/class.ilExAssignmentGUI.php");
$ass_gui = new ilExAssignmentGUI($this->object);
foreach ($ass_data as $ass)
{
// incoming assignment deeplink
$force_open = false;
if(isset($_GET["ass_id_goto"]) &&
(int)$_GET["ass_id_goto"] == $ass["id"])
{
$force_open = true;
}
$acc->addItem($ass_gui->getOverviewHeader($ass),
$ass_gui->getOverviewBody($ass),
$force_open);
}
if (count($ass_data) < 2)
{
$acc->setBehaviour("FirstOpen");
}
else
{
$acc->setUseSessionStorage(true);
}
$tpl->setContent($acc->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::showParticipantObject ( )

Show Participant.

Definition at line 1238 of file class.ilObjExerciseGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, $options, $si, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilObjUser\_lookupName(), ilObject\_lookupType(), addSubmissionSubTabs(), ilObjectGUI\checkPermission(), ilExAssignment\getAssignmentDataOfExercise(), ilUtil\sendInfo(), and ilUtil\sortArray().

Referenced by selectParticipantObject().

{
global $rbacsystem, $tree, $tpl, $ilToolbar, $ilCtrl, $ilTabs, $lng;
$this->checkPermission("write");
$ilTabs->activateTab("grades");
$this->addSubmissionSubTabs("participant");
// participant selection
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$ass = ilExAssignment::getAssignmentDataOfExercise($this->object->getId());
$members = $this->object->members_obj->getMembers();
if (count($members) == 0)
{
ilUtil::sendInfo($lng->txt("exc_no_participants"));
return;
}
$mems = array();
foreach ($members as $mem_id)
{
if (ilObject::_lookupType($mem_id) == "usr")
{
include_once("./Services/User/classes/class.ilObjUser.php");
$name = ilObjUser::_lookupName($mem_id);
$mems[$mem_id] = $name;
}
}
$mems = ilUtil::sortArray($mems, "lastname", "asc", false, true);
if ($_GET["part_id"] == "" && count($mems) > 0)
{
$_GET["part_id"] = key($mems);
}
reset($mems);
if (count($mems) > 1)
{
$options = array();
foreach ($mems as $k => $m)
{
$options[$k] =
$m["lastname"].", ".$m["firstname"]." [".$m["login"]."]";
}
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$si = new ilSelectInputGUI($this->lng->txt(""), "part_id");
$si->setOptions($options);
$si->setValue($_GET["part_id"]);
$ilToolbar->addInputItem($si);
$ilToolbar->setFormAction($ilCtrl->getFormAction($this));
$ilToolbar->addFormButton($this->lng->txt("exc_select_part"),
"selectParticipant");
}
if (count($mems) > 0)
{
include_once("./Modules/Exercise/classes/class.ilExParticipantTableGUI.php");
$part_tab = new ilExParticipantTableGUI($this, "showParticipant",
$this->object, $_GET["part_id"]);
$tpl->setContent($part_tab->getHTML());
}
else
{
ilUtil::sendInfo($this->lng->txt("exc_no_assignments_available"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::showPeerReviewOverviewObject ( )

Definition at line 4559 of file class.ilObjExerciseGUI.php.

References $ilCtrl, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and ilPanelGUI\getInstance().

{
global $ilCtrl, $ilTabs, $tpl;
if(!$this->ass ||
!$this->ass->getPeerReview())
{
$ilCtrl->redirect($this, "showOverview");
}
$this->checkPermission("write");
$ilTabs->clearTargets();
$ilTabs->setBackTarget($this->lng->txt("back"),
$ilCtrl->getLinkTarget($this, "listAssignments"));
include_once "Modules/Exercise/classes/class.ilExAssignmentPeerReviewOverviewTableGUI.php";
$tbl = new ilExAssignmentPeerReviewOverviewTableGUI($this, "showPeerReviewOverview",
$this->ass);
$panel = "";
$panel_data = $tbl->getPanelInfo();
if(sizeof($panel_data))
{
$ptpl = new ilTemplate("tpl.exc_peer_review_overview_panel.html", true, true, "Modules/Exercise");
foreach($panel_data as $item)
{
$ptpl->setCurrentBlock("user_bl");
foreach($item["value"] as $user)
{
$ptpl->setVariable("USER", $user);
$ptpl->parseCurrentBlock();
}
$ptpl->setCurrentBlock("item_bl");
$ptpl->setVariable("TITLE", $item["title"]);
$ptpl->parseCurrentBlock();
}
include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
$panel->setHeading($this->lng->txt("exc_peer_review_overview_invalid_users"));
$panel->setBody($ptpl->get());
$panel = $panel->getHTML();
}
$tpl->setContent($tbl->getHTML().$panel);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::showPersonalPeerReviewObject ( )

Definition at line 4504 of file class.ilObjExerciseGUI.php.

References $_GET, $ilCtrl, $ilUser, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and ilUtil\sendFailure().

{
global $ilCtrl, $ilUser, $tpl;
if(!$this->ass ||
!$this->ass->getPeerReview() ||
!$this->ass->getDeadline() ||
$this->ass->getDeadline()-time() > 0)
{
$ilCtrl->redirect($this, "showOverview");
}
// tutor
if((int)$_GET["grd"])
{
$this->checkPermission("write");
if((int)$_GET["grd"] == 1)
{
$user_id = (int)$_GET["member_id"];
$cancel_cmd = "members";
}
else
{
$user_id = (int)$_GET["part_id"];
$cancel_cmd = "showParticipant";
}
}
// personal
else
{
$this->checkPermission("read");
$user_id = $ilUser->getId();
$cancel_cmd = "showOverview";
}
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, $cancel_cmd));
$peer_items = $this->ass->getPeerReviewsByPeerId($user_id, true);
if(!sizeof($peer_items))
{
// #11373
ilUtil::sendFailure($this->lng->txt("exc_peer_review_no_peers_reviewed_yet"), true);
$ilCtrl->redirect($this, "showOverview");
}
include_once "Modules/Exercise/classes/class.ilExAssignmentPeerReviewTableGUI.php";
$tbl = new ilExAssignmentPeerReviewTableGUI($this, "editPeerReview",
$this->ass, $user_id, $peer_items, "exc_peer_review_show", $cancel_cmd, true);
$tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::showTeamLogObject ( )

Definition at line 3911 of file class.ilObjExerciseGUI.php.

References $_GET, addSubmissionSubTabs(), ilObjectGUI\checkPermission(), and ilExAssignment\getTeamIdByAssignment().

{
$this->checkPermission("write");
$this->tabs_gui->activateTab("grades");
if(isset($_GET["lmem"]))
{
$this->addSubmissionSubTabs("assignment");
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "members"));
$team_id = ilExAssignment::getTeamIdByAssignment($this->ass->getId(), (int)$_GET["lmem"]);
$this->ctrl->saveParameter($this, "lmem");
}
else
{
$this->addSubmissionSubTabs("participant");
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "showParticipant"));
$team_id = ilExAssignment::getTeamIdByAssignment($this->ass->getId(), (int)$_GET["lpart"]);
$this->ctrl->saveParameter($this, "lpart");
}
include_once "Modules/Exercise/classes/class.ilExAssignmentTeamLogTableGUI.php";
$tbl = new ilExAssignmentTeamLogTableGUI($this, "showTeamLog",
$team_id);
$this->tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::submissionScreenObject ( )

Displays a form which allows members to deliver their solutions.

public

Definition at line 456 of file class.ilObjExerciseGUI.php.

References $_GET, $tab, initTeamSubmission(), and ilUtil\sendInfo().

{
global $ilToolbar;
$this->initTeamSubmission("showOverview", false);
$this->tabs_gui->activateTab("submissions");
// $this->tabs_gui->setTabActive("content");
// $this->addContentSubTabs("content");
if (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0))
{
ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
}
else
{
$ilToolbar->addButton($this->lng->txt("file_add"),
$this->ctrl->getLinkTarget($this, "uploadForm"));
$ilToolbar->addButton($this->lng->txt("header_zip"),
$this->ctrl->getLinkTarget($this, "uploadZipForm"));
}
include_once("./Modules/Exercise/classes/class.ilExcDeliveredFilesTableGUI.php");
$tab = new ilExcDeliveredFilesTableGUI($this, "submissionScreen", $this->object, $_GET["ass_id"]);
$this->tpl->setContent($tab->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::submissionScreenTeamLogObject ( )

Definition at line 3879 of file class.ilObjExerciseGUI.php.

References initTeamSubmission().

{
$team_id = $this->initTeamSubmission("showOverview");
$this->tabs_gui->activateTab("log");
include_once "Modules/Exercise/classes/class.ilExAssignmentTeamLogTableGUI.php";
$tbl = new ilExAssignmentTeamLogTableGUI($this, "submissionScreenTeamLog",
$team_id);
$this->tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

ilObjExerciseGUI::submissionScreenTeamObject ( )

Displays a form which allows members to manage team uploads.

public

Definition at line 3659 of file class.ilObjExerciseGUI.php.

References ilRepositorySearchGUI\fillAutoCompleteToolbar(), initTeamSubmission(), ilExAssignmentTeamTableGUI\MODE_EDIT, and ilUtil\sendInfo().

Referenced by addUserFromAutoCompleteObject().

{
global $ilToolbar;
$team_id = $this->initTeamSubmission("showOverview");
// $this->tabs_gui->setTabActive("content");
// $this->addContentSubTabs("content");
// #13414
$read_only = (mktime() > $this->ass->getDeadline() && ($this->ass->getDeadline() != 0));
if ($read_only)
{
ilUtil::sendInfo($this->lng->txt("exercise_time_over"));
}
else
{
$this->ctrl->setParameterByClass('ilRepositorySearchGUI', 'ctx', 1);
$this->ctrl->setParameter($this, 'ctx', 1);
// add member
include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
$this,
$ilToolbar,
array(
'auto_complete_name' => $this->lng->txt('user'),
'submit_name' => $this->lng->txt('add'),
'add_search' => true,
'add_from_container' => $this->object->getRefId()
)
);
}
include_once "Modules/Exercise/classes/class.ilExAssignmentTeamTableGUI.php";
$tbl = new ilExAssignmentTeamTableGUI($this, "submissionScreenTeam",
ilExAssignmentTeamTableGUI::MODE_EDIT, $team_id, $this->ass, null, $read_only);
$this->tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::submitBlog (   $a_blog_id)

Submit blog for assignment.

Parameters
int$a_blog_id
Returns
bool

Definition at line 3302 of file class.ilObjExerciseGUI.php.

References $file, $ilUser, $size, removeExistingSubmissions(), sendNotifications(), and ilObject2GUI\WORKSPACE_NODE_ID.

Referenced by directSubmitObject().

{
global $ilUser;
if($this->object && $this->ass)
{
$blog_id = $a_blog_id;
include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
$blog_gui = new ilObjBlogGUI($blog_id, ilObjBlogGUI::WORKSPACE_NODE_ID);
if($blog_gui->object)
{
$file = $blog_gui->buildExportFile();
$size = filesize($file);
if($size)
{
$meta = array(
"name" => $blog_id,
"tmp_name" => $file,
"size" => $size
);
$this->object->deliverFile($meta, $this->ass->getId(), $ilUser->getId(), true);
$this->sendNotifications($this->ass->getId());
$this->object->handleSubmission($this->ass->getId());
return true;
}
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::submitPortfolio (   $a_portfolio_id)

Submit portfolio for assignment.

Parameters
int$a_portfolio_id
Returns
bool

Definition at line 3342 of file class.ilObjExerciseGUI.php.

References $file, $ilUser, $size, removeExistingSubmissions(), and sendNotifications().

Referenced by directSubmitObject().

{
global $ilUser;
if($this->object && $this->ass)
{
$prtf_id = $a_portfolio_id;
include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
$prtf = new ilObjPortfolio($prtf_id, false);
if($prtf->getTitle())
{
include_once "Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
$export = new ilPortfolioHTMLExport(null, $prtf);
$file = $export->buildExportFile();
$size = filesize($file);
if($size)
{
$meta = array(
"name" => $prtf_id,
"tmp_name" => $file,
"size" => $size
);
$this->object->deliverFile($meta, $this->ass->getId(), $ilUser->getId(), true);
$this->sendNotifications($this->ass->getId());
$this->object->handleSubmission($this->ass->getId());
return true;
}
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::updateAssignmentObject ( )

Update assignment.

Definition at line 2638 of file class.ilObjExerciseGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, $valid, addContentSubTabs(), ilObjectGUI\checkPermission(), ilExAssignment\FEEDBACK_DATE_DEADLINE, handleDisabledAssignmentFields(), IL_CAL_UNIX, initAssignmentForm(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilExAssignment\TYPE_UPLOAD_TEAM.

{
global $tpl, $lng, $ilCtrl, $ilTabs;
$this->checkPermission("write");
$ilTabs->activateTab("content");
$this->addContentSubTabs("list_assignments");
include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
$ass = new ilExAssignment($_GET["ass_id"]);
$this->initAssignmentForm("edit");
if ($this->form->checkInput())
{
// #14450
$protected_peer_review_groups = false;
if($ass->getPeerReview() &&
$ass->hasPeerReviewGroups())
{
$protected_peer_review_groups = true;
// checkInput() will add alert to disabled fields
$this->form->getItemByPostVar("deadline")->setAlert(null);
$this->form->getItemByPostVar("peer_min")->setAlert(null);
}
// additional checks
$valid = true;
if(!$protected_peer_review_groups)
{
$peer = $_POST["peer"];
if ($_POST["deadline_cb"])
{
$end_date =
$this->form->getItemByPostVar("deadline")->getDate()->get(IL_CAL_UNIX);
}
if ($_POST["start_time_cb"] && $end_date)
{
// check whether start date is before end date
$start_date =
$this->form->getItemByPostVar("start_time")->getDate()->get(IL_CAL_UNIX);
if ($start_date >= $end_date)
{
$this->form->getItemByPostVar("start_time")
->setAlert($lng->txt("exc_start_date_should_be_before_end_date"));
$this->form->getItemByPostVar("deadline")
->setAlert($lng->txt("exc_start_date_should_be_before_end_date"));
$valid = false;
}
}
if(!$end_date)
{
if($_POST["peer"])
{
$this->form->getItemByPostVar("peer")
->setAlert($lng->txt("exc_needs_deadline"));
$valid = false;
}
{
$this->form->getItemByPostVar("fb")
->setAlert($lng->txt("exc_needs_deadline"));
$valid = false;
}
}
}
else
{
$peer = true;
$end_date = $ass->getDeadline();
}
$peer &&
$_POST["peer_dl_tgl"])
{
$peer_dl = $this->form->getItemByPostVar("peer_dl")->getDate();
$peer_dl = $peer_dl->get(IL_CAL_UNIX);
// #13877
if ($peer_dl < $end_date)
{
$this->form->getItemByPostVar("peer_dl")
->setAlert($lng->txt("exc_peer_deadline_mismatch"));
$valid = false;
}
}
if(!$valid)
{
ilUtil::sendFailure($lng->txt("form_input_not_valid"));
$this->form->setValuesByPost();
$this->handleDisabledAssignmentFields($ass, $this->form);
$tpl->setContent($this->form->getHtml());
return;
}
$ass->setTitle($_POST["title"]);
$ass->setInstruction($_POST["instruction"]);
$ass->setExerciseId($this->object->getId());
$ass->setMandatory($_POST["mandatory"]);
$ass->setType($_POST["type"]);
if ($_POST["start_time_cb"])
{
$date =
$this->form->getItemByPostVar("start_time")->getDate();
$ass->setStartTime($date->get(IL_CAL_UNIX));
}
else
{
$ass->setStartTime(null);
}
if(!$protected_peer_review_groups)
{
// deadline
if ($_POST["deadline_cb"])
{
$date = $this->form->getItemByPostVar("deadline")->getDate();
$ass->setDeadline($date->get(IL_CAL_UNIX));
}
else
{
$ass->setDeadline(null);
}
{
$ass->setPeerReview($_POST["peer"]);
$ass->setPeerReviewMin($_POST["peer_min"]);
$ass->setPeerReviewFileUpload($_POST["peer_file"]);
if($ass->getDeadline() && $ass->getDeadline() > time())
{
$ass->setPeerReviewPersonalized($_POST["peer_prsl"]);
}
}
}
if($_POST["peer_dl_tgl"])
{
$peer_dl = $this->form->getItemByPostVar("peer_dl")->getDate();
$ass->setPeerReviewDeadline($peer_dl->get(IL_CAL_UNIX));
}
else
{
$ass->setPeerReviewDeadline(null);
}
if(!$_POST["fb"] ||
$this->form->getItemByPostVar("fb_file")->getDeletionFlag())
{
$ass->deleteFeedbackFile();
$ass->setFeedbackFile(null);
}
else if($_FILES["fb_file"]["tmp_name"]) // #15189
{
$ass->handleFeedbackFileUpload($_FILES["fb_file"]);
}
$ass->setFeedbackCron($_POST["fb_cron"]); // #13380
$ass->setFeedbackDate($_POST["fb_date"]);
$ass->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "editAssignment");
}
else
{
$this->form->setValuesByPost();
$this->handleDisabledAssignmentFields($ass, $this->form);
$tpl->setContent($this->form->getHtml());
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::updateAssignmentTextAndReturnObject ( )

Definition at line 4066 of file class.ilObjExerciseGUI.php.

References updateAssignmentTextObject().

{
}

+ Here is the call graph for this function:

ilObjExerciseGUI::updateAssignmentTextObject (   $a_return = false)

Definition at line 4071 of file class.ilObjExerciseGUI.php.

References $ilCtrl, $ilUser, $mobs, ilObjMediaObject\_exists(), ilRTE\_getMediaObjects(), ilObjAdvancedEditing\_getUsedHTMLTags(), ilObjMediaObject\_removeUsage(), ilRTE\_replaceMediaObjectImageSrc(), ilObjMediaObject\_saveUsage(), ilObjectGUI\checkPermission(), editAssignmentTextObject(), ilExAssignment\getDeliveredFiles(), initAssignmentTextForm(), ilUtil\sendFailure(), sendNotifications(), ilUtil\sendSuccess(), and ilExAssignment\TYPE_TEXT.

Referenced by updateAssignmentTextAndReturnObject().

{
global $ilCtrl, $ilUser;
$times_up = ($this->ass->getDeadline() && $this->ass->getDeadline() - time() < 0);
if(!$this->ass ||
$this->ass->getType() != ilExAssignment::TYPE_TEXT ||
$times_up)
{
if($times_up)
{
ilUtil::sendFailure($this->lng->txt("exercise_time_over"), true);
}
$ilCtrl->redirect($this, "showOverview");
}
$this->checkPermission("read");
$form = $this->initAssignmentTextForm($this->ass);
// we are not using a purifier, so we have to set the valid RTE tags
// :TODO:
include_once("./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
$rte = $form->getItemByPostVar("atxt");
$rte->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("exc_ass"));
if($form->checkInput())
{
$text = trim($form->getInput("atxt"));
$existing = (bool)ilExAssignment::getDeliveredFiles($this->ass->getExerciseId(),
$this->ass->getId(), $ilUser->getId());
$returned_id = $this->object->updateTextSubmission(
$this->ass->getExerciseId(),
$this->ass->getId(),
$ilUser->getId(),
// mob src to mob id
// no empty text
if($returned_id)
{
if(!$existing)
{
// #14332 - new text
$this->sendNotifications($this->ass->getId());
$this->object->handleSubmission($this->ass->getId());
}
// mob usage
include_once "Services/MediaObjects/classes/class.ilObjMediaObject.php";
foreach($mobs as $mob)
{
{
ilObjMediaObject::_removeUsage($mob, 'exca~:html', $ilUser->getId());
ilObjMediaObject::_saveUsage($mob, 'exca:html', $returned_id);
}
}
}
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
if($a_return)
{
$ilCtrl->redirect($this, "showOverview");
}
else
{
$ilCtrl->redirect($this, "editAssignmentText");
}
}
$form->setValuesByPost();
$this->editAssignmentTextObject($form);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExerciseGUI::updateCustom ( ilPropertyFormGUI  $a_form)
protected

Insert custom update form values into object.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjectGUI.

Definition at line 869 of file class.ilObjExerciseGUI.php.

References $ilUser, ilPropertyFormGUI\getInput(), ilNotification\setNotification(), and ilNotification\TYPE_EXERCISE_SUBMISSION.

{
global $ilUser;
$this->object->setShowSubmissions($a_form->getInput("show_submissions"));
$this->object->setPassMode($a_form->getInput("pass_mode"));
if ($this->object->getPassMode() == "nr")
{
$this->object->setPassNr($a_form->getInput("pass_nr"));
}
$this->object->setCompletionBySubmission($a_form->getInput('completion_by_submission') == 1 ? true : false);
include_once "./Services/Notification/classes/class.ilNotification.php";
$ilUser->getId(), $this->object->getId(),
(bool)$a_form->getInput("notification"));
}

+ Here is the call graph for this function:

ilObjExerciseGUI::updateMembersObject ( )

update data of members table

Definition at line 923 of file class.ilObjExerciseGUI.php.

References $_POST, ilObjectGUI\checkPermission(), deassignMembersObject(), exit, redirectFeedbackMailObject(), saveStatusObject(), and sendMembersObject().

{
global $rbacsystem;
$this->checkPermission("write");
if ($_POST["downloadReturned"])
{
$this->object->members_obj->deliverReturnedFiles(key($_POST["downloadReturned"]));
}
else
{
switch($_POST["action"])
{
case "save_status":
$this->saveStatusObject();
break;
case "send_member":
break;
case "redirectFeedbackMail":
break;
case "delete_member":
break;
}
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::updatePeerReviewCommentsObject ( )

Definition at line 4385 of file class.ilObjExerciseGUI.php.

References $_POST, $_REQUEST, $ilCtrl, $ilUser, ilObjectGUI\$tpl, canPeerReviewBeEdited(), exit, ilUtil\stripSlashes(), and ilRating\writeRatingForUserAndObject().

{
global $ilCtrl, $ilUser, $tpl;
if(!$this->canPeerReviewBeEdited() ||
!sizeof($_POST["pc"]) ||
!$ilCtrl->isAsynch())
{
exit();
}
$rating_peer_id = $_POST["rating_peer_id"];
$giver_id = $ilUser->getId();
// save rating
include_once './Services/Rating/classes/class.ilRating.php';
ilRating::writeRatingForUserAndObject($this->ass->getId(), "ass",
$rating_peer_id, "peer", $giver_id, $_POST["rating"]);
// save comments
foreach($_POST["pc"] as $peer_id => $value)
{
if($peer_id)
{
$this->ass->updatePeerReviewComment($peer_id, ilUtil::stripSlashes($value)); // #16128
}
}
// render current rating
$ilCtrl->setParameter($this->parent_obj, "peer_id", $rating_peer_id);
include_once './Services/Rating/classes/class.ilRatingGUI.php';
$rating = new ilRatingGUI();
$rating->setObject($this->ass->getId(), "ass", $rating_peer_id, "peer");
$rating->setUserId($giver_id);
if(!$_REQUEST["ssrtg"])
{
echo $rating->getHTML(false, true,
"il.ExcPeerReview.saveComments(".$rating_peer_id.", %rating%)");
}
else
{
echo '<div id="rtr_widget">'.$rating->getHTML(false, true,
"il.ExcPeerReview.saveSingleRating(".$rating_peer_id.", %rating%)").'</div>';
}
echo $tpl->getOnLoadCodeForAsynch();
exit();
}

+ Here is the call graph for this function:

ilObjExerciseGUI::updatePeerReviewObject ( )

Definition at line 4353 of file class.ilObjExerciseGUI.php.

References $_POST, $ilCtrl, $ilUser, canPeerReviewBeEdited(), ilObjectGUI\checkPermission(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\stripSlashes().

{
global $ilUser, $ilCtrl;
if(!$this->canPeerReviewBeEdited() ||
!sizeof($_POST["pc"]))
{
$ilCtrl->redirect($this, "showOverview");
}
$this->checkPermission("read");
$peer_items = $this->ass->getPeerReviewsByGiver($ilUser->getId());
if(!sizeof($peer_items))
{
ilUtil::sendFailure($this->lng->txt("exc_peer_review_no_peers"), true);
$ilCtrl->redirect($this, "showOverview");
}
foreach($_POST["pc"] as $idx => $value)
{
$parts = explode("__", $idx);
if($parts[0] == $ilUser->getId())
{
$this->ass->updatePeerReviewComment($parts[1], ilUtil::stripSlashes($value)); // #16128
}
}
ilUtil::sendInfo($this->lng->txt("exc_peer_review_updated"), true);
$ilCtrl->redirect($this, "editPeerReview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::updatePeerReviewTextObject ( )

Definition at line 4438 of file class.ilObjExerciseGUI.php.

References $_POST, $_REQUEST, $ilCtrl, canPeerReviewBeEdited(), ilUtil\sendInfo(), and ilUtil\stripSlashes().

{
global $ilCtrl;
if(!$this->canPeerReviewBeEdited() ||
!(int)$_REQUEST["peer_id"])
{
$ilCtrl->redirect($this, "editPeerReview");
}
$this->ass->updatePeerReviewComment((int)$_REQUEST["peer_id"], ilUtil::stripSlashes(trim($_POST["comm"]))); // #16128
ilUtil::sendInfo($this->lng->txt("exc_peer_review_updated"), true);
$ilCtrl->redirect($this, "editPeerReview");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::uploadFileObject ( )

Definition at line 906 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\checkPermission(), and ilUtil\sendFailure().

{
global $rbacsystem;
$this->checkPermission("write");
if(!$this->object->addUploadedFile($_FILES["file"]))
{
ilUtil::sendFailure($this->lng->txt("exc_upload_error"),true);
}
$this->ctrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::uploadFormObject ( )

Display form for single file upload.

Definition at line 487 of file class.ilObjExerciseGUI.php.

References initUploadForm().

{
if (mktime() < $this->ass->getDeadline() || ($this->ass->getDeadline() == 0))
{
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "submissionScreen"));
global $ilHelp;
$ilHelp->setScreenIdComponent("exc");
$ilHelp->setScreenId("upload_submission");
$this->initUploadForm();
$this->tpl->setContent($this->form->getHTML());
}
else
{
$this->ctrl->redirect($this, "submissionScreen");
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::uploadMultiFeedbackObject ( )

Upload multi feedback file.

Definition at line 4737 of file class.ilObjExerciseGUI.php.

References $_GET, initMultiFeedbackForm(), ilUtil\sendFailure(), showMultiFeedbackObject(), and ilUtil\stripSlashesArray().

{
$ass_id = (int)$_GET["ass_id"];
// #11983
$form = $this->initMultiFeedbackForm($ass_id);
if($form->checkInput())
{
try
{
$ass = new ilExAssignment($ass_id);
$ass->uploadMultiFeedbackFile(ilUtil::stripSlashesArray($_FILES["mfzip"]));
$this->ctrl->redirect($this, "showMultiFeedbackConfirmationTable");
}
{
ilUtil::sendFailure($e->getMessage(), true);
$this->ctrl->redirect($this, "showMultiFeedback");
}
}
$form->setValuesByPost();
$this->showMultiFeedbackObject($form);
}

+ Here is the call graph for this function:

ilObjExerciseGUI::uploadZipFormObject ( )

Display form for zip file upload.

Definition at line 511 of file class.ilObjExerciseGUI.php.

References initZipUploadForm().

{
if (mktime() < $this->ass->getDeadline() || ($this->ass->getDeadline() == 0))
{
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "submissionScreen"));
$this->tpl->setContent($this->form->getHTML());
}
else
{
$this->ctrl->redirect($this, "submissionScreen");
}
}

+ Here is the call graph for this function:

ilObjExerciseGUI::uploadZipObject ( )

Definition at line 892 of file class.ilObjExerciseGUI.php.

References ilObjectGUI\checkPermission(), and ilUtil\sendFailure().

{
global $rbacsystem;
$this->checkPermission("write");
if(!$this->object->addUploadedFile($_FILES["zipfile"], true))
{
ilUtil::sendFailure($this->lng->txt("exc_upload_error"),true);
}
$this->ctrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjExerciseGUI::viewObject ( )

list childs of current object

public

Reimplemented from ilObjectGUI.

Definition at line 326 of file class.ilObjExerciseGUI.php.

References infoScreenObject().

{
$this->infoScreenObject();
}

+ Here is the call graph for this function:


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