115 $lng = $DIC->language();
118 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
120 $exercise_id = $ass->getExerciseId();
126 $times_up = $ass->afterDeadlineStrict();
129 include_once
"./Services/Link/classes/class.ilLink.php";
133 $info_arr[
"ass_title"] = $ass->getTitle();
135 $lng->txt(
"prtf_exercise_info"),
143 if ($a_add_submit && !$times_up && !$as_array) {
144 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass", $a_assignment_id);
145 $submit_link =
$ilCtrl->getLinkTargetByClass(
"ilportfolioexercisegui",
"finalize");
146 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass",
"");
148 $buttons[] = $ui->factory()->button()->primary(
$lng->txt(
"prtf_finalize_portfolio"), $submit_link);
152 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
154 $info_arr[
"submitted"] =
false;
155 if ($submission->hasSubmitted()) {
157 $submitted = $submission->getSelectedObject();
160 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass", $a_assignment_id);
161 $dl_link =
$ilCtrl->getLinkTargetByClass(
"ilportfolioexercisegui",
"downloadExcSubFile");
162 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass",
"");
167 $text .=
"<p>" . sprintf(
168 $lng->txt(
"prtf_exercise_submitted_info"),
172 $buttons[] = $ui->factory()->button()->standard(
$lng->txt(
"prtf_download_submission"), $dl_link);
177 $info_arr[
"submitted"] =
true;
178 if ($submitted[
"ts"] ==
"") {
179 $info_arr[
"submitted"] =
false;
187 $inst = $ass->getInstruction();
189 $tooltip .= nl2br($inst);
192 $ass_files = $ass->getFiles();
194 if (count($ass_files) > 0) {
196 $tooltip .=
"<br /><br />";
201 foreach ($ass_files as
$file) {
202 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass", $a_assignment_id);
203 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"file", urlencode($file[
"name"]));
204 $dl_link =
$ilCtrl->getLinkTargetByClass(
"ilportfolioexercisegui",
"downloadExcAssFile");
205 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"file",
"");
206 $ilCtrl->setParameterByClass(
"ilportfolioexercisegui",
"ass",
"");
208 $items[] = $ui->renderer()->render($ui->factory()->button()->shy($file[
"name"], $dl_link));
210 $list = $ui->factory()->listing()->unordered($items);
211 $tooltip .= $ui->renderer()->render(
$list);
216 $modal = $ui->factory()->modal()->roundtrip(
$lng->txt(
"exc_instruction"), $ui->factory()->legacy($tooltip))
217 ->withCancelButtonLabel(
"close");
218 $elements[] = $modal;
219 $buttons[] = $ui->factory()->button()->standard(
$lng->txt(
"exc_instruction"),
'#')
220 ->withOnClick($modal->getShowSignal());
227 $elements[] = $ui->factory()->messageBox()->info(
$text)
229 ->withButtons($buttons);
231 return $ui->renderer()->render($elements);
if(isset($_REQUEST['delete'])) $list
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static setUseRelativeDates($a_status)
set use relative dates
static _lookupTitle($a_id)
lookup object title
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _getAllReferences($a_id)
get all reference ids of object
static useRelativeDates()
check if relative dates are used
Exercise submission //TODO: This class has to much static methods related to delivered "files"...