Get assignment body for overview.
{
$tpl =
new ilTemplate(
"tpl.assignment_body.html",
true,
true,
"Modules/Exercise");
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info->setTableClass("");
$not_started_yet = false;
if ($a_data["start_time"] > 0 && time() - $a_data["start_time"] <= 0)
{
$not_started_yet = true;
}
if (!$not_started_yet)
{
$info->addSection($lng->txt("exc_instruction"));
$info->addProperty("",
}
$info->addSection($lng->txt("exc_schedule"));
if ($a_data["start_time"] > 0)
{
$info->addProperty($lng->txt("exc_start_time"),
}
$info->addProperty($lng->txt("exc_edit_until"),
if (!$not_started_yet)
{
$info->addProperty($lng->txt("exc_time_to_send"),
"<b>".$time_str."</b>");
}
if ($this->exc->getShowSubmissions())
{
$ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
if ($a_data["deadline"] - time() <= 0)
{
$link = '<a class="submit" href="'.
$ilCtrl->getLinkTargetByClass("ilobjexercisegui", "listPublicSubmissions").'">'.
$lng->txt("exc_list_submission").'</a>';
$info->addProperty($lng->txt("exc_public_submission"), $link);
}
else
{
$info->addProperty($lng->txt("exc_public_submission"),
$lng->txt("exc_msg_public_submission"));
}
$ilCtrl->setParameterByClass(
"ilobjexercisegui",
"ass_id",
$_GET[
"ass_id"]);
}
$ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
if (!$not_started_yet)
{
{
$info->addSection($lng->txt("exc_files"));
{
$ilCtrl->setParameterByClass("ilobjexercisegui", "file", urlencode($file["name"]));
$info->addProperty($file["name"],
$lng->txt("download"),
$ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadFile"));
$ilCtrl->setParameter($this, "file", "");
}
}
$info->addSection($lng->txt("exc_your_submission"));
$titles = array();
foreach($delivered_files as $file)
{
$titles[] = $file["filetitle"];
}
$files_str = implode($titles, ", ");
if ($files_str == "")
{
$files_str = $lng->txt("message_no_delivered_files");
}
$ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
if ($a_data["deadline"] - time() > 0)
{
$files_str.= ' <a class="submit" href="'.
$ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreen").'">'.
(count($titles) == 0
? $lng->txt("exc_hand_in")
: $lng->txt("exc_edit_submission")).'</a>';
}
else
{
$files_str.= ' <a class="submit" href="'.
$ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreen").'">'.
$lng->txt("already_delivered_files").'</a>';
}
$info->addProperty($lng->txt("exc_files_returned"),
$files_str);
if ($last_sub)
{
}
else
{
$last_sub = "---";
}
if ($last_sub != "---")
{
$info->addProperty($lng->txt("exc_last_submission"),
$last_sub);
}
$cnt_files = $storage->countFeedbackFiles($ilUser->getId());
if ($lpcomment != "" || $mark != "" || $status != "notgraded" || $cnt_files > 0)
{
$info->addSection($lng->txt("exc_feedback_from_tutor"));
if ($lpcomment != "")
{
$info->addProperty($lng->txt("exc_comment"),
$lpcomment);
}
if ($mark != "")
{
$info->addProperty($lng->txt("exc_mark"),
$mark);
}
if ($status == "")
{
}
else if ($status != "notgraded")
{
$img =
'<img border="0" src="'.ilUtil::getImagePath(
"scorm/".$status.
".gif").
'" '.
' alt="'.$lng->txt("exc_".$status).'" title="'.$lng->txt("exc_".$status).
'" style="vertical-align:middle;"/>';
$info->addProperty($lng->txt("status"),
$img.
" ".$lng->txt(
"exc_".$status));
}
if ($cnt_files > 0)
{
$info->addSection($lng->txt("exc_fb_files"));
$files = $storage->getFeedbackFiles($ilUser->getId());
{
$ilCtrl->setParameterByClass("ilobjexercisegui", "file", urlencode($file));
$info->addProperty($file,
$lng->txt("download"),
$ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadFeedbackFile"));
$ilCtrl->setParameter($this, "file", "");
}
}
}
}
$tpl->setVariable(
"CONTENT", $info->getHTML());
}