4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
25 public function __construct($a_parent_obj, $a_parent_cmd, $a_exc_id)
29 $this->ctrl = $DIC->ctrl();
30 $this->lng = $DIC->language();
32 $lng = $DIC->language();
33 include_once(
"./Modules/Exercise/AssignmentTypes/classes/class.ilExAssignmentTypes.php");
36 $this->exc_id = $a_exc_id;
37 $this->
setId(
"excass" . $this->exc_id);
39 parent::__construct($a_parent_obj, $a_parent_cmd);
49 $this->
addColumn($this->lng->txt(
"title"),
"title");
50 $this->
addColumn($this->lng->txt(
"exc_assignment_type"),
"type");
51 $this->
addColumn($this->lng->txt(
"exc_presentation_order"),
"order_val");
52 $this->
addColumn($this->lng->txt(
"exc_start_time"),
"start_time");
53 $this->
addColumn($this->lng->txt(
"exc_deadline"),
"deadline");
54 $this->
addColumn($this->lng->txt(
"exc_mandatory"),
"mandatory");
55 $this->
addColumn($this->lng->txt(
"exc_peer_review"),
"peer");
56 $this->
addColumn($this->lng->txt(
"exc_instruction"),
"",
"30%");
57 $this->
addColumn($this->lng->txt(
"actions"));
67 $this->
setRowTemplate(
"tpl.exc_assignments_row.html",
"Modules/Exercise");
78 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
79 include_once(
"./Modules/Exercise/classes/class.ilExPeerReview.php");
84 $data[$idx][
"peer_invalid"] =
true;
86 $peer_reviews = $peer_review->validatePeerReviewGroups();
87 $data[$idx][
"peer_invalid"] = $peer_reviews[
"invalid"];
89 $data[$idx][
"ass_type"] = $this->types->getById(
$row[
"type"]);
90 $data[$idx][
"type"] =
$data[$idx][
"ass_type"]->getTitle();
99 if (in_array($a_field, array(
"order_val",
"deadline",
"start_time"))) {
113 $this->tpl->setVariable(
"ID",
$d[
"id"]);
115 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
118 if (
$d[
"deadline"] > 0) {
120 if (
$d[
"deadline2"] > 0) {
123 $this->tpl->setVariable(
"TXT_DEADLINE", $dl);
125 if (
$d[
"start_time"] > 0) {
126 $this->tpl->setVariable(
131 $this->tpl->setVariable(
136 if (
$d[
"mandatory"]) {
137 $this->tpl->setVariable(
"TXT_MANDATORY",
$lng->txt(
"yes"));
139 $this->tpl->setVariable(
"TXT_MANDATORY",
$lng->txt(
"no"));
142 $ilCtrl->setParameter($this->parent_obj,
"ass_id",
$d[
"id"]);
145 $this->tpl->setVariable(
"TXT_PEER",
$lng->txt(
"yes") .
" (" .
$d[
"peer_min"] .
")");
147 if (
$d[
"peer_invalid"]) {
148 $this->tpl->setVariable(
"TXT_PEER_INVALID",
$lng->txt(
"exc_peer_reviews_invalid_warning"));
151 if ($ass->afterDeadlineStrict()) {
152 $this->tpl->setVariable(
"TXT_PEER_OVERVIEW",
$lng->txt(
"exc_peer_review_overview"));
153 $this->tpl->setVariable(
155 $ilCtrl->getLinkTargetByClass(
"ilexpeerreviewgui",
"showPeerReviewOverview")
159 $this->tpl->setVariable(
"TXT_PEER",
$lng->txt(
"no"));
162 $this->tpl->setVariable(
"TXT_TITLE",
$d[
"title"]);
163 $this->tpl->setVariable(
"TXT_TYPE",
$d[
"type"]);
164 $this->tpl->setVariable(
"ORDER_VAL",
$d[
"order_val"]);
166 $this->tpl->setVariable(
"TXT_EDIT",
$lng->txt(
"edit"));
167 $this->tpl->setVariable(
169 $ilCtrl->getLinkTarget($this->parent_obj,
"editAssignment")
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static getAssignmentDataOfExercise($a_exc_id)
Get assignments data of an exercise in an array.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
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.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
static getInstance()
Get instance.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
fillRow($d)
Fill table row.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct($a_parent_obj, $a_parent_cmd, $a_exc_id)
Constructor.
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.
numericOrdering($a_field)
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
setLimit($a_limit=0, $a_default_limit=0)