34 bool $a_show_peer_review =
false,
35 bool $a_disable_peer_review =
false 39 $this->
ctrl = $DIC->ctrl();
40 $this->
lng = $DIC->language();
41 $ilCtrl = $DIC->ctrl();
42 $lng = $DIC->language();
45 $this->show_peer_review = $a_show_peer_review;
46 $this->
setId(
"excassltxt" . $this->ass->getId());
51 $lng->
txt(
"exc_list_text_assignment") .
52 ": \"" . $this->ass->getTitle() .
"\"" 59 $this->
addColumn($this->
lng->txt(
"user"),
"uname",
"15%");
60 $this->
addColumn($this->
lng->txt(
"exc_last_submission"),
"udate",
"10%");
62 if ($this->show_peer_review) {
63 $this->
addColumn($this->
lng->txt(
"exc_files_returned_text"),
"",
"45%");
64 $this->
addColumn($this->
lng->txt(
"exc_peer_review"),
"",
"30%");
68 $this->
addColumn($this->
lng->txt(
"exc_files_returned_text"),
"",
"75%");
75 $this->
setRowTemplate(
"tpl.exc_list_text_assignment_row.html",
"Modules/Exercise");
77 if (!$a_disable_peer_review &&
78 $this->ass->getPeerReview() &&
79 !$a_show_peer_review) {
88 return ($a_field ==
"udate");
91 protected function parse(): void
94 if ($this->show_peer_review) {
95 $peer_data = $this->peer_review->getAllPeerReviews();
99 if (trim($file[
"atext"])) {
100 $data[$file[
"user_id"]] = array(
101 "uid" => $file[
"user_id"],
103 "udate" => $file[
"ts"],
107 if (isset($peer_data[$file[
"user_id"]])) {
108 $data[$file[
"user_id"]][
"peer"] = array_keys($peer_data[$file[
"user_id"]]);
116 protected function fillRow(array $a_set): void
118 if ($this->show_peer_review) {
119 $peer_data =
" ";
120 if (isset($a_set[
"peer"])) {
122 $acc->setId($this->ass->getId() .
"_" . $a_set[
"uid"]);
124 foreach ($a_set[
"peer"] as $peer_id) {
126 $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_set[
"uid"]);
129 foreach ($this->ass->getPeerReviewCriteriaCatalogueItems() as $crit) {
130 $crit_id = $crit->getId()
133 $crit->setPeerReviewContext($this->ass, $peer_id, $a_set[
"uid"]);
136 $acc_html[] =
'<p>' .
137 '<div class="ilBlockPropertyCaption">' . $crit->getTitle() .
'</div>' .
138 '<div>' . $crit->getHTML($values[$crit_id]) .
'</div>' .
144 '<div style="margin-left:10px;">' . implode(
"\n", $acc_html) .
'</div>' 148 $peer_data = $acc->getHTML();
150 $this->tpl->setCurrentBlock(
"peer_bl");
151 $this->tpl->setVariable(
"PEER_REVIEW", $peer_data);
152 $this->tpl->parseCurrentBlock();
155 $this->tpl->setVariable(
"USER_NAME", $a_set[
"uname"]);
156 $this->tpl->setVariable(
160 $this->tpl->setVariable(
"USER_TEXT", nl2br($a_set[
"utext"]));
static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
numericOrdering(string $a_field)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
ilExPeerReview $peer_review
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(object $a_parent_obj, string $a_parent_cmd, ilExAssignment $a_ass, bool $a_show_peer_review=false, bool $a_disable_peer_review=false)
static getAllAssignmentFiles(int $a_exc_id, int $a_ass_id)