4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
    5include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
 
    6include_once(
"./Modules/Exercise/classes/class.ilExAssignmentMemberStatus.php");
 
   22        function __construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_mem_obj)
 
   27                $this->exc_id = $this->exc->getId();
 
   29                include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
 
   30                $this->
setId(
"exc_grades_".$this->exc_id);
 
   32                $this->mem_obj = $a_mem_obj;
 
   34                $mems = $this->mem_obj->getMembers();
 
   42                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   48                $this->
setTitle($lng->txt(
"exc_grades"));
 
   53                $this->
addColumn($this->lng->txt(
"name"), 
"lastname");
 
   55                foreach ($this->ass_data as $ass)
 
   57                        $ilCtrl->setParameter($this->parent_obj, 
"ass_id", $ass->getId());
 
   58                        $cnt_str = 
'<a href="'.$ilCtrl->getLinkTarget($this->parent_obj, 
"members").
'">'.$cnt.
'</a>';
 
   59                        if ($ass->getMandatory())
 
   61                                $this->
addColumn(
"<u>".$cnt_str.
"</u>", 
"", 
"", 
false, 
"", $ass->getTitle().
" ".
 
   62                                        "(".$lng->txt(
"exc_mandatory").
")");
 
   66                                $this->
addColumn($cnt_str, 
"", 
"", 
false, 
"", $ass->getTitle());
 
   70                $ilCtrl->setParameter($this->parent_obj, 
"ass_id", 
"");
 
   72                $this->
addColumn($this->lng->txt(
"exc_total_exc"), 
"");
 
   73                $this->lng->loadLanguageModule(
"trac");
 
   74                $this->
addColumn($this->lng->txt(
"trac_comment"));
 
   84                $this->
setRowTemplate(
"tpl.exc_grades_row.html", 
"Modules/Exercise");
 
  100                if (in_array($a_f, array(
"order_val")))
 
  115                $user_id = 
$d[
"user_id"];
 
  117                foreach ($this->ass_data as $ass)
 
  122                        $this->tpl->setCurrentBlock(
"grade");
 
  123                        $status = $member_status->getStatus();
 
  124                        $this->tpl->setVariable(
"SEL_".strtoupper($status), 
' selected="selected" ');
 
  125                        $this->tpl->setVariable(
"TXT_NOTGRADED", 
$lng->txt(
"exc_notgraded"));
 
  126                        $this->tpl->setVariable(
"TXT_PASSED", 
$lng->txt(
"exc_passed"));
 
  127                        $this->tpl->setVariable(
"TXT_FAILED", 
$lng->txt(
"exc_failed"));                 
 
  128                        $pic = $member_status->getStatusIcon();
 
  130                        $this->tpl->setVariable(
"ALT_STATUS", 
$lng->txt(
"exc_".$status));
 
  133                        $mark = $member_status->getMark();
 
  134                        $this->tpl->setVariable(
"VAL_ONLY_MARK", $mark);
 
  136                        $this->tpl->parseCurrentBlock();
 
  142                $this->tpl->setCurrentBlock(
"mark_input");
 
  143                $this->tpl->setVariable(
"TXT_MARK", 
$lng->txt(
"exc_mark"));
 
  144                $this->tpl->setVariable(
"NAME_MARK",
 
  145                        "mark[".$user_id.
"]");
 
  146                include_once 
'Services/Tracking/classes/class.ilLPMarks.php';
 
  148                $this->tpl->setVariable(
"VAL_MARK",
 
  150                $this->tpl->parseCurrentBlock();
 
  152                $this->tpl->setCurrentBlock(
"grade");
 
  154                $this->tpl->setVariable(
"SEL_".strtoupper($status), 
' selected="selected" ');
 
  157                        case "passed":  $pic = 
"scorm/passed.svg"; 
break;
 
  158                        case "failed":  $pic = 
"scorm/failed.svg"; 
break;
 
  159                        default:                $pic = 
"scorm/not_attempted.svg"; 
break;
 
  162                $this->tpl->setVariable(
"ALT_STATUS", 
$lng->txt(
"exc_".$status));
 
  172                $this->tpl->parseCurrentBlock();
 
  175                $this->tpl->setVariable(
"TXT_NAME",
 
  176                        $d[
"lastname"].
", ".
$d[
"firstname"].
" [".
$d[
"login"].
"]");
 
  177                $this->tpl->setVariable(
"VAL_ID", $user_id);    
 
  180                $ilCtrl->setParameter($this->parent_obj, 
"part_id", $user_id);          
 
  181                $url = 
$ilCtrl->getLinkTarget($this->parent_obj, 
"showParticipant");
 
  182                $ilCtrl->setParameter($this->parent_obj, 
"part_id", 
"");
 
  184                $this->tpl->setVariable(
"LINK_NAME", 
$url);
 
  187                $this->tpl->setVariable(
"ID_COMMENT", $user_id);
 
  189                $this->tpl->setVariable(
"VAL_COMMENT",
 
for($col=0; $col< 50; $col++) $d
An exception for terminatinating execution or to throw for unit testing.
Exercise assignment member status.
static getInstancesByExercise($a_exc_id)
Exercise participant table.
fillRow($d)
Fill table row.
numericOrdering($a_f)
Check whether field is numeric.
__construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_mem_obj)
Constructor.
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current status (notgraded|passed|failed)
static _lookupMark($a_usr_id, $a_obj_id)
static _lookupComment($a_usr_id, $a_obj_id)
static _lookupName($a_user_id)
lookup user name
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setEnableHeader($a_enableheader)
Set Enable Header.
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public