31 $lng->loadLanguageModule(
"exc");
33 $tpl =
new ilTemplate(
"tpl.assignment_head.html",
true,
true,
"Modules/Exercise");
40 $tpl->setCurrentBlock(
"prop");
41 $tpl->setVariable(
"PROP", $lng->txt(
"exc_ended_on"));
42 $tpl->setVariable(
"PROP_VAL",
44 $tpl->parseCurrentBlock();
50 $tpl->setCurrentBlock(
"prop");
51 $tpl->setVariable(
"PROP", $lng->txt(
"exc_peer_review_deadline"));
52 $tpl->setVariable(
"PROP_VAL",
54 $tpl->parseCurrentBlock();
59 $tpl->setCurrentBlock(
"prop");
60 $tpl->setVariable(
"PROP", $lng->txt(
"exc_starting_on"));
61 $tpl->setVariable(
"PROP_VAL",
63 $tpl->parseCurrentBlock();
68 $tpl->setCurrentBlock(
"prop");
69 $tpl->setVariable(
"PROP", $lng->txt(
"exc_time_to_send"));
70 $tpl->setVariable(
"PROP_VAL", $time_str);
71 $tpl->parseCurrentBlock();
75 $tpl->setCurrentBlock(
"prop");
76 $tpl->setVariable(
"PROP", $lng->txt(
"exc_edit_until"));
77 $tpl->setVariable(
"PROP_VAL",
79 $tpl->parseCurrentBlock();
87 $mand =
" (".$lng->txt(
"exc_mandatory").
")";
95 $tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$stat));
105 $this->current_ass_id = $a_ass->
getId();
107 $tpl =
new ilTemplate(
"tpl.assignment_body.html",
true,
true,
"Modules/Exercise");
109 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
110 include_once(
"./Services/UIComponent/Button/classes/class.ilLinkButton.php");
112 if(IS_PAYMENT_ENABLED)
114 include_once
'./Services/Payment/classes/class.ilPaymentObject.php';
118 $info->setTableClass(
"");
123 if ($this->exc->getShowSubmissions())
134 $tpl->setVariable(
"CONTENT",
$info->getHTML());
149 $a_info->
addSection($lng->txt(
"exc_instruction"));
151 $is_html = (strlen($inst) != strlen(strip_tags($inst)));
165 $a_info->
addSection($lng->txt(
"exc_schedule"));
182 $dl =
"<br />".sprintf($lng->txt(
"exc_late_submission_warning"), $dl);
183 $dl =
'<span class="warning">'.$dl.
'</span>';
186 $a_info->
addProperty($lng->txt(
"exc_edit_until"), $until);
191 $a_info->
addProperty($lng->txt(
"exc_time_to_send"),
192 "<b>".$time_str.
"</b>");
203 $button->setCaption(
"exc_list_submission");
206 $a_info->
addProperty($lng->txt(
"exc_public_submission"), $button->render());
210 $a_info->
addProperty($lng->txt(
"exc_public_submission"),
211 $lng->txt(
"exc_msg_public_submission"));
220 if (count($files) > 0)
223 foreach($files as
$file)
231 $ilCtrl->getLinkTargetByClass(
"ilShopPurchaseGUI",
"showDetails"));
236 $lng->txt(
"download"),
237 $this->
getSubmissionLink(
"downloadFile", array(
"file"=>urlencode($file[
"name"]))));
248 if(IS_PAYMENT_ENABLED
252 $a_info->
addSection($lng->txt(
"exc_your_submission"));
254 $ilCtrl->clearParameters($this);
256 $ilCtrl->setParameter($this,
"ref_id", $this->exc->getRefId());
257 $ilCtrl->setParameter($this,
'subtype',
'upload');
260 $ilCtrl->getLinkTargetByClass(
"ilShopPurchaseGUI",
"showDetails"));
264 $a_info->
addSection($lng->txt(
"exc_your_submission"));
266 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
269 include_once
"Modules/Exercise/classes/class.ilExSubmissionGUI.php";
273 if($submission->hasSubmitted())
275 $last_sub = $submission->getLastSubmission();
279 $a_info->
addProperty($lng->txt(
"exc_last_submission"), $last_sub);
283 include_once
"Modules/Exercise/classes/class.ilExPeerReviewGUI.php";
311 if ($lpcomment !=
"" ||
313 $status !=
"notgraded" ||
315 $a_show_global_feedback)
317 $a_info->
addSection($lng->txt(
"exc_feedback_from_tutor"));
318 if ($lpcomment !=
"")
334 else if ($status !=
"notgraded")
336 $img =
'<img src="'.ilUtil::getImagePath(
"scorm/".$status.
".svg").
'" '.
337 ' alt="'.$lng->txt(
"exc_".$status).
'" title="'.$lng->txt(
"exc_".$status).
340 $img.
" ".$lng->txt(
"exc_".$status));
345 $a_info->
addSection($lng->txt(
"exc_fb_files").
346 '<a name="fb'.$a_ass->getId().
'"></a>');
350 $files = $storage->getFeedbackFiles($a_feedback_id);
351 foreach($files as
$file)
354 $lng->txt(
"download"),
355 $this->
getSubmissionLink(
"downloadFeedbackFile", array(
"file"=>urlencode($file))));
361 if($a_show_global_feedback)
363 $a_info->
addSection($lng->txt(
"exc_global_feedback_file"));
366 $lng->txt(
"download"),
379 if ($a_deadline == 0)
381 return $lng->txt(
"exc_no_deadline_specified");
384 if ($a_deadline - time() <= 0)
386 $time_str = $lng->txt(
"exc_time_over_short");
400 if(is_array($a_params))
402 foreach($a_params as $name => $value)
404 $ilCtrl->setParameterByClass(
"ilexsubmissiongui", $name, $value);
408 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id", $this->current_ass_id);
409 $url = $ilCtrl->getLinkTargetByClass(
"ilexsubmissiongui", $a_cmd);
410 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id",
"");
412 if(is_array($a_params))
414 foreach($a_params as $name => $value)
416 $ilCtrl->setParameterByClass(
"ilexsubmissiongui", $name,
"");
getPeerReview()
Get peer review status.
addSubmissionFeedback(ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
getMemberStatus($a_user_id=null)
addPublicSubmissions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getFeedbackDate()
Get (global) feedback file availability date.
getStartTime()
Get start time (timestamp)
getId()
Get assignment id.
getDeadline()
Get deadline (timestamp)
addInstructions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addSection($a_title)
add a new section
addSchedule(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
GUI class for exercise assignments.
getExerciseId()
Get exercise id.
static _isBuyable($a_ref_id, $a_subtype='')
getOverviewBody(ilExAssignment $a_ass)
Get assignment body for overview.
getTimeString($a_deadline)
Get time string for deadline.
addFiles(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
special template class to simplify handling of ITX/PEAR
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
static formatDate(ilDateTime $date)
Format a date public.
getFeedbackFile()
Get (global) feedback file.
__construct(ilObjExercise $a_exc)
Constructor.
getMandatory()
Get mandatory.
getOverviewHeader(ilExAssignment $a_ass)
Get assignment header for overview.
const FEEDBACK_DATE_DEADLINE
addProperty($a_name, $a_value, $a_link="")
add a property to current section
getInstruction()
Get instruction.
addSubmission(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
static _hasAccess($a_ref_id, $a_transaction=0, $a_subtype='')
getPeerReviewDeadline()
Get peer review deadline (timestamp)
countFeedbackFiles($a_user_id)
Count number of feedback files for a user.
getSubmissionLink($a_cmd, array $a_params=null)