ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilExAssignmentGUI Class Reference

GUI class for exercise assignments. More...

+ Collaboration diagram for ilExAssignmentGUI:

Public Member Functions

 __construct (ilObjExercise $a_exc, ilExerciseInternalService $service)
 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
 
 $service
 
 $mandatory_manager
 

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

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

Constructor & Destructor Documentation

◆ __construct()

ilExAssignmentGUI::__construct ( ilObjExercise  $a_exc,
ilExerciseInternalService  $service 
)

Constructor.

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

44 {
45 global $DIC;
46
47 $this->lng = $DIC->language();
48 $this->user = $DIC->user();
49 $this->ctrl = $DIC->ctrl();
50 $this->ui = $DIC->ui();
51
52 $this->exc = $a_exc;
53 $this->service = $service;
54 $this->mandatory_manager = $service->getMandatoryAssignmentManager($this->exc);
55 }
user()
Definition: user.php:4
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46

References $DIC, $service, ui(), 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 269 of file class.ilExAssignmentGUI.php.

270 {
273
274 $lng->loadLanguageModule("exc");
275
276 $files = $a_ass->getFiles();
277
278 if (count($files) > 0) {
279 $a_info->addSection($lng->txt("exc_files"));
280
281 global $DIC;
282
283 //file has -> name,fullpath,size,ctime
284 $cnt = 0;
285 foreach ($files as $file) {
286 $cnt++;
287 // get mime type
288 $mime = ilObjMediaObject::getMimeType($file['fullpath']);
289
290 list($format, $type) = explode("/", $mime);
291
292 $ui_factory = $DIC->ui()->factory();
293 $ui_renderer = $DIC->ui()->renderer();
294
295 $output_filename = htmlspecialchars($file['name']);
296
297 if (in_array($mime, array("image/jpeg", "image/svg+xml", "image/gif", "image/png"))) {
298 $item_id = "il-ex-modal-img-" . $a_ass->getId() . "-" . $cnt;
299
300
301 $image = $ui_renderer->render($ui_factory->image()->responsive($file['fullpath'], $output_filename));
302 $image_lens = ilUtil::getImagePath("enlarge.svg");
303
304 $modal = ilModalGUI::getInstance();
305 $modal->setId($item_id);
306 $modal->setType(ilModalGUI::TYPE_LARGE);
307 $modal->setBody($image);
308 $modal->setHeading($output_filename);
309 $modal = $modal->getHTML();
310
311 $img_tpl = new ilTemplate("tpl.image_file.html", true, true, "Modules/Exercise");
312 $img_tpl->setCurrentBlock("image_content");
313 $img_tpl->setVariable("MODAL", $modal);
314 $img_tpl->setVariable("ITEM_ID", $item_id);
315 $img_tpl->setVariable("IMAGE", $image);
316 $img_tpl->setvariable("IMAGE_LENS", $image_lens);
317 $img_tpl->setvariable("ALT_LENS", $lng->txt("exc_fullscreen"));
318 $img_tpl->parseCurrentBlock();
319
320 $a_info->addProperty($output_filename, $img_tpl->get());
321 } elseif (in_array($mime, array("audio/mpeg", "audio/ogg", "video/mp4", "video/x-flv", "video/webm"))) {
322 $media_tpl = new ilTemplate("tpl.media_file.html", true, true, "Modules/Exercise");
323 $mp = new ilMediaPlayerGUI();
324 $mp->setFile($file['fullpath']);
325 $media_tpl->setVariable("MEDIA", $mp->getMediaPlayerHtml());
326
327 $but = $ui_factory->button()->shy(
328 $lng->txt("download"),
329 $this->getSubmissionLink("downloadFile", array("file" => urlencode($file["name"])))
330 );
331 $media_tpl->setVariable("DOWNLOAD_BUTTON", $ui_renderer->render($but));
332 $a_info->addProperty($output_filename, $media_tpl->get());
333 } else {
334 $a_info->addProperty($output_filename, $lng->txt("download"), $this->getSubmissionLink("downloadFile", array("file" => urlencode($file["name"]))));
335 }
336 }
337 }
338 }
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:218
$type

References $ctrl, $DIC, $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 188 of file class.ilExAssignmentGUI.php.

189 {
191
192 $info = new ilExAssignmentInfo($a_ass->getId(), $ilUser->getId());
193 $inst = $info->getInstructionInfo();
194 if (count($inst) > 0) {
195 $a_info->addSection($inst["instruction"]["txt"]);
196 $a_info->addProperty("", $inst["instruction"]["value"]);
197 }
198 }
$ilUser
Definition: imgupload.php:18

References $ilUser, $user, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), and ilExAssignment\getId().

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 246 of file class.ilExAssignmentGUI.php.

247 {
250
251
252 $state = ilExcAssMemberState::getInstanceByIds($a_ass->getId(), $ilUser->getId());
253
254 // submissions are visible, even if other users may still have a larger individual deadline
255 if ($state->hasSubmissionEnded()) {
256 $button = ilLinkButton::getInstance();
257 $button->setCaption("exc_list_submission");
258 $button->setUrl($this->getSubmissionLink("listPublicSubmissions"));
259
260 $a_info->addProperty($lng->txt("exc_public_submission"), $button->render());
261 } else {
262 $a_info->addProperty(
263 $lng->txt("exc_public_submission"),
264 $lng->txt("exc_msg_public_submission")
265 );
266 }
267 }
getSubmissionLink($a_cmd, array $a_params=null)
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)
static getInstance()
Factory.

References $ilUser, $lng, $user, ilInfoScreenGUI\addProperty(), ilExAssignment\getId(), ilLinkButton\getInstance(), ilExcAssMemberState\getInstanceByIds(), 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 200 of file class.ilExAssignmentGUI.php.

201 {
205
206 $info = new ilExAssignmentInfo($a_ass->getId(), $ilUser->getId());
207 $schedule = $info->getScheduleInfo();
208
209 $state = ilExcAssMemberState::getInstanceByIds($a_ass->getId(), $ilUser->getId());
210
211 $a_info->addSection($lng->txt("exc_schedule"));
212 if ($state->getGeneralStart() > 0) {
213 $a_info->addProperty($schedule["start_time"]["txt"], $schedule["start_time"]["value"]);
214 }
215
216
217 if ($state->getCommonDeadline()) { // if we have a common deadline (target timestamp)
218 $a_info->addProperty($schedule["until"]["txt"], $schedule["until"]["value"]);
219 } elseif ($state->getRelativeDeadline()) { // if we only have a relative deadline (not started yet)
220 $but = "";
221 if ($state->hasGenerallyStarted()) {
222 $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_ass->getId());
223 $but = $this->ui->factory()->button()->primary($lng->txt("exc_start_assignment"), $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "startAssignment"));
224 $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $_GET["ass_id"]);
225 $but = $this->ui->renderer()->render($but);
226 }
227
228 $a_info->addProperty($schedule["time_after_start"]["txt"], $schedule["time_after_start"]["value"] . " " . $but);
229 if ($state->getLastSubmissionOfRelativeDeadline()) { // if we only have a relative deadline (not started yet)
230 $a_info->addProperty(
231 $lng->txt("exc_rel_last_submission"),
232 $state->getLastSubmissionOfRelativeDeadlinePresentation()
233 );
234 }
235 }
236
237 if ($state->getOfficialDeadline() > $state->getCommonDeadline()) {
238 $a_info->addProperty($schedule["individual_deadline"]["txt"], $schedule["individual_deadline"]["value"]);
239 }
240
241 if ($state->hasSubmissionStarted()) {
242 $a_info->addProperty($schedule["time_to_send"]["txt"], $schedule["time_to_send"]["value"]);
243 }
244 }
$_GET["client_id"]

References $_GET, $ctrl, $ilCtrl, $ilUser, $lng, $user, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilExAssignment\getId(), ilExcAssMemberState\getInstanceByIds(), and ui().

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 340 of file class.ilExAssignmentGUI.php.

341 {
345
346 $state = ilExcAssMemberState::getInstanceByIds($a_ass->getId(), $ilUser->getId());
347
348 $a_info->addSection($lng->txt("exc_your_submission"));
349
350 $submission = new ilExSubmission($a_ass, $ilUser->getId());
351
352 ilExSubmissionGUI::getOverviewContent($a_info, $submission, $this->exc);
353
354 $last_sub = null;
355 if ($submission->hasSubmitted()) {
356 $last_sub = $submission->getLastSubmission();
357 if ($last_sub) {
358 $last_sub = ilDatePresentation::formatDate(new ilDateTime($last_sub, IL_CAL_DATETIME));
359 $a_info->addProperty($lng->txt("exc_last_submission"), $last_sub);
360 }
361 }
362
363 if ($this->exc->getShowSubmissions()) {
364 $this->addPublicSubmissions($a_info, $a_ass);
365 }
366
367 ilExPeerReviewGUI::getOverviewContent($a_info, $submission);
368
369 // global feedback / sample solution
371 $show_global_feedback = ($state->hasSubmissionEndedForAllUsers() && $a_ass->getFeedbackFile());
372 }
373 //If it is not well configured...(e.g. show solution before deadline)
374 //the user can get the solution before he summit it.
375 //we can check in the elseif $submission->hasSubmitted()
377 $show_global_feedback = ($a_ass->afterCustomDate() && $a_ass->getFeedbackFile());
378 } else {
379 $show_global_feedback = ($last_sub && $a_ass->getFeedbackFile());
380 }
381
382 $this->addSubmissionFeedback($a_info, $a_ass, $submission->getFeedbackId(), $show_global_feedback);
383 }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
addSubmissionFeedback(ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
addPublicSubmissions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
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, ilObjExercise $a_exc)
Exercise submission //TODO: This class has to much static methods related to delivered "files".

References $ctrl, $ilCtrl, $ilUser, $lng, $user, ilInfoScreenGUI\addProperty(), addPublicSubmissions(), ilInfoScreenGUI\addSection(), addSubmissionFeedback(), ilExAssignment\afterCustomDate(), ilExAssignment\FEEDBACK_DATE_CUSTOM, ilExAssignment\FEEDBACK_DATE_DEADLINE, ilDatePresentation\formatDate(), ilExAssignment\getFeedbackDate(), ilExAssignment\getFeedbackFile(), ilExAssignment\getId(), ilExcAssMemberState\getInstanceByIds(), 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 385 of file class.ilExAssignmentGUI.php.

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

References $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 156 of file class.ilExAssignmentGUI.php.

157 {
158 global $DIC;
159
160 $ilUser = $DIC->user();
161
162 $this->current_ass_id = $a_ass->getId();
163
164 $tpl = new ilTemplate("tpl.assignment_body.html", true, true, "Modules/Exercise");
165
166 $state = ilExcAssMemberState::getInstanceByIds($a_ass->getId(), $ilUser->getId());
167
168 $info = new ilInfoScreenGUI(null);
169 $info->setTableClass("");
170
171 if ($state->areInstructionsVisible()) {
172 $this->addInstructions($info, $a_ass);
173 $this->addFiles($info, $a_ass);
174 }
175
176 $this->addSchedule($info, $a_ass);
177
178 if ($state->hasSubmissionStarted()) {
179 $this->addSubmission($info, $a_ass);
180 }
181
182 $tpl->setVariable("CONTENT", $info->getHTML());
183
184 return $tpl->get();
185 }
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.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl

References $DIC, $ilUser, $tpl, addFiles(), addInstructions(), addSchedule(), addSubmission(), ilExAssignment\getId(), and ilExcAssMemberState\getInstanceByIds().

+ Here is the call graph for this function:

◆ getOverviewHeader()

ilExAssignmentGUI::getOverviewHeader ( ilExAssignment  $a_ass)

Get assignment header for overview.

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

61 {
64
65 $lng->loadLanguageModule("exc");
66
67 $state = ilExcAssMemberState::getInstanceByIds($a_ass->getId(), $ilUser->getId());
68
69 $tpl = new ilTemplate("tpl.assignment_head.html", true, true, "Modules/Exercise");
70
71 // we are completely ignoring the extended deadline here
72
73 $idl = $a_ass->getPersonalDeadline($ilUser->getId());
74
75 // :TODO: meaning of "ended on"
76 $dl = max($a_ass->getDeadline(), $idl);
77 // if ($dl &&
78 // $dl < time())
79 if ($state->exceededOfficialDeadline()) {
80 $tpl->setCurrentBlock("prop");
81 $tpl->setVariable("PROP", $lng->txt("exc_ended_on"));
82 $tpl->setVariable("PROP_VAL", $state->getCommonDeadlinePresentation());
83 $tpl->parseCurrentBlock();
84
85 // #14077 // this currently shows the feedback deadline during grace period
86 if ($state->getPeerReviewDeadline()) {
87 $tpl->setCurrentBlock("prop");
88 $tpl->setVariable("PROP", $lng->txt("exc_peer_review_deadline"));
89 $tpl->setVariable("PROP_VAL", $state->getPeerReviewDeadlinePresentation());
90 $tpl->parseCurrentBlock();
91 }
92 } elseif (!$state->hasGenerallyStarted()) {
93 if ($state->getRelativeDeadline()) {
94 $tpl->setCurrentBlock("prop");
95 $tpl->setVariable("PROP", $lng->txt("exc_earliest_start_time"));
96 $tpl->setVariable("PROP_VAL", $state->getGeneralStartPresentation());
97 $tpl->parseCurrentBlock();
98 } else {
99 $tpl->setCurrentBlock("prop");
100 $tpl->setVariable("PROP", $lng->txt("exc_starting_on"));
101 $tpl->setVariable("PROP_VAL", $state->getGeneralStartPresentation());
102 $tpl->parseCurrentBlock();
103 }
104 } else {
105 if ($state->getCommonDeadline() > 0) {
106 $tpl->setCurrentBlock("prop");
107 $tpl->setVariable("PROP", $lng->txt("exc_time_to_send"));
108 $tpl->setVariable("PROP_VAL", $state->getRemainingTimePresentation());
109 $tpl->parseCurrentBlock();
110
111 $tpl->setCurrentBlock("prop");
112 $tpl->setVariable("PROP", $lng->txt("exc_edit_until"));
113 $tpl->setVariable("PROP_VAL", $state->getCommonDeadlinePresentation());
114 $tpl->parseCurrentBlock();
115 } elseif ($state->getRelativeDeadline()) { // if we only have a relative deadline (not started yet)
116 $tpl->setCurrentBlock("prop");
117 $tpl->setVariable("PROP", $lng->txt("exc_rem_time_after_start"));
118 $tpl->setVariable("PROP_VAL", $state->getRelativeDeadlinePresentation());
119 $tpl->parseCurrentBlock();
120
121 if ($state->getLastSubmissionOfRelativeDeadline()) { // if we only have a relative deadline (not started yet)
122 $tpl->setCurrentBlock("prop");
123 $tpl->setVariable("PROP", $lng->txt("exc_rel_last_submission"));
124 $tpl->setVariable("PROP_VAL", $state->getLastSubmissionOfRelativeDeadlinePresentation());
125 $tpl->parseCurrentBlock();
126 }
127 }
128
129
130 if ($state->getIndividualDeadline() > 0) {
131 $tpl->setCurrentBlock("prop");
132 $tpl->setVariable("PROP", $lng->txt("exc_individual_deadline"));
133 $tpl->setVariable("PROP_VAL", $state->getIndividualDeadlinePresentation());
134 $tpl->parseCurrentBlock();
135 }
136 }
137
138 $mand = "";
139 if ($this->mandatory_manager->isMandatoryForUser($a_ass->getId(), $this->user->getId())) {
140 $mand = " (" . $lng->txt("exc_mandatory") . ")";
141 }
142 $tpl->setVariable("TITLE", $a_ass->getTitle() . $mand);
143
144 // status icon
145 $stat = $a_ass->getMemberStatus()->getStatus();
146 $pic = $a_ass->getMemberStatus()->getStatusIcon();
147 $tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic));
148 $tpl->setVariable("ALT_STATUS", $lng->txt("exc_" . $stat));
149
150 return $tpl->get();
151 }
getPersonalDeadline($a_user_id)
Get individual deadline (max of common or idl (team) deadline = Official Deadline)
getDeadline()
Get deadline (timestamp)

References $ilUser, $lng, $tpl, $user, ilExAssignment\getDeadline(), ilExAssignment\getId(), ilUtil\getImagePath(), ilExcAssMemberState\getInstanceByIds(), ilExAssignment\getMemberStatus(), ilExAssignment\getPersonalDeadline(), and ilExAssignment\getTitle().

+ Here is the call graph for this function:

◆ getSubmissionLink()

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

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

478 {
480
481 if (is_array($a_params)) {
482 foreach ($a_params as $name => $value) {
483 $ilCtrl->setParameterByClass("ilexsubmissiongui", $name, $value);
484 }
485 }
486
487 $ilCtrl->setParameterByClass("ilexsubmissiongui", "ass_id", $this->current_ass_id);
488 $url = $ilCtrl->getLinkTargetByClass("ilexsubmissiongui", $a_cmd);
489 $ilCtrl->setParameterByClass("ilexsubmissiongui", "ass_id", "");
490
491 if (is_array($a_params)) {
492 foreach ($a_params as $name => $value) {
493 $ilCtrl->setParameterByClass("ilexsubmissiongui", $name, "");
494 }
495 }
496
497 return $url;
498 }
if($format !==null) $name
Definition: metadata.php:230
$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 460 of file class.ilExAssignmentGUI.php.

461 {
463
464 if ($a_deadline == 0) {
465 return $lng->txt("exc_submit_convenience_no_deadline");
466 }
467
468 if ($a_deadline - time() <= 0) {
469 $time_str = $lng->txt("exc_time_over_short");
470 } else {
471 $time_str = ilUtil::period2String(new ilDateTime($a_deadline, IL_CAL_UNIX));
472 }
473
474 return $time_str;
475 }
const IL_CAL_UNIX
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.

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

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilExAssignmentGUI::$ctrl
protected

◆ $current_ass_id

ilExAssignmentGUI::$current_ass_id
protected

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

◆ $exc

ilExAssignmentGUI::$exc
protected

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

◆ $lng

◆ $mandatory_manager

ilExAssignmentGUI::$mandatory_manager
protected

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

◆ $service

ilExAssignmentGUI::$service
protected

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

Referenced by __construct().

◆ $user

ilExAssignmentGUI::$user
protected

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