106 $lng = $DIC->language();
109 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
111 $exercise_id = $ass->getExerciseId();
117 $times_up = $ass->afterDeadlineStrict();
120 include_once
"./Services/Link/classes/class.ilLink.php";
125 $lng->txt(
"prtf_exercise_info"),
127 "<a href=\"" . $exc_link .
"\">" .
132 if ($a_add_submit && !$times_up) {
133 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass", $a_assignment_id);
134 $submit_link =
$ilCtrl->getLinkTargetByClass(
"ilportfolioexercisegui",
"finalize");
135 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass",
"");
137 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
139 $button->setCaption(
"prtf_finalize_portfolio");
140 $button->setPrimary(
true);
141 $button->setUrl($submit_link);
142 $info .=
" " . $button->render();
146 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
148 if ($submission->hasSubmitted()) {
150 $submitted = $submission->getSelectedObject();
152 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass", $a_assignment_id);
153 $dl_link =
$ilCtrl->getLinkTargetByClass(
"ilportfolioexercisegui",
"downloadExcSubFile");
154 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass",
"");
159 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
161 $button->setCaption(
"download");
162 $button->setUrl($dl_link);
164 $info .=
"<p>" . sprintf(
165 $lng->txt(
"prtf_exercise_submitted_info"),
178 $inst = $ass->getInstruction();
180 $tooltip .= nl2br($inst);
183 $ass_files = $ass->getFiles();
184 if (count($ass_files) > 0) {
186 $tooltip .=
"<br /><br />";
189 foreach ($ass_files as
$file) {
190 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass", $a_assignment_id);
191 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"file", urlencode($file[
"name"]));
192 $dl_link =
$ilCtrl->getLinkTargetByClass(
"ilportfolioexercisegui",
"downloadExcAssFile");
193 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"file",
"");
194 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass",
"");
196 $tooltip .= $file[
"name"] .
": <a href=\"" . $dl_link .
"\">" .
197 $lng->txt(
"download") .
"</a>";
202 $ol_id =
"exc_ass_" . $a_assignment_id;
204 include_once
"Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
208 $overlay->setAnchor($ol_id .
"_tr");
209 $overlay->setTrigger($ol_id .
"_tr",
"click", $ol_id .
"_tr");
210 $overlay->setAutoHide(
false);
215 $overlay->addTrigger($ol_id .
"_tr",
"click", $ol_id .
"_tr");
217 $info .=
"<p id=\"" . $ol_id .
"_tr\"><a href=\"#\">" .
$lng->txt(
"exc_instruction") .
"</a></p>" .
218 "<div id=\"" . $ol_id .
"\" style=\"display:none; background-color:white; border: 1px solid #bbb; padding: 10px;\">" . $tooltip .
"</div>";
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
static setUseRelativeDates($a_status)
set use relative dates
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static useRelativeDates()
check if relative dates are used
This is a utility class for the yui overlays.