38 $this->lng = $DIC->language();
39 $this->
user = $DIC->user();
40 $this->ctrl = $DIC->ctrl();
52 $lng->loadLanguageModule(
"exc");
54 $tpl =
new ilTemplate(
"tpl.assignment_head.html",
true,
true,
"Modules/Exercise");
64 $tpl->setCurrentBlock(
"prop");
65 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_ended_on"));
70 $tpl->parseCurrentBlock();
75 $tpl->setCurrentBlock(
"prop");
76 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_peer_review_deadline"));
81 $tpl->parseCurrentBlock();
84 $tpl->setCurrentBlock(
"prop");
85 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_starting_on"));
90 $tpl->parseCurrentBlock();
93 $tpl->setCurrentBlock(
"prop");
94 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_time_to_send"));
95 $tpl->setVariable(
"PROP_VAL", $time_str);
96 $tpl->parseCurrentBlock();
99 $tpl->setCurrentBlock(
"prop");
100 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_edit_until"));
105 $tpl->parseCurrentBlock();
109 $tpl->setCurrentBlock(
"prop");
110 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_individual_deadline"));
115 $tpl->parseCurrentBlock();
121 $mand =
" (" .
$lng->txt(
"exc_mandatory") .
")";
129 $tpl->setVariable(
"ALT_STATUS",
$lng->txt(
"exc_" . $stat));
139 $this->current_ass_id = $a_ass->
getId();
141 $tpl =
new ilTemplate(
"tpl.assignment_body.html",
true,
true,
"Modules/Exercise");
143 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
144 include_once(
"./Services/UIComponent/Button/classes/class.ilLinkButton.php");
147 $info->setTableClass(
"");
161 $tpl->setVariable(
"CONTENT",
$info->getHTML());
176 $is_html = (strlen($inst) != strlen(strip_tags($inst)));
195 $lng->txt(
"exc_start_time"),
207 $late_dl =
"<br />" . sprintf(
$lng->txt(
"exc_late_submission_warning"), $late_dl);
208 $late_dl =
'<span class="warning">' . $late_dl .
'</span>';
237 $lng->txt(
"exc_time_to_send"),
249 $button->setCaption(
"exc_list_submission");
252 $a_info->
addProperty(
$lng->txt(
"exc_public_submission"), $button->render());
255 $lng->txt(
"exc_public_submission"),
256 $lng->txt(
"exc_msg_public_submission")
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";
286 $ui_factory = $DIC->ui()->factory();
287 $ui_renderer = $DIC->ui()->renderer();
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;
293 $image = $ui_renderer->render($ui_factory->image()->responsive($file[
'fullpath'], $file[
'name']));
297 $modal->setId($item_id);
299 $modal->setBody($image);
300 $modal->setHeading($file[
"name"]);
301 $modal = $modal->getHTML();
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();
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");
315 $mp->setFile($file[
'fullpath']);
316 $media_tpl->setVariable(
"MEDIA", $mp->getMediaPlayerHtml());
318 $but = $ui_factory->button()->shy(
319 $lng->txt(
"download"),
322 $media_tpl->setVariable(
"DOWNLOAD_BUTTON", $ui_renderer->render($but));
323 $a_info->
addProperty($file[
"name"], $media_tpl->get());
339 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
342 include_once
"Modules/Exercise/classes/class.ilExSubmissionGUI.php";
346 if ($submission->hasSubmitted()) {
347 $last_sub = $submission->getLastSubmission();
354 if ($this->exc->getShowSubmissions()) {
358 include_once
"Modules/Exercise/classes/class.ilExPeerReviewGUI.php";
375 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
384 if ($lpcomment !=
"" ||
386 $status !=
"notgraded" ||
388 $a_show_global_feedback) {
390 if ($lpcomment !=
"") {
392 $lng->txt(
"exc_comment"),
398 $lng->txt(
"exc_mark"),
406 } elseif ($status !=
"notgraded") {
408 ' alt="' .
$lng->txt(
"exc_" . $status) .
'" title="' .
$lng->txt(
"exc_" . $status) .
412 $img .
" " .
$lng->txt(
"exc_" . $status)
416 if ($cnt_files > 0) {
418 '<a name="fb' . $a_ass->
getId() .
'"></a>');
420 if ($cnt_files > 0) {
421 $files = $storage->getFeedbackFiles($a_feedback_id);
425 $lng->txt(
"download"),
433 if ($a_show_global_feedback) {
438 $lng->txt(
"download"),
452 if ($a_deadline == 0) {
453 return $lng->txt(
"exc_submit_convenience_no_deadline");
456 if ($a_deadline -
time() <= 0) {
457 $time_str =
$lng->txt(
"exc_time_over_short");
469 if (is_array($a_params)) {
470 foreach ($a_params as
$name => $value) {
471 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
$name, $value);
475 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id", $this->current_ass_id);
476 $url =
$ilCtrl->getLinkTargetByClass(
"ilexsubmissiongui", $a_cmd);
477 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id",
"");
479 if (is_array($a_params)) {
480 foreach ($a_params as
$name => $value) {
481 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
$name,
"");
getPeerReview()
Get peer review status.
addSubmissionFeedback(ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
getMemberStatus($a_user_id=null)
getPersonalDeadline($a_user_id)
Get individual deadline.
addPublicSubmissions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getFeedbackDate()
Get (global) feedback file availability date.
getStartTime()
Get start time (timestamp)
getId()
Get assignment id.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
getDeadline()
Get deadline (timestamp)
addInstructions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addSection($a_title)
add a new section
addSchedule(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
GUI class for exercise assignments.
getExerciseId()
Get exercise id.
getOverviewBody(ilExAssignment $a_ass)
Get assignment body for overview.
getTimeString($a_deadline)
Get time string for deadline.
addFiles(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
special template class to simplify handling of ITX/PEAR
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
getFeedbackFile()
Get (global) feedback file.
Create styles array
The data for the language used.
__construct(ilObjExercise $a_exc)
Constructor.
getMandatory()
Get mandatory.
getOverviewHeader(ilExAssignment $a_ass)
Get assignment header for overview.
afterDeadlineStrict($a_include_personal=true)
const FEEDBACK_DATE_DEADLINE
static getInstance()
Get instance.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
getInstruction()
Get instruction.
addSubmission(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
getPeerReviewDeadline()
Get peer review deadline (timestamp)
countFeedbackFiles($a_user_id)
Count number of feedback files for a user.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
getSubmissionLink($a_cmd, array $a_params=null)