4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
6 include_once(
"./Modules/Exercise/classes/class.ilExPeerReview.php");
22 public function __construct($a_parent_obj, $a_parent_cmd,
ilExAssignment $a_ass, $a_show_peer_review =
false, $a_disable_peer_review =
false)
26 $this->ctrl = $DIC->ctrl();
27 $this->lng = $DIC->language();
29 $lng = $DIC->language();
32 $this->show_peer_review = (bool) $a_show_peer_review;
33 $this->
setId(
"excassltxt" . $this->ass->getId());
35 parent::__construct($a_parent_obj, $a_parent_cmd);
38 ": \"" . $this->ass->getTitle() .
"\"");
44 $this->
addColumn($this->lng->txt(
"user"),
"uname",
"15%");
45 $this->
addColumn($this->lng->txt(
"exc_last_submission"),
"udate",
"10%");
47 if ($this->show_peer_review) {
48 $this->
addColumn($this->lng->txt(
"exc_files_returned_text"),
"",
"45%");
49 $this->
addColumn($this->lng->txt(
"exc_peer_review"),
"",
"30%");
51 include_once
'./Services/Rating/classes/class.ilRatingGUI.php';
52 include_once
'./Services/Accordion/classes/class.ilAccordionGUI.php';
56 $this->
addColumn($this->lng->txt(
"exc_files_returned_text"),
"",
"75%");
63 $this->
setRowTemplate(
"tpl.exc_list_text_assignment_row.html",
"Modules/Exercise");
65 if (!$a_disable_peer_review &&
66 $this->ass->getPeerReview() &&
67 !$a_show_peer_review) {
76 return ($a_field ==
"udate");
82 if ($this->show_peer_review) {
83 $peer_data = $this->peer_review->getAllPeerReviews();
86 include_once
"Services/User/classes/class.ilUserUtil.php";
87 include_once
"Services/RTE/classes/class.ilRTE.php";
89 if (trim($file[
"atext"])) {
91 "uid" => $file[
"user_id"],
93 "udate" => $file[
"ts"],
97 if (isset($peer_data[$file[
"user_id"]])) {
98 $data[$file[
"user_id"]][
"peer"] = array_keys($peer_data[$file[
"user_id"]]);
110 if ($this->show_peer_review) {
111 $peer_data =
" ";
112 if (isset($a_set[
"peer"])) {
114 $acc->setId($this->ass->getId() .
"_" . $a_set[
"uid"]);
116 foreach ($a_set[
"peer"] as $peer_id) {
118 $acc_item = $peer_name;
121 $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_set[
"uid"]);
124 foreach ($this->ass->getPeerReviewCriteriaCatalogueItems() as $crit) {
125 $crit_id = $crit->getId()
128 $crit->setPeerReviewContext($this->ass, $peer_id, $a_set[
"uid"]);
131 $acc_html[] =
'<p>' .
132 '<div class="ilBlockPropertyCaption">' . $crit->getTitle() .
'</div>' .
133 '<div>' . $crit->getHTML($values[$crit_id]) .
'</div>' .
139 '<div style="margin-left:10px;">' . implode(
"\n", $acc_html) .
'</div>' 143 $peer_data = $acc->getHTML();
145 $this->tpl->setCurrentBlock(
"peer_bl");
146 $this->tpl->setVariable(
"PEER_REVIEW", $peer_data);
147 $this->tpl->parseCurrentBlock();
150 $this->tpl->setVariable(
"USER_NAME", $a_set[
"uname"]);
151 $this->tpl->setVariable(
155 $this->tpl->setVariable(
"USER_TEXT", nl2br($a_set[
"utext"]));
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
__construct($a_parent_obj, $a_parent_cmd, ilExAssignment $a_ass, $a_show_peer_review=false, $a_disable_peer_review=false)
static _replaceMediaObjectImageSrc($a_text, $a_direction=0, $nic=IL_INST_ID)
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
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, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
numericOrdering($a_field)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static getAllAssignmentFiles($a_exc_id, $a_ass_id)
Accordion user interface class.
setLimit($a_limit=0, $a_default_limit=0)