4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
'./Modules/Exercise/classes/class.ilExAssignment.php';
6 include_once
'./Services/Rating/classes/class.ilRatingGUI.php';
36 $this->user_id = $a_user_id;
37 $this->peer_data = $a_peer_data;
39 parent::__construct($a_parent_obj, $a_parent_cmd);
44 " - ".$this->lng->txt(
"exc_peer_review_give"));
46 if(!$this->ass->hasPeerReviewPersonalized())
48 $this->
addColumn($this->lng->txt(
"id"),
"seq");
54 $this->
addColumn($this->lng->txt(
"exc_peer_review_recipient"),
"name");
58 $this->
addColumn($this->lng->txt(
"last_update"),
"tstamp");
59 $this->
addColumn($this->lng->txt(
"valid"),
"valid");
60 $this->
addColumn($this->lng->txt(
"action"),
"");
62 $this->
setRowTemplate(
"tpl.exc_peer_review_row.html",
"Modules/Exercise");
68 if($this->ass->hasPeerReviewFileUpload())
70 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
71 $this->fstorage =
new ilFSStorageExercise($this->ass->getExerciseId(), $this->ass->getId());
85 $personal = $this->ass->hasPeerReviewPersonalized();
89 include_once
"Services/User/classes/class.ilUserUtil.php";
94 foreach($this->peer_data as $item)
98 $row[
"giver_id"] = $item[
"giver_id"];
99 $row[
"peer_id"] = $item[
"peer_id"];
100 $row[
"tstamp"] = $item[
"tstamp"];
104 $row[
"seq"] = $item[
"seq"];
112 $row[
"valid"] = $all_empty =
true;
114 $values = $submission->getPeerReview()->getPeerReviewValues($item[
"giver_id"], $item[
"peer_id"]);
115 foreach($this->ass->getPeerReviewCriteriaCatalogueItems() as $crit)
117 $crit_id = $crit->getId()
120 $crit->setPeerReviewContext(
125 if(!$crit->validate($values[$crit_id]))
127 $row[
"valid"] =
false;
129 if($crit->hasValue($values[$crit_id]))
136 $row[
"valid"] =
false;
151 if(in_array($a_field,
array(
"seq")))
162 if(isset($a_set[
"seq"]))
164 $this->tpl->setVariable(
"VAL_SEQ", $a_set[
"seq"]);
168 $this->tpl->setVariable(
"VAL_SEQ", $a_set[
"name"]);
175 $this->tpl->setVariable(
"VAL_TSTAMP", $a_set[
"tstamp"]);
177 $this->tpl->setVariable(
"VAL_STATUS", $a_set[
"valid"]
178 ? $this->lng->txt(
"yes")
179 : $this->lng->txt(
"no")
182 $ilCtrl->setParameter($this->parent_obj,
"peer_id", $a_set[
"peer_id"]);
183 $url = $ilCtrl->getLinkTarget($this->parent_obj,
"editPeerReviewItem");
184 $ilCtrl->setParameter($this->parent_obj,
"pid",
"");
186 $this->tpl->setVariable(
"TXT_ACTION", $this->lng->txt(
"edit"));
187 $this->tpl->setVariable(
"URL_ACTION",
$url);
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
List all peers to be reviewed for user.
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
static formatDate(ilDateTime $date)
Format a date public.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
__construct($a_parent_obj, $a_parent_cmd, ilExAssignment $a_ass, $a_user_id, array $a_peer_data)
Constructor.
disable($a_module_name)
diesables particular modules of table
create()
Create directory.
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.
setLimit($a_limit=0, $a_default_limit=0)
numericOrdering($a_field)