3 declare(strict_types=1);
17 $this->
lng->loadLanguageModule(
"exc");
19 $f = $DIC->ui()->factory();
20 $r = $DIC->ui()->renderer();
27 $exc_ref = current($refs);
36 $ass_id = $a_app[
"event"]->getContextId() / 10;
40 if ($state->areInstructionsVisible()) {
41 $assignment_instructions = trim($assignment->getInstruction());
42 if ($assignment_instructions !=
"") {
44 $is_html = (strlen($assignment_instructions) != strlen(strip_tags($assignment_instructions)));
46 $assignment_instructions = nl2br($assignment_instructions);
50 $files = $assignment->getFiles();
51 if (count($files) > 0) {
52 $this->has_files =
true;
54 foreach ($files as $file) {
55 $this->
ctrl->setParameterByClass(
"ilexsubmissiongui",
"ref_id", $exc_ref);
56 $this->
ctrl->setParameterByClass(
"ilexsubmissiongui",
"file", urlencode($file[
"name"]));
57 $this->
ctrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id", $ass_id);
58 $url = $this->
ctrl->getLinkTargetByClass(array(
"ilExerciseHandlerGUI",
62 $this->
ctrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id",
"");
63 $this->
ctrl->setParameterByClass(
"ilexsubmissiongui",
"file",
"");
64 $this->
ctrl->setParameterByClass(
"ilexsubmissiongui",
"ref_if",
"");
65 $str_files[$file[
"name"]] = $r->render(
$f->button()->shy($file[
"name"],
$url));
67 ksort($str_files, SORT_NATURAL | SORT_FLAG_CASE);
68 $str_files = implode(
"<br>", $str_files);
71 $this->
lng->txt(
"exc_instruction_files"),
72 str_replace(
"<br>",
", ", $str_files)
78 if ($assignment->getMandatory()) {
91 $this->
lng->txt(
"cal_exc_open"),
92 "goto.php?target=exc_" . $exc_ref .
"_" . $ass_id .
"&client_id=" .
CLIENT_ID 102 if (is_array($a_appointment)) {
103 $ass_id = $a_appointment[
"event"]->getContextId() / 10;
106 return parent::buildDirectLinkForAppointment($a_ref_id, $a_appointment);
addListItemProperty(string $a_txt, string $a_val)
Add list item property.
buildDirectLinkForAppointment(int $a_ref_id, ?array $a_appointment=null)
getReadableRefIds(int $a_obj_id)
addInfoSection(string $a_txt)
Add info section.
addInfoProperty(string $a_txt, string $a_val)
Add info property.
addLastUpdate(array $a_app)
Add last update.
static getInstanceByIds(int $a_ass_id, int $a_user_id=0)
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
collectPropertiesAndActions()
addCommonSection(array $a_app, int $a_obj_id=0, ?array $cat_info=null, bool $a_container_info=false)
addAction(string $a_txt, string $a_link)
Add action.