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());
151 $is_html = (strlen($inst) != strlen(strip_tags($inst)));
182 $dl =
"<br />".sprintf(
$lng->txt(
"exc_late_submission_warning"), $dl);
183 $dl =
'<span class="warning">'.$dl.
'</span>';
192 "<b>".$time_str.
"</b>");
203 $button->setCaption(
"exc_list_submission");
206 $a_info->
addProperty(
$lng->txt(
"exc_public_submission"), $button->render());
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
254 $ilCtrl->clearParameters($this);
256 $ilCtrl->setParameter($this,
"ref_id", $this->exc->getRefId());
257 $ilCtrl->setParameter($this,
'subtype',
'upload');
260 $ilCtrl->getLinkTargetByClass(
"ilShopPurchaseGUI",
"showDetails"));
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();
283 include_once
"Modules/Exercise/classes/class.ilExPeerReviewGUI.php";
305 $cnt_files = $storage->countFeedbackFiles($a_feedback_id);
311 if ($lpcomment !=
"" ||
313 $status !=
"notgraded" ||
315 $a_show_global_feedback)
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));
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)
366 $lng->txt(
"download"),
367 $this->getSubmissionLink(
"downloadGlobalFeedbackFile"));
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,
"");
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
GUI class for exercise assignments.
addSubmission(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getOverviewHeader(ilExAssignment $a_ass)
Get assignment header for overview.
addSchedule(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getTimeString($a_deadline)
Get time string for deadline.
addSubmissionFeedback(ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
getSubmissionLink($a_cmd, array $a_params=null)
__construct(ilObjExercise $a_exc)
Constructor.
addFiles(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addPublicSubmissions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getOverviewBody(ilExAssignment $a_ass)
Get assignment body for overview.
addInstructions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getFeedbackDate()
Get (global) feedback file availability date.
getExerciseId()
Get exercise id.
getId()
Get assignment id.
getInstruction()
Get instruction.
getPeerReview()
Get peer review status.
getStartTime()
Get start time (timestamp)
getMemberStatus($a_user_id=null)
const FEEDBACK_DATE_DEADLINE
getPeerReviewDeadline()
Get peer review deadline (timestamp)
getFeedbackFile()
Get (global) feedback file.
getDeadline()
Get deadline (timestamp)
getMandatory()
Get mandatory.
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
addProperty($a_name, $a_value, $a_link="")
add a property to current section
addSection($a_title)
add a new section
static _isBuyable($a_ref_id, $a_subtype='')
static _hasAccess($a_ref_id, $a_transaction=0, $a_subtype='')
special template class to simplify handling of ITX/PEAR
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)