2 include_once
'./Services/Calendar/interfaces/interface.ilCalendarAppointmentPresentation.php';
3 include_once
'./Services/Calendar/classes/AppointmentPresentation/class.ilAppointmentPresentationGUI.php';
20 $this->lng->loadLanguageModule(
"exc");
22 include_once
"./Modules/Exercise/classes/class.ilObjExercise.php";
23 include_once(
'./Services/Link/classes/class.ilLink.php');
24 include_once(
"./Modules/Exercise/classes/class.ilExAssignment.php");
26 $f = $DIC->ui()->factory();
27 $r = $DIC->ui()->renderer();
35 $exc_ref = current($refs);
44 $ass_id = $a_app[
"event"]->getContextId() / 10;
47 $assignment_instructions = trim($assignment->getInstruction());
48 if ($assignment_instructions !=
"") {
50 $is_html = (strlen($assignment_instructions) != strlen(strip_tags($assignment_instructions)));
52 $assignment_instructions = nl2br($assignment_instructions);
54 $this->
addInfoProperty($this->lng->txt(
"exc_instruction"), $assignment_instructions);
56 $files = $assignment->getFiles();
57 if (count($files) > 0 && !$assignment->notStartedYet()) {
58 $this->has_files =
true;
60 foreach ($files as
$file) {
61 $ctrl->setParameterByClass(
"ilexsubmissiongui",
"ref_id", $exc_ref);
62 $ctrl->setParameterByClass(
"ilexsubmissiongui",
"file", urlencode($file[
"name"]));
63 $ctrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id", $ass_id);
64 $url =
$ctrl->getLinkTargetByClass(
array(
"ilExerciseHandlerGUI",
"ilobjexercisegui",
"ilexsubmissiongui"),
"downloadFile");
65 $ctrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id",
"");
66 $ctrl->setParameterByClass(
"ilexsubmissiongui",
"file",
"");
67 $ctrl->setParameterByClass(
"ilexsubmissiongui",
"ref_if",
"");
68 $str_files[$file[
"name"]] =
$r->render($f->button()->shy($file[
"name"],
$url));
70 ksort($str_files, SORT_NATURAL | SORT_FLAG_CASE);
71 $str_files = implode(
"<br>", $str_files);
72 $this->
addInfoProperty($this->lng->txt(
"exc_instruction_files"), $str_files);
73 $this->
addListItemProperty($this->lng->txt(
"exc_instruction_files"), str_replace(
"<br>",
", ", $str_files));
77 if ($assignment->getMandatory()) {
78 $this->
addInfoProperty($this->lng->txt(
"exc_mandatory"), $this->lng->txt(
"yes"));
81 $this->
addInfoProperty($this->lng->txt(
"exc_mandatory"), $this->lng->txt(
"no"));
90 $this->lng->txt(
"cal_exc_open"),
91 "goto.php?target=exc_" . $exc_ref .
"_" . $ass_id .
"&client_id=" . CLIENT_ID
addInfoProperty($a_txt, $a_val)
Add info property.
getReadableRefIds($a_obj_id)
Get readable ref ids.
addCommonSection($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
Add common section.
addLastUpdate($a_app)
Add last update.
collectPropertiesAndActions()
Create styles array
The data for the language used.
addListItemProperty($a_txt, $a_val)
Add list item property.
addAction($a_txt, $a_link)
Add action.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
addInfoSection($a_txt)
Add info section.