4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
    5include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
 
    6include_once(
"./Modules/Exercise/classes/class.ilExAssignmentTeam.php");
 
    7include_once(
"./Services/UIComponent/Modal/classes/class.ilModalGUI.php");
 
   29        protected $cols_default = array(
"image", 
"login", 
"submission_date", 
"idl");
 
   30        protected $cols_order = array(
"image", 
"name", 
"login", 
"team_members", 
 
   31                        "sent_time", 
"submission", 
"idl", 
"status", 
"mark", 
"status_time", 
 
   32                        "feedback_time", 
"comment", 
"notice");
 
   51                parent::__construct($a_parent_obj, $a_parent_cmd);              
 
   56                $this->
setRowTemplate(
"tpl.exc_members_row.html", 
"Modules/Exercise");          
 
   68                foreach($this->cols_order as $id)
 
   70                        if(in_array($id, $this->cols_mandatory) ||
 
   71                                in_array($id, $selected))
 
   81                $this->
addColumn($this->lng->txt(
"actions"));
 
   86                $this->
addMultiCommand(
"saveStatusSelected", $this->lng->txt(
"exc_save_selected"));
 
   91                if ($this->mode == self::MODE_BY_ASSIGNMENT &&
 
   92                        $this->ass->hasActiveIDl() &&
 
   93                        !$this->ass->hasReadOnlyIDl())
 
   95                        $this->
addMultiCommand(
"setIndividualDeadline", $this->lng->txt(
"exc_individual_deadline_action"));
 
   98                if($this->exc->hasTutorFeedbackMail() &&
 
   99                        $this->mode == self::MODE_BY_ASSIGNMENT)
 
  101                        $this->
addMultiCommand(
"redirectFeedbackMail", $this->lng->txt(
"exc_tbl_action_feedback_mail"));
 
  104                $this->
addMultiCommand(
"sendMembers", $this->lng->txt(
"exc_send_assignment"));
 
  106                if($this->mode == self::MODE_BY_ASSIGNMENT &&
 
  108                        $this->ass->hasTeam())
 
  110                        $this->
addMultiCommand(
"createTeams", $this->lng->txt(
"exc_team_multi_create"));
 
  111                        $this->
addMultiCommand(
"dissolveTeams", $this->lng->txt(
"exc_team_multi_dissolve"));
 
  114                if($this->mode == self::MODE_BY_ASSIGNMENT)
 
  116                        $this->
addMultiCommand(
"confirmDeassignMembers", $this->lng->txt(
"exc_deassign_members"));      
 
  125                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";                       
 
  130                if($this->mode == self::MODE_BY_ASSIGNMENT)
 
  132                        $item = $this->
addFilterItemByMetaType(
"flt_name", self::FILTER_TEXT, 
false, $this->lng->txt(
"name").
" / ".$this->lng->txt(
"login"));
 
  133                        $this->filter[
"name"] = $item->getValue();                              
 
  136                $this->lng->loadLanguageModule(
"search");
 
  138                        "" => $this->lng->txt(
"search_any"),
 
  139                        "notgraded" => $this->lng->txt(
"exc_notgraded"),
 
  140                        "passed" => $this->lng->txt(
"exc_passed"),
 
  141                        "failed" => $this->lng->txt(
"exc_failed")               
 
  143                $item = $this->
addFilterItemByMetaType(
"flt_status", self::FILTER_SELECT, 
false, $this->lng->txt(
"exc_tbl_status"));
 
  145                $this->filter[
"status"] = $item->getValue();            
 
  148                        "" => $this->lng->txt(
"search_any"),
 
  149                        "y" => $this->lng->txt(
"exc_tbl_filter_has_submission"),
 
  150                        "n" => $this->lng->txt(
"exc_tbl_filter_has_no_submission")      
 
  152                $item = $this->
addFilterItemByMetaType(
"flt_subm", self::FILTER_SELECT, 
false, $this->lng->txt(
"exc_tbl_filter_submission"));
 
  154                $this->filter[
"subm"] = $item->getValue();              
 
  168                foreach($this->cols_order as $id)
 
  170                        if(in_array($id, $this->cols_mandatory))
 
  181                                        "default" => in_array($id, $this->cols_default)
 
  193                $cols[
"submission"] = array($this->lng->txt(
"exc_tbl_submission_date"), 
"submission");                  
 
  195                $cols[
"status"] = array($this->lng->txt(
"exc_tbl_status"), 
"status"); 
 
  196                $cols[
"mark"] = array($this->lng->txt(
"exc_tbl_mark"), 
"mark");                 
 
  197                $cols[
"status_time"] = array($this->lng->txt(
"exc_tbl_status_time"), 
"status_time");    
 
  199                $cols[
"sent_time"] = array($this->lng->txt(
"exc_tbl_sent_time"), 
"sent_time");   
 
  201                if($this->exc->hasTutorFeedbackText() ||
 
  202                        $this->exc->hasTutorFeedbackMail() ||
 
  203                        $this->exc->hasTutorFeedbackFile())
 
  205                        $cols[
"feedback_time"] = array($this->lng->txt(
"exc_tbl_feedback_time"), 
"feedback_time");       
 
  208                if($this->exc->hasTutorFeedbackText())
 
  210                        $cols[
"comment"] = array($this->lng->txt(
"exc_tbl_comment"), 
"comment");                
 
  213                $cols[
"notice"] = array($this->lng->txt(
"exc_tbl_notice"), 
"note");     
 
  222                $has_no_team_yet = ($a_ass->
hasTeam() &&
 
  228                if($this->mode == self::MODE_BY_ASSIGNMENT)
 
  232                                $this->tpl->setVariable(
"VAL_NAME",     $a_row[
"name"]);
 
  235                                if(!$ilAccess->checkAccessOfUser($a_user_id, 
"read",
"", $this->exc->getRefId()) &&
 
  236                                        is_array(
$info = $ilAccess->getInfo()))
 
  238                                        $this->tpl->setCurrentBlock(
'access_warning');
 
  239                                        $this->tpl->setVariable(
'PARENT_ACCESS', 
$info[0][
"text"]);
 
  240                                        $this->tpl->parseCurrentBlock();
 
  245                                asort($a_row[
"team"]);
 
  246                                foreach($a_row[
"team"] as $team_member_id => $team_member_name) 
 
  248                                        if(
sizeof($a_row[
"team"]) > 1)
 
  250                                                $ilCtrl->setParameterByClass(
"ilExSubmissionTeamGUI", 
"id", $team_member_id);
 
  251                                                $url = 
$ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"confirmRemoveTeamMember");
 
  252                                                $ilCtrl->setParameterByClass(
"ilExSubmissionTeamGUI", 
"id", 
"");
 
  254                                                include_once 
"Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php";
 
  256                                                $this->tpl->setCurrentBlock(
"team_member_removal_bl");
 
  257                                                $this->tpl->setVariable(
"URL_TEAM_MEMBER_REMOVAL", 
$url);
 
  258                                                $this->tpl->setVariable(
"TXT_TEAM_MEMBER_REMOVAL", 
 
  260                                                $this->tpl->parseCurrentBlock();
 
  264                                        if(!$ilAccess->checkAccessOfUser($team_member_id, 
"read",
"", $this->exc->getRefId()) &&
 
  265                                                is_array(
$info = $ilAccess->getInfo()))
 
  267                                                $this->tpl->setCurrentBlock(
'team_access_warning');
 
  268                                                $this->tpl->setVariable(
'TEAM_PARENT_ACCESS', 
$info[0][
"text"]);
 
  269                                                $this->tpl->parseCurrentBlock();
 
  272                                        $this->tpl->setCurrentBlock(
"team_member");
 
  273                                        $this->tpl->setVariable(
"TXT_MEMBER_NAME", $team_member_name);
 
  274                                        $this->tpl->parseCurrentBlock();                                
 
  280                                        $this->tpl->setCurrentBlock(
"team_info");
 
  281                                        $this->tpl->setVariable(
"TXT_TEAM_INFO", $this->lng->txt(
"exc_no_team_yet"));
 
  287                        $this->tpl->setVariable(
"VAL_NAME",     $a_row[
"name"]);
 
  291                if(!$has_no_team_yet)
 
  294                        $this->tpl->setVariable(
"SEL_".strtoupper($a_row[
"status"]), 
' selected="selected" ');                  
 
  295                        $this->tpl->setVariable(
"TXT_NOTGRADED", $this->lng->txt(
"exc_notgraded"));
 
  296                        $this->tpl->setVariable(
"TXT_PASSED", $this->lng->txt(
"exc_passed"));
 
  297                        $this->tpl->setVariable(
"TXT_FAILED", $this->lng->txt(
"exc_failed"));   
 
  305                        $this->tpl->setVariable(
"NO_TEAM_COLSPAN", $nt_colspan);
 
  311                if($this->exc->hasTutorFeedbackText())
 
  313                        $comment_id = 
"excasscomm_".$a_ass->getId().
"_".$a_user_id;             
 
  316                        $modal->setId($comment_id);
 
  317                        $modal->setHeading($this->lng->txt(
"exc_tbl_action_feedback_text"));
 
  320                        $lcomment_form->setId($comment_id);
 
  321                        $lcomment_form->setPreventDoubleSubmission(
false);
 
  323                        $lcomment = 
new ilTextAreaInputGUI($this->lng->txt(
"exc_comment_for_learner"), 
"lcomment_".$a_ass->getId().
"_".$a_user_id);
 
  324                        $lcomment->setInfo($this->lng->txt(
"exc_comment_for_learner_info"));
 
  325                        $lcomment->setValue($a_row[
"comment"]);
 
  326                        $lcomment->setCols(45);
 
  327                        $lcomment->setRows(10);                 
 
  328                        $lcomment_form->addItem($lcomment);
 
  330                        $lcomment_form->addCommandButton(
"save", $this->lng->txt(
"save"));
 
  333                        $modal->setBody($lcomment_form->getHTML());
 
  335                        $this->comment_modals[] = $modal->getHTML();
 
  349                                                include_once 
"./Services/Object/classes/class.ilObjectFactory.php";                                                     
 
  352                                                        $this->tpl->setVariable(
"VAL_IMAGE", $usr_obj->getPersonalPicturePath(
"xxsmall"));
 
  353                                                        $this->tpl->setVariable(
"TXT_IMAGE", $this->lng->txt(
"personal_picture"));
 
  361                                                if(!
sizeof($a_row[
"team"]))
 
  363                                                        $this->tpl->setVariable(
"VAL_TEAM_MEMBER", $this->lng->txt(
"exc_no_team_yet"));
 
  367                                                        foreach($a_row[
"team"] as $name)
 
  369                                                                $this->tpl->setCurrentBlock(
"team_member_bl");
 
  370                                                                $this->tpl->setVariable(
"VAL_TEAM_MEMBER", $name);
 
  371                                                                $this->tpl->parseCurrentBlock();
 
  377                                                $this->tpl->setVariable(
"VAL_TEAM_MEMBER", 
" ");
 
  382                                        $this->tpl->setVariable(
"VAL_".strtoupper($col), 
 
  403                                        $this->tpl->setVariable(
"LCOMMENT_ID", $comment_id.
"_snip");
 
  406                                        $this->tpl->setVariable(
"VAL_".strtoupper($col), (trim($a_row[$col]) !== 
"")
 
  407                                                ? nl2br(trim($a_row[$col]))
 
  412                                        if($a_row[
"submission_obj"])
 
  414                                                foreach($a_row[
"submission_obj"]->getFiles() as 
$file)
 
  418                                                                $this->tpl->setVariable(
"TXT_LATE", $this->lng->txt(
"exc_late_submission"));
 
  425                                case "feedback_time":
 
  428                                        $this->tpl->setVariable(
"VAL_".strtoupper($col), 
 
  442                                        $this->tpl->setVariable(
"VAL_".strtoupper($col), $a_row[$col]
 
  452                include_once 
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
 
  454                $actions->setId($a_ass->
getId().
"_".$a_user_id);
 
  455                $actions->setListTitle($this->lng->txt(
"actions"));
 
  459                $counter = $file_info[
"files"][
"count"];
 
  462                        if($file_info[
"files"][
"download_url"])
 
  465                                        $file_info[
"files"][
"download_txt"].
" (".
$counter.
")",
 
  467                                        $file_info[
"files"][
"download_url"]
 
  471                        if($file_info[
"files"][
"download_new_url"])
 
  474                                        $file_info[
"files"][
"download_new_txt"],
 
  476                                        $file_info[
"files"][
"download_new_url"]
 
  481                if(!$has_no_team_yet &&
 
  486                                ? 
"t".ilExAssignmentTeam::getTeamId($a_ass->
getId(), $a_user_id)
 
  489                        $this->tpl->setVariable(
"VAL_IDL_ID", $a_ass->
getId().
"_".$idl_id);
 
  492                                $this->lng->txt(
"exc_individual_deadline_action"),
 
  500                                "il.ExcIDl.trigger('".$idl_id.
"',".$a_ass->
getId().
")" 
  505                if($this->exc->hasTutorFeedbackMail())
 
  508                                $this->lng->txt(
"exc_tbl_action_feedback_mail"),
 
  510                                $ilCtrl->getLinkTarget($this->parent_obj, 
"redirectFeedbackMail")
 
  515                if($this->exc->hasTutorFeedbackFile())
 
  517                        include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
 
  519                        $counter = $storage->countFeedbackFiles($a_row[
"submission_obj"]->getFeedbackId());                             
 
  524                                $this->lng->txt(
"exc_tbl_action_feedback_file").$counter,
 
  526                                $ilCtrl->getLinkTargetByClass(
"ilfilesystemgui", 
"listFiles")
 
  531                if($this->exc->hasTutorFeedbackText())
 
  534                                $this->lng->txt(
"exc_tbl_action_feedback_text"),
 
  542                                "il.ExcManagement.showComment('".$comment_id.
"')"        
  547                if(($peer_review = $a_row[
"submission_obj"]->getPeerReview()) && $a_ass->
afterDeadlineStrict()) 
 
  549                        $counter = $peer_review->countGivenFeedback(
true, $a_user_id);
 
  554                                $this->lng->txt(
"exc_tbl_action_peer_review_given").$counter,
 
  556                                $ilCtrl->getLinkTargetByClass(
"ilexpeerreviewgui", 
"showGivenPeerReview")
 
  559                        $counter = 
sizeof($peer_review->getPeerReviewsByPeerId($a_user_id, 
true));
 
  564                                $this->lng->txt(
"exc_tbl_action_peer_review_received").$counter,
 
  566                                $ilCtrl->getLinkTargetByClass(
"ilexpeerreviewgui", 
"showReceivedPeerReview")
 
  574                                $this->lng->txt(
"exc_create_team"),
 
  576                                $ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"createSingleMemberTeam")
 
  582                                $this->lng->txt(
"exc_tbl_action_team_log"),
 
  584                                $ilCtrl->getLinkTargetByClass(
"ilExSubmissionTeamGUI", 
"showTeamLog")
 
  588                $this->tpl->setVariable(
"ACTIONS", $actions->getHTML());
 
  597                $tpl->addJavaScript(
"Modules/Exercise/js/ilExcManagement.js");
 
  598                $tpl->addOnLoadCode(
'il.ExcManagement.init("'.
$url.
'");');
 
  600                return parent::render().
 
  601                        implode(
"\n", $this->comment_modals);
 
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
static getTeamId($a_assignment_id, $a_user_id, $a_create_on_demand=false)
Get team id for member id.
afterDeadlineStrict($a_include_personal=true)
getId()
Get assignment id.
Exercise submission table.
parseRow($a_user_id, ilExAssignment $a_ass, array $a_row)
render()
render table @access public
__construct($a_parent_obj, $a_parent_cmd, ilObjExercise $a_exc, $a_item_id)
Constructor.
getSelectableColumns()
Get selectable columns.
static get($a_glyph, $a_text="")
Get glyph html.
static getInstance()
Get instance.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getParentCmd()
Get parent command.
getSelectedColumns()
Get selected columns.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
getParentObject()
Get parent object.
setData($a_data)
set table data @access public
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setFormName($a_formname="")
Set Form name.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=NULL)
Add filter by standard type.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
setShowTemplates($a_value)
Toggle templates.
This class represents a text area property in a property form.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
if(!is_array($argv)) $options