ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilExAssignmentGUI Class Reference

GUI class for exercise assignments. More...

+ Collaboration diagram for ilExAssignmentGUI:

Public Member Functions

 __construct (ilObjExercise $a_exc)
 Constructor. More...
 
 getOverviewHeader (ilExAssignment $a_ass)
 Get assignment header for overview. More...
 
 getOverviewBody (ilExAssignment $a_ass)
 Get assignment body for overview. More...
 
 getTimeString ($a_deadline)
 Get time string for deadline. More...
 

Protected Member Functions

 addInstructions (ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
 
 addSchedule (ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
 
 addPublicSubmissions (ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
 
 addFiles (ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
 
 addSubmission (ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
 
 addSubmissionFeedback (ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
 
 getSubmissionLink ($a_cmd, array $a_params=null)
 

Protected Attributes

 $lng
 
 $user
 
 $ctrl
 
 $exc
 
 $current_ass_id
 

Detailed Description

GUI class for exercise assignments.

This is not a real GUI class, could be moved to ilObjExerciseGUI

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilExAssignmentGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilExAssignmentGUI::__construct ( ilObjExercise  $a_exc)

Constructor.

Definition at line 34 of file class.ilExAssignmentGUI.php.

35 {
36 global $DIC;
37
38 $this->lng = $DIC->language();
39 $this->user = $DIC->user();
40 $this->ctrl = $DIC->ctrl();
41 $this->exc = $a_exc;
42 }
user()
Definition: user.php:4
global $DIC
Definition: saml.php:7

References $DIC, and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addFiles()

ilExAssignmentGUI::addFiles ( ilInfoScreenGUI  $a_info,
ilExAssignment  $a_ass 
)
protected

Definition at line 261 of file class.ilExAssignmentGUI.php.

262 {
265
266 $files = $a_ass->getFiles();
267
268 if (count($files) > 0) {
269 $a_info->addSection($lng->txt("exc_files"));
270
271 global $DIC;
272
273 //file has -> name,fullpath,size,ctime
274 include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
275 include_once("./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
276 include_once "./Services/UIComponent/Modal/classes/class.ilModalGUI.php";
277
278 $cnt = 0;
279 foreach ($files as $file) {
280 $cnt++;
281 // get mime type
282 $mime = ilObjMediaObject::getMimeType($file['fullpath']);
283
284 list($format, $type) = explode("/", $mime);
285
286 $ui_factory = $DIC->ui()->factory();
287 $ui_renderer = $DIC->ui()->renderer();
288
289 if (in_array($mime, array("image/jpeg", "image/svg+xml", "image/gif", "image/png"))) {
290 $item_id = "il-ex-modal-img-" . $a_ass->getId() . "-" . $cnt;
291
292
293 $image = $ui_renderer->render($ui_factory->image()->responsive($file['fullpath'], $file['name']));
294 $image_lens = ilUtil::getImagePath("enlarge.svg");
295
296 $modal = ilModalGUI::getInstance();
297 $modal->setId($item_id);
298 $modal->setType(ilModalGUI::TYPE_LARGE);
299 $modal->setBody($image);
300 $modal->setHeading($file["name"]);
301 $modal = $modal->getHTML();
302
303 $img_tpl = new ilTemplate("tpl.image_file.html", true, true, "Modules/Exercise");
304 $img_tpl->setCurrentBlock("image_content");
305 $img_tpl->setVariable("MODAL", $modal);
306 $img_tpl->setVariable("ITEM_ID", $item_id);
307 $img_tpl->setVariable("IMAGE", $image);
308 $img_tpl->setvariable("IMAGE_LENS", $image_lens);
309 $img_tpl->parseCurrentBlock();
310
311 $a_info->addProperty($file["name"], $img_tpl->get());
312 } elseif (in_array($mime, array("audio/mpeg", "audio/ogg", "video/mp4", "video/x-flv", "video/webm"))) {
313 $media_tpl = new ilTemplate("tpl.media_file.html", true, true, "Modules/Exercise");
314 $mp = new ilMediaPlayerGUI();
315 $mp->setFile($file['fullpath']);
316 $media_tpl->setVariable("MEDIA", $mp->getMediaPlayerHtml());
317
318 $but = $ui_factory->button()->shy(
319 $lng->txt("download"),
320 $this->getSubmissionLink("downloadFile", array("file"=>urlencode($file["name"])))
321 );
322 $media_tpl->setVariable("DOWNLOAD_BUTTON", $ui_renderer->render($but));
323 $a_info->addProperty($file["name"], $media_tpl->get());
324 } else {
325 $a_info->addProperty($file["name"], $lng->txt("download"), $this->getSubmissionLink("downloadFile", array("file"=>urlencode($file["name"]))));
326 }
327 }
328 }
329 }
$files
Definition: add-vimline.php:18
getId()
Get assignment id.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
addSection($a_title)
add a new section
User interface for media player.
static getInstance()
Get instance.
static getMimeType($a_file, $a_external=null)
get mime type for file
special template class to simplify handling of ITX/PEAR
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilCtrl
Definition: ilias.php:18
$format
Definition: metadata.php:141
$type
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file

References $ctrl, $DIC, $file, $files, $format, $ilCtrl, $lng, $type, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilExAssignment\getFiles(), ilExAssignment\getId(), ilUtil\getImagePath(), ilModalGUI\getInstance(), ilObjMediaObject\getMimeType(), and ilModalGUI\TYPE_LARGE.

Referenced by getOverviewBody().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addInstructions()

ilExAssignmentGUI::addInstructions ( ilInfoScreenGUI  $a_info,
ilExAssignment  $a_ass 
)
protected

Definition at line 167 of file class.ilExAssignmentGUI.php.

168 {
170
171 if (!$a_ass->notStartedYet()) {
172 $inst = $a_ass->getInstruction();
173 if (trim($inst)) {
174 $a_info->addSection($lng->txt("exc_instruction"));
175
176 $is_html = (strlen($inst) != strlen(strip_tags($inst)));
177 if (!$is_html) {
178 $inst = nl2br(ilUtil::makeClickable($inst, true));
179 }
180 $a_info->addProperty("", $inst);
181 }
182 }
183 }
getInstruction()
Get instruction.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen

References $lng, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilExAssignment\getInstruction(), ilUtil\makeClickable(), and ilExAssignment\notStartedYet().

Referenced by getOverviewBody().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPublicSubmissions()

ilExAssignmentGUI::addPublicSubmissions ( ilInfoScreenGUI  $a_info,
ilExAssignment  $a_ass 
)
protected

Definition at line 243 of file class.ilExAssignmentGUI.php.

244 {
246
247 if ($a_ass->afterDeadline()) {
248 $button = ilLinkButton::getInstance();
249 $button->setCaption("exc_list_submission");
250 $button->setUrl($this->getSubmissionLink("listPublicSubmissions"));
251
252 $a_info->addProperty($lng->txt("exc_public_submission"), $button->render());
253 } else {
254 $a_info->addProperty(
255 $lng->txt("exc_public_submission"),
256 $lng->txt("exc_msg_public_submission")
257 );
258 }
259 }
getSubmissionLink($a_cmd, array $a_params=null)
static getInstance()
Factory.

References $lng, ilInfoScreenGUI\addProperty(), ilExAssignment\afterDeadline(), ilLinkButton\getInstance(), and getSubmissionLink().

Referenced by addSubmission().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSchedule()

ilExAssignmentGUI::addSchedule ( ilInfoScreenGUI  $a_info,
ilExAssignment  $a_ass 
)
protected

Definition at line 185 of file class.ilExAssignmentGUI.php.

186 {
189
190 $idl = $a_ass->getPersonalDeadline($ilUser->getId());
191
192 $a_info->addSection($lng->txt("exc_schedule"));
193 if ($a_ass->getStartTime() > 0) {
194 $a_info->addProperty(
195 $lng->txt("exc_start_time"),
197 );
198 }
199
200 // extended deadline info/warning
201 $late_dl = "";
202 if ($idl &&
203 $idl < time() &&
204 $a_ass->beforeDeadline()) { // ext dl is last deadline
205 // extended deadline date should not be presented anywhere
207 $late_dl = "<br />" . sprintf($lng->txt("exc_late_submission_warning"), $late_dl);
208 $late_dl = '<span class="warning">' . $late_dl . '</span>';
209 }
210
211 if ($a_ass->getDeadline()) {
213
214 // add late info if no idl
215 if ($late_dl &&
216 $idl == $a_ass->getDeadline()) {
217 $until .= $late_dl;
218 }
219
220 $a_info->addProperty($lng->txt("exc_edit_until"), $until);
221 }
222
223 if ($idl &&
224 $idl != $a_ass->getDeadline()) {
226
227 // add late info?
228 if ($late_dl) {
229 $until .= $late_dl;
230 }
231
232 $a_info->addProperty($lng->txt("exc_individual_deadline"), $until);
233 }
234
235 if (!$a_ass->notStartedYet()) {
236 $a_info->addProperty(
237 $lng->txt("exc_time_to_send"),
238 "<b>" . $this->getTimeString($idl) . "</b>"
239 );
240 }
241 }
sprintf('%.4f', $callTime)
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
@classDescription Date and time handling
getPersonalDeadline($a_user_id)
Get individual deadline.
getStartTime()
Get start time (timestamp)
getDeadline()
Get deadline (timestamp)
$ilUser
Definition: imgupload.php:18

References $ilUser, $lng, $user, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilExAssignment\beforeDeadline(), ilDatePresentation\formatDate(), ilExAssignment\getDeadline(), ilExAssignment\getPersonalDeadline(), ilExAssignment\getStartTime(), IL_CAL_UNIX, ilExAssignment\notStartedYet(), and sprintf.

Referenced by getOverviewBody().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubmission()

ilExAssignmentGUI::addSubmission ( ilInfoScreenGUI  $a_info,
ilExAssignment  $a_ass 
)
protected

Definition at line 331 of file class.ilExAssignmentGUI.php.

332 {
336
337 $a_info->addSection($lng->txt("exc_submission"));
338
339 include_once "Modules/Exercise/classes/class.ilExSubmission.php";
340 $submission = new ilExSubmission($a_ass, $ilUser->getId());
341
342 include_once "Modules/Exercise/classes/class.ilExSubmissionGUI.php";
343 ilExSubmissionGUI::getOverviewContent($a_info, $submission);
344
345 $last_sub = null;
346 if ($submission->hasSubmitted()) {
347 $last_sub = $submission->getLastSubmission();
348 if ($last_sub) {
349 $last_sub = ilDatePresentation::formatDate(new ilDateTime($last_sub, IL_CAL_DATETIME));
350 $a_info->addProperty($lng->txt("exc_last_submission"), $last_sub);
351 }
352 }
353
354 if ($this->exc->getShowSubmissions()) {
355 $this->addPublicSubmissions($a_info, $a_ass);
356 }
357
358 include_once "Modules/Exercise/classes/class.ilExPeerReviewGUI.php";
359 ilExPeerReviewGUI::getOverviewContent($a_info, $submission);
360
361 // global feedback / sample solution
363 $show_global_feedback = ($a_ass->afterDeadlineStrict() && $a_ass->getFeedbackFile());
364 } else {
365 $show_global_feedback = ($last_sub && $a_ass->getFeedbackFile());
366 }
367
368 $this->addSubmissionFeedback($a_info, $a_ass, $submission->getFeedbackId(), $show_global_feedback);
369 }
const IL_CAL_DATETIME
addSubmissionFeedback(ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
addPublicSubmissions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
afterDeadlineStrict($a_include_personal=true)
getFeedbackDate()
Get (global) feedback file availability date.
getFeedbackFile()
Get (global) feedback file.
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
Exercise submission.

References $ctrl, $ilCtrl, $ilUser, $lng, $user, ilInfoScreenGUI\addProperty(), addPublicSubmissions(), ilInfoScreenGUI\addSection(), addSubmissionFeedback(), ilExAssignment\afterDeadlineStrict(), ilExAssignment\FEEDBACK_DATE_DEADLINE, ilDatePresentation\formatDate(), ilExAssignment\getFeedbackDate(), ilExAssignment\getFeedbackFile(), ilExPeerReviewGUI\getOverviewContent(), ilExSubmissionGUI\getOverviewContent(), and IL_CAL_DATETIME.

Referenced by getOverviewBody().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubmissionFeedback()

ilExAssignmentGUI::addSubmissionFeedback ( ilInfoScreenGUI  $a_info,
ilExAssignment  $a_ass,
  $a_feedback_id,
  $a_show_global_feedback 
)
protected

Definition at line 371 of file class.ilExAssignmentGUI.php.

372 {
374
375 include_once("./Modules/Exercise/classes/class.ilFSStorageExercise.php");
376
377 $storage = new ilFSStorageExercise($a_ass->getExerciseId(), $a_ass->getId());
378 $cnt_files = $storage->countFeedbackFiles($a_feedback_id);
379
380 $lpcomment = $a_ass->getMemberStatus()->getComment();
381 $mark = $a_ass->getMemberStatus()->getMark();
382 $status = $a_ass->getMemberStatus()->getStatus();
383
384 if ($lpcomment != "" ||
385 $mark != "" ||
386 $status != "notgraded" ||
387 $cnt_files > 0 ||
388 $a_show_global_feedback) {
389 $a_info->addSection($lng->txt("exc_feedback_from_tutor"));
390 if ($lpcomment != "") {
391 $a_info->addProperty(
392 $lng->txt("exc_comment"),
393 nl2br($lpcomment)
394 );
395 }
396 if ($mark != "") {
397 $a_info->addProperty(
398 $lng->txt("exc_mark"),
399 $mark
400 );
401 }
402
403 if ($status == "") {
404 // $a_info->addProperty($lng->txt("status"),
405// $lng->txt("message_no_delivered_files"));
406 } elseif ($status != "notgraded") {
407 $img = '<img src="' . ilUtil::getImagePath("scorm/" . $status . ".svg") . '" ' .
408 ' alt="' . $lng->txt("exc_" . $status) . '" title="' . $lng->txt("exc_" . $status) .
409 '" />';
410 $a_info->addProperty(
411 $lng->txt("status"),
412 $img . " " . $lng->txt("exc_" . $status)
413 );
414 }
415
416 if ($cnt_files > 0) {
417 $a_info->addSection($lng->txt("exc_fb_files") .
418 '<a name="fb' . $a_ass->getId() . '"></a>');
419
420 if ($cnt_files > 0) {
421 $files = $storage->getFeedbackFiles($a_feedback_id);
422 foreach ($files as $file) {
423 $a_info->addProperty(
424 $file,
425 $lng->txt("download"),
426 $this->getSubmissionLink("downloadFeedbackFile", array("file"=>urlencode($file)))
427 );
428 }
429 }
430 }
431
432 // #15002 - global feedback
433 if ($a_show_global_feedback) {
434 $a_info->addSection($lng->txt("exc_global_feedback_file"));
435
436 $a_info->addProperty(
437 $a_ass->getFeedbackFile(),
438 $lng->txt("download"),
439 $this->getSubmissionLink("downloadGlobalFeedbackFile")
440 );
441 }
442 }
443 }
getExerciseId()
Get exercise id.
getMemberStatus($a_user_id=null)

References $file, $files, $img, $lng, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilExAssignment\getExerciseId(), ilExAssignment\getFeedbackFile(), ilExAssignment\getId(), ilUtil\getImagePath(), and ilExAssignment\getMemberStatus().

Referenced by addSubmission().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOverviewBody()

ilExAssignmentGUI::getOverviewBody ( ilExAssignment  $a_ass)

Get assignment body for overview.

Definition at line 137 of file class.ilExAssignmentGUI.php.

138 {
139 $this->current_ass_id = $a_ass->getId();
140
141 $tpl = new ilTemplate("tpl.assignment_body.html", true, true, "Modules/Exercise");
142
143 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
144 include_once("./Services/UIComponent/Button/classes/class.ilLinkButton.php");
145
146 $info = new ilInfoScreenGUI(null);
147 $info->setTableClass("");
148
149 $this->addInstructions($info, $a_ass);
150
151 if (!$a_ass->notStartedYet()) {
152 $this->addFiles($info, $a_ass);
153 }
154
155 $this->addSchedule($info, $a_ass);
156
157 if (!$a_ass->notStartedYet()) {
158 $this->addSubmission($info, $a_ass);
159 }
160
161 $tpl->setVariable("CONTENT", $info->getHTML());
162
163 return $tpl->get();
164 }
$tpl
Definition: ilias.php:10
addSubmission(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addSchedule(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addFiles(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addInstructions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
Class ilInfoScreenGUI.
$info
Definition: index.php:5

References $info, $tpl, addFiles(), addInstructions(), addSchedule(), addSubmission(), ilExAssignment\getId(), and ilExAssignment\notStartedYet().

+ Here is the call graph for this function:

◆ getOverviewHeader()

ilExAssignmentGUI::getOverviewHeader ( ilExAssignment  $a_ass)

Get assignment header for overview.

Definition at line 47 of file class.ilExAssignmentGUI.php.

48 {
51
52 $lng->loadLanguageModule("exc");
53
54 $tpl = new ilTemplate("tpl.assignment_head.html", true, true, "Modules/Exercise");
55
56 // we are completely ignoring the extended deadline here
57
58 $idl = $a_ass->getPersonalDeadline($ilUser->getId());
59
60 // :TODO: meaning of "ended on"
61 $dl = max($a_ass->getDeadline(), $idl);
62 if ($dl &&
63 $dl < time()) {
64 $tpl->setCurrentBlock("prop");
65 $tpl->setVariable("PROP", $lng->txt("exc_ended_on"));
66 $tpl->setVariable(
67 "PROP_VAL",
69 );
70 $tpl->parseCurrentBlock();
71
72 // #14077
73 if ($a_ass->getPeerReview() &&
74 $a_ass->getPeerReviewDeadline()) {
75 $tpl->setCurrentBlock("prop");
76 $tpl->setVariable("PROP", $lng->txt("exc_peer_review_deadline"));
77 $tpl->setVariable(
78 "PROP_VAL",
80 );
81 $tpl->parseCurrentBlock();
82 }
83 } elseif ($a_ass->notStartedYet()) {
84 $tpl->setCurrentBlock("prop");
85 $tpl->setVariable("PROP", $lng->txt("exc_starting_on"));
86 $tpl->setVariable(
87 "PROP_VAL",
89 );
90 $tpl->parseCurrentBlock();
91 } else {
92 $time_str = $this->getTimeString($idl);
93 $tpl->setCurrentBlock("prop");
94 $tpl->setVariable("PROP", $lng->txt("exc_time_to_send"));
95 $tpl->setVariable("PROP_VAL", $time_str);
96 $tpl->parseCurrentBlock();
97
98 if ($a_ass->getDeadline()) {
99 $tpl->setCurrentBlock("prop");
100 $tpl->setVariable("PROP", $lng->txt("exc_edit_until"));
101 $tpl->setVariable(
102 "PROP_VAL",
104 );
105 $tpl->parseCurrentBlock();
106 }
107
108 if ($idl && $idl != $a_ass->getDeadline()) {
109 $tpl->setCurrentBlock("prop");
110 $tpl->setVariable("PROP", $lng->txt("exc_individual_deadline"));
111 $tpl->setVariable(
112 "PROP_VAL",
114 );
115 $tpl->parseCurrentBlock();
116 }
117 }
118
119 $mand = "";
120 if ($a_ass->getMandatory()) {
121 $mand = " (" . $lng->txt("exc_mandatory") . ")";
122 }
123 $tpl->setVariable("TITLE", $a_ass->getTitle() . $mand);
124
125 // status icon
126 $stat = $a_ass->getMemberStatus()->getStatus();
127 $pic = $a_ass->getMemberStatus()->getStatusIcon();
128 $tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
129 $tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $stat));
130
131 return $tpl->get();
132 }
getTimeString($a_deadline)
Get time string for deadline.
getPeerReview()
Get peer review status.
getPeerReviewDeadline()
Get peer review deadline (timestamp)
getMandatory()
Get mandatory.

References $ilUser, $lng, $tpl, $user, ilDatePresentation\formatDate(), ilExAssignment\getDeadline(), ilUtil\getImagePath(), ilExAssignment\getMandatory(), ilExAssignment\getMemberStatus(), ilExAssignment\getPeerReview(), ilExAssignment\getPeerReviewDeadline(), ilExAssignment\getPersonalDeadline(), ilExAssignment\getStartTime(), getTimeString(), ilExAssignment\getTitle(), IL_CAL_UNIX, and ilExAssignment\notStartedYet().

+ Here is the call graph for this function:

◆ getSubmissionLink()

ilExAssignmentGUI::getSubmissionLink (   $a_cmd,
array  $a_params = null 
)
protected

Definition at line 465 of file class.ilExAssignmentGUI.php.

466 {
468
469 if (is_array($a_params)) {
470 foreach ($a_params as $name => $value) {
471 $ilCtrl->setParameterByClass("ilexsubmissiongui", $name, $value);
472 }
473 }
474
475 $ilCtrl->setParameterByClass("ilexsubmissiongui", "ass_id", $this->current_ass_id);
476 $url = $ilCtrl->getLinkTargetByClass("ilexsubmissiongui", $a_cmd);
477 $ilCtrl->setParameterByClass("ilexsubmissiongui", "ass_id", "");
478
479 if (is_array($a_params)) {
480 foreach ($a_params as $name => $value) {
481 $ilCtrl->setParameterByClass("ilexsubmissiongui", $name, "");
482 }
483 }
484
485 return $url;
486 }
if($format !==null) $name
Definition: metadata.php:146
$url

References $ctrl, $ilCtrl, $name, and $url.

Referenced by addPublicSubmissions().

+ Here is the caller graph for this function:

◆ getTimeString()

ilExAssignmentGUI::getTimeString (   $a_deadline)

Get time string for deadline.

Definition at line 448 of file class.ilExAssignmentGUI.php.

449 {
451
452 if ($a_deadline == 0) {
453 return $lng->txt("exc_submit_convenience_no_deadline");
454 }
455
456 if ($a_deadline - time() <= 0) {
457 $time_str = $lng->txt("exc_time_over_short");
458 } else {
459 $time_str = ilUtil::period2String(new ilDateTime($a_deadline, IL_CAL_UNIX));
460 }
461
462 return $time_str;
463 }
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.

References $lng, IL_CAL_UNIX, and ilUtil\period2String().

Referenced by getOverviewHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilExAssignmentGUI::$ctrl
protected

Definition at line 26 of file class.ilExAssignmentGUI.php.

Referenced by addFiles(), addSubmission(), and getSubmissionLink().

◆ $current_ass_id

ilExAssignmentGUI::$current_ass_id
protected

Definition at line 29 of file class.ilExAssignmentGUI.php.

◆ $exc

ilExAssignmentGUI::$exc
protected

Definition at line 28 of file class.ilExAssignmentGUI.php.

◆ $lng

◆ $user

ilExAssignmentGUI::$user
protected

Definition at line 21 of file class.ilExAssignmentGUI.php.

Referenced by addSchedule(), addSubmission(), and getOverviewHeader().


The documentation for this class was generated from the following file: