23 return $this->context_collection->
main()->main();
34 $lng = $DIC->language();
35 $lng->loadLanguageModule(
"exc");
37 $title =
$lng->txt(
"exc_assignment");
38 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(
"exc", $title)->withIsOutlined(
true);
41 $additional_data = $called_contexts->
current()->getAdditionalData();
42 if ($additional_data->is(self::SHOW_EXC_ASSIGNMENT_INFO,
true)) {
43 $iff =
function ($id) {
44 return $this->identification_provider->contextAwareIdentifier($id);
46 $l =
function (
string $content) {
47 return $this->dic->ui()->factory()->legacy($content);
49 $tools[] = $this->factory->tool($iff(
"exc_ass_info"))
52 ->withContentWrapper(
function () use ($l, $additional_data) {
54 $additional_data->get(self::EXC_ASS_IDS),
55 $additional_data->get(self::EXC_ASS_BUTTONS)
71 $lng = $DIC->language();
74 $access = $DIC->access();
77 foreach ($ass_ids as $ass_id) {
81 if ($access->checkAccess(
"read",
"", $ref_id)) {
82 $readable_ref_id = $ref_id;
86 $tpl =
new ilTemplate(
"tpl.ass_info_tool.html",
true,
true,
"Modules/Exercise");
90 if ($readable_ref_id > 0) {
91 $title = $ui->renderer()->render(
99 $schedule = $info->getScheduleInfo();
100 $list = $ui->factory()->listing()->unordered(array_map(
function (
$i) {
101 return $i[
"txt"] .
": " .
$i[
"value"];
106 $subm = $info->getSubmissionInfo();
107 if (isset($subm[
"submitted"])) {
108 $this->
addSection(
$tpl, $subm[
"submitted"][
"txt"], $subm[
"submitted"][
"value"]);
112 $inst = $info->getInstructionInfo();
114 $this->
addSection(
$tpl, $inst[
"instruction"][
"txt"], $inst[
"instruction"][
"value"]);
118 $files = $info->getInstructionFileInfo($readable_ref_id);
119 if (is_array($files)) {
120 $list = $ui->factory()->listing()->unordered(array_map(
function (
$i) use ($ui) {
122 if (
$i[
"value"] !=
"") {
123 $v = $ui->renderer()->render($ui->factory()->button()->shy($v,
$i[
"value"]));
127 $this->
addSection(
$tpl,
$lng->txt(
"exc_instruction_files"), $ui->renderer()->render($list));
131 if (is_array($buttons[$ass_id])) {
132 $tpl->setVariable(
"BUTTONS", implode(
" ", array_map(
function (
$b) use ($ui) {
133 return $ui->renderer()->render(
$b);
134 }, $buttons[$ass_id])));
137 $tpl->setCurrentBlock(
"ass_info");
138 $tpl->parseCurrentBlock();
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
setVariable($variable, $value='')
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
static lookupExerciseId($a_ass_id)
Lookup excercise id for assignment id.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...