17 public function __construct($a_parent_obj, $a_parent_cmd,
ilExAssignment $a_ass, $a_show_peer_review =
false, $a_disable_peer_review =
false)
21 $this->ctrl = $DIC->ctrl();
22 $this->lng = $DIC->language();
24 $lng = $DIC->language();
27 $this->show_peer_review = (bool) $a_show_peer_review;
28 $this->
setId(
"excassltxt" . $this->ass->getId());
33 ": \"" . $this->ass->getTitle() .
"\"");
39 $this->
addColumn($this->lng->txt(
"user"),
"uname",
"15%");
40 $this->
addColumn($this->lng->txt(
"exc_last_submission"),
"udate",
"10%");
42 if ($this->show_peer_review) {
43 $this->
addColumn($this->lng->txt(
"exc_files_returned_text"),
"",
"45%");
44 $this->
addColumn($this->lng->txt(
"exc_peer_review"),
"",
"30%");
48 $this->
addColumn($this->lng->txt(
"exc_files_returned_text"),
"",
"75%");
55 $this->
setRowTemplate(
"tpl.exc_list_text_assignment_row.html",
"Modules/Exercise");
57 if (!$a_disable_peer_review &&
58 $this->ass->getPeerReview() &&
59 !$a_show_peer_review) {
68 return ($a_field ==
"udate");
74 if ($this->show_peer_review) {
75 $peer_data = $this->peer_review->getAllPeerReviews();
79 if (trim($file[
"atext"])) {
80 $data[$file[
"user_id"]] = array(
81 "uid" => $file[
"user_id"],
83 "udate" => $file[
"ts"],
87 if (isset($peer_data[$file[
"user_id"]])) {
88 $data[$file[
"user_id"]][
"peer"] = array_keys($peer_data[$file[
"user_id"]]);
100 if ($this->show_peer_review) {
101 $peer_data =
" ";
102 if (isset($a_set[
"peer"])) {
104 $acc->setId($this->ass->getId() .
"_" . $a_set[
"uid"]);
106 foreach ($a_set[
"peer"] as $peer_id) {
108 $acc_item = $peer_name;
111 $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_set[
"uid"]);
114 foreach ($this->ass->getPeerReviewCriteriaCatalogueItems() as $crit) {
115 $crit_id = $crit->getId()
118 $crit->setPeerReviewContext($this->ass, $peer_id, $a_set[
"uid"]);
121 $acc_html[] =
'<p>' .
122 '<div class="ilBlockPropertyCaption">' . $crit->getTitle() .
'</div>' .
123 '<div>' . $crit->getHTML($values[$crit_id]) .
'</div>' .
129 '<div style="margin-left:10px;">' . implode(
"\n", $acc_html) .
'</div>' 133 $peer_data = $acc->getHTML();
135 $this->tpl->setCurrentBlock(
"peer_bl");
136 $this->tpl->setVariable(
"PEER_REVIEW", $peer_data);
137 $this->tpl->parseCurrentBlock();
140 $this->tpl->setVariable(
"USER_NAME", $a_set[
"uname"]);
141 $this->tpl->setVariable(
145 $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.
__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...
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
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.
numericOrdering($a_field)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
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.
Exercise submission //TODO: This class has to much static methods related to delivered "files"...
static getAllAssignmentFiles($a_exc_id, $a_ass_id)
Accordion user interface class.
setLimit($a_limit=0, $a_default_limit=0)