5include_once 
"Services/Table/classes/class.ilTable2GUI.php";
 
   17    public function __construct($a_parent_obj, $a_parent_cmd, $a_exc_id)
 
   21        $this->ctrl = 
$DIC->ctrl();
 
   22        $this->lng = 
$DIC->language();
 
   26        $this->exc_id = $a_exc_id;
 
   27        $this->
setId(
"exccritcat" . $this->exc_id);
 
   29        parent::__construct($a_parent_obj, $a_parent_cmd);
 
   36        $this->
addColumn($this->lng->txt(
"position"), 
"pos", 
"10%");
 
   37        $this->
addColumn($this->lng->txt(
"title"), 
"title");
 
   38        $this->
addColumn($this->lng->txt(
"exc_criterias"));
 
   39        $this->
addColumn($this->lng->txt(
"exc_assignments"));
 
   40        $this->
addColumn($this->lng->txt(
"actions"));
 
   46        $this->
setRowTemplate(
"tpl.exc_crit_cat_row.html", 
"Modules/Exercise");
 
   62        include_once 
"Modules/Exercise/classes/class.ilExAssignment.php";
 
   63        include_once 
"Modules/Exercise/classes/class.ilExcCriteria.php";
 
   64        include_once 
"Modules/Exercise/classes/class.ilExPeerReview.php";
 
   66        $protected = $assigned = array();
 
   68            if ($ass->getPeerReviewCriteriaCatalogue()) {
 
   69                $assigned[$ass->getPeerReviewCriteriaCatalogue()][$ass->getId()] = $ass->getTitle();
 
   72                if ($peer_review->hasPeerReviewGroups()) {
 
   73                    $protected[$ass->getPeerReviewCriteriaCatalogue()][] = $ass->getId();
 
   78        if (
sizeof($protected)) {
 
   88                $crits[] = array($crit->getTranslatedType(), $crit->getTitle());
 
   92                "id" => $item->getId()
 
   94                ,
"title" => $item->getTitle()
 
   95                ,
"criterias" => $crits
 
   96                ,
"protected" => array_key_exists($item->getId(), $protected)
 
   97                    ? $protected[$item->getId()]
 
   99                ,
"assigned" => array_key_exists($item->getId(), $assigned)
 
  100                    ? $assigned[$item->getId()]
 
  107        return (
bool) 
sizeof(
$data);
 
  112        return in_array($a_field, array(
"pos"));
 
  120        $this->tpl->setVariable(
"ID", $a_set[
"id"]);
 
  121        $this->tpl->setVariable(
"POS", $a_set[
"pos"]);
 
  122        $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
 
  127        if (
sizeof($a_set[
"criterias"])) {
 
  128            $this->tpl->setCurrentBlock(
"crit_bl");
 
  129            foreach ($a_set[
"criterias"] as $crit) {
 
  130                $this->tpl->setVariable(
"CRIT_TYPE", $crit[0]);
 
  131                $this->tpl->setVariable(
"CRIT_TITLE", $crit[1]);
 
  132                $this->tpl->parseCurrentBlock();
 
  136        $this->tpl->setCurrentBlock(
"action_bl");
 
  137        $this->tpl->setVariable(
"ACTION_URL", 
$url);
 
  138        $this->tpl->setVariable(
"ACTION_TXT", 
$lng->txt(
"edit"));
 
  139        $this->tpl->parseCurrentBlock();
 
  141        if (is_array($a_set[
"assigned"])) {
 
  142            foreach ($a_set[
"assigned"] as $ass_id => $ass_title) {
 
  143                if (is_array($a_set[
"protected"]) &&
 
  144                    in_array($ass_id, $a_set[
"protected"])) {
 
  145                    $this->tpl->setCurrentBlock(
"ass_protected_bl");
 
  146                    $this->tpl->setVariable(
"ASS_PROTECTED", 
$lng->txt(
"exc_crit_cat_protected_assignment"));
 
  147                    $this->tpl->parseCurrentBlock();
 
  150                $this->tpl->setCurrentBlock(
"ass_bl");
 
  151                $this->tpl->setVariable(
"ASS_TITLE", $ass_title);
 
  152                $this->tpl->parseCurrentBlock();
 
  157        if (!is_array($a_set[
"protected"])) {
 
  158            $url = 
$ilCtrl->getLinkTargetByClass(
"ilExcCriteriaGUI", 
"");
 
  160            $this->tpl->setCurrentBlock(
"action_bl");
 
  161            $this->tpl->setVariable(
"ACTION_URL", 
$url);
 
  162            $this->tpl->setVariable(
"ACTION_TXT", 
$lng->txt(
"exc_edit_criterias"));
 
  163            $this->tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
static getInstancesByExercise($a_exc_id)
Class ilExcCriteriaCatalogueTableGUI.
numericOrdering($a_field)
Should this field be sorted numeric?
__construct($a_parent_obj, $a_parent_cmd, $a_exc_id)
ilTable2GUI constructor.
fillRow($a_set)
Standard Version of Fill Row.
static getInstancesByParentId($a_parent_id)
static getInstancesByParentId($a_parent_id)
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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.
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 sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.