31 $lng->loadLanguageModule(
"exc");
33 $tpl =
new ilTemplate(
"tpl.assignment_head.html",
true,
true,
"Modules/Exercise");
44 $tpl->setCurrentBlock(
"prop");
45 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_ended_on"));
46 $tpl->setVariable(
"PROP_VAL",
48 $tpl->parseCurrentBlock();
54 $tpl->setCurrentBlock(
"prop");
55 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_peer_review_deadline"));
56 $tpl->setVariable(
"PROP_VAL",
58 $tpl->parseCurrentBlock();
63 $tpl->setCurrentBlock(
"prop");
64 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_starting_on"));
65 $tpl->setVariable(
"PROP_VAL",
67 $tpl->parseCurrentBlock();
72 $tpl->setCurrentBlock(
"prop");
73 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_time_to_send"));
74 $tpl->setVariable(
"PROP_VAL", $time_str);
75 $tpl->parseCurrentBlock();
79 $tpl->setCurrentBlock(
"prop");
80 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_edit_until"));
81 $tpl->setVariable(
"PROP_VAL",
83 $tpl->parseCurrentBlock();
88 $tpl->setCurrentBlock(
"prop");
89 $tpl->setVariable(
"PROP",
$lng->txt(
"exc_individual_deadline"));
90 $tpl->setVariable(
"PROP_VAL",
92 $tpl->parseCurrentBlock();
99 $mand =
" (".$lng->txt(
"exc_mandatory").
")";
107 $tpl->setVariable(
"ALT_STATUS",
$lng->txt(
"exc_".$stat));
117 $this->current_ass_id = $a_ass->
getId();
119 $tpl =
new ilTemplate(
"tpl.assignment_body.html",
true,
true,
"Modules/Exercise");
121 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
122 include_once(
"./Services/UIComponent/Button/classes/class.ilLinkButton.php");
125 $info->setTableClass(
"");
130 if ($this->exc->getShowSubmissions())
141 $tpl->setVariable(
"CONTENT",
$info->getHTML());
158 $is_html = (strlen($inst) != strlen(strip_tags($inst)));
189 $late_dl =
"<br />".sprintf(
$lng->txt(
"exc_late_submission_warning"), $late_dl);
190 $late_dl =
'<span class="warning">'.$late_dl.
'</span>';
224 "<b>".$this->getTimeString($idl).
"</b>");
235 $button->setCaption(
"exc_list_submission");
238 $a_info->
addProperty(
$lng->txt(
"exc_public_submission"), $button->render());
243 $lng->txt(
"exc_msg_public_submission"));
257 $a_info->
addProperty(
$file[
"name"],
$lng->txt(
"download"), $this->getSubmissionLink(
"downloadFile", array(
"file"=>urlencode(
$file[
"name"]))));
268 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
271 include_once
"Modules/Exercise/classes/class.ilExSubmissionGUI.php";
275 if($submission->hasSubmitted())
277 $last_sub = $submission->getLastSubmission();
285 include_once
"Modules/Exercise/classes/class.ilExPeerReviewGUI.php";
306 $cnt_files = $storage->countFeedbackFiles($a_feedback_id);
312 if ($lpcomment !=
"" ||
314 $status !=
"notgraded" ||
316 $a_show_global_feedback)
319 if ($lpcomment !=
"")
335 else if ($status !=
"notgraded")
337 $img =
'<img src="'.ilUtil::getImagePath(
"scorm/".$status.
".svg").
'" '.
338 ' alt="'.$lng->txt(
"exc_".$status).
'" title="'.
$lng->txt(
"exc_".$status).
341 $img.
" ".
$lng->txt(
"exc_".$status));
347 '<a name="fb'.$a_ass->getId().
'"></a>');
351 $files = $storage->getFeedbackFiles($a_feedback_id);
355 $lng->txt(
"download"),
356 $this->getSubmissionLink(
"downloadFeedbackFile", array(
"file"=>urlencode(
$file))));
362 if($a_show_global_feedback)
367 $lng->txt(
"download"),
368 $this->getSubmissionLink(
"downloadGlobalFeedbackFile"));
380 if ($a_deadline == 0)
382 return $lng->txt(
"exc_no_deadline_specified");
385 if ($a_deadline - time() <= 0)
387 $time_str =
$lng->txt(
"exc_time_over_short");
401 if(is_array($a_params))
403 foreach($a_params as $name => $value)
405 $ilCtrl->setParameterByClass(
"ilexsubmissiongui", $name, $value);
409 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id", $this->current_ass_id);
410 $url =
$ilCtrl->getLinkTargetByClass(
"ilexsubmissiongui", $a_cmd);
411 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id",
"");
413 if(is_array($a_params))
415 foreach($a_params as $name => $value)
417 $ilCtrl->setParameterByClass(
"ilexsubmissiongui", $name,
"");
An exception for terminatinating execution or to throw for unit testing.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
GUI class for exercise assignments.
addSubmission(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getOverviewHeader(ilExAssignment $a_ass)
Get assignment header for overview.
addSchedule(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getTimeString($a_deadline)
Get time string for deadline.
addSubmissionFeedback(ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
getSubmissionLink($a_cmd, array $a_params=null)
__construct(ilObjExercise $a_exc)
Constructor.
addFiles(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addPublicSubmissions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getOverviewBody(ilExAssignment $a_ass)
Get assignment body for overview.
addInstructions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getPersonalDeadline($a_user_id)
Get individual deadline.
afterDeadlineStrict($a_include_personal=true)
getFeedbackDate()
Get (global) feedback file availability date.
getExerciseId()
Get exercise id.
getId()
Get assignment id.
getInstruction()
Get instruction.
getPeerReview()
Get peer review status.
getStartTime()
Get start time (timestamp)
getMemberStatus($a_user_id=null)
const FEEDBACK_DATE_DEADLINE
getPeerReviewDeadline()
Get peer review deadline (timestamp)
getFeedbackFile()
Get (global) feedback file.
getDeadline()
Get deadline (timestamp)
getMandatory()
Get mandatory.
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
addProperty($a_name, $a_value, $a_link="")
add a property to current section
addSection($a_title)
add a new section
special template class to simplify handling of ITX/PEAR
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file