5 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
6 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
24 $this->node_id = $a_node_id;
25 $this->ass_id = (int)
$_GET[
"ass"];
35 $this->ctrl->returnToParent($this);
38 $next_class = $ilCtrl->getNextClass($this);
39 $cmd = $ilCtrl->getCmd();
64 foreach($exercises as $exercise)
70 if(!$tree->isSaved($ref_id))
78 $part = self::getExerciseInfo($exercise[
"ass_id"]);
87 return implode(
"<br />",
$info);
97 $exercise_id = $ass->getExerciseId();
104 $times_up = $ass->afterDeadlineStrict();
107 include_once
"./Services/Link/classes/class.ilLink.php";
111 $info = sprintf($lng->txt(
"blog_exercise_info"),
113 "<a href=\"".$exc_link.
"\">".
119 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"ass", $a_assignment_id);
120 $submit_link = $ilCtrl->getLinkTargetByClass(
"ilblogexercisegui",
"finalize");
121 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"ass",
"");
123 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
125 $button->setCaption(
"blog_finalize_blog");
126 $button->setPrimary(
true);
127 $button->setUrl($submit_link);
128 $info .=
" ".$button->render();
132 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
134 if($submission->hasSubmitted())
139 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"ass", $a_assignment_id);
140 $dl_link = $ilCtrl->getLinkTargetByClass(
"ilblogexercisegui",
"downloadExcSubFile");
141 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"ass",
"");
146 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
148 $button->setCaption(
"download");
149 $button->setUrl($dl_link);
151 $info .=
"<br />".sprintf($lng->txt(
"blog_exercise_submitted_info"),
163 $inst = $ass->getInstruction();
166 $tooltip .= nl2br($inst);
169 $ass_files = $ass->getFiles();
170 if (count($ass_files) > 0)
172 $tooltip .=
"<br /><br />";
174 foreach($ass_files as
$file)
176 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"ass", $a_assignment_id);
177 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"file", urlencode($file[
"name"]));
178 $dl_link = $ilCtrl->getLinkTargetByClass(
"ilblogexercisegui",
"downloadExcAssFile");
179 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"file",
"");
180 $ilCtrl->setParameterByClass(
"ilblogexercisegui",
"ass",
"");
182 $tooltip .= $file[
"name"].
": <a href=\"".$dl_link.
"\">".
183 $lng->txt(
"download").
"</a>";
189 $ol_id =
"exc_ass_".$a_assignment_id;
191 include_once
"Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
195 $overlay->setAnchor($ol_id.
"_tr");
196 $overlay->setTrigger($ol_id.
"_tr",
"click", $ol_id.
"_tr");
199 $info .=
"<div id=\"".$ol_id.
"_tr\"><a href=\"#\">".$lng->txt(
"exc_instruction").
"</a></div>".
200 "<div id=\"".$ol_id.
"\" style=\"display:none; padding:10px;\" class=\"ilOverlay\">".$tooltip.
"</div>";
203 return "<div>".$info.
"</div>";
210 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
212 $ass_files = $ass->getFiles();
213 if (count($ass_files) > 0)
215 foreach($ass_files as
$file)
217 if($file[
"name"] == $this->
file)
232 $submitted = $submission->
getFiles();
233 if (count($submitted) > 0)
235 $submitted = array_pop($submitted);
239 $ass->getTitle().
" - ".
240 $user_data[
"firstname"].
" ".
241 $user_data[
"lastname"].
" (".
242 $user_data[
"login"].
").zip";
255 include_once
"Modules/Exercise/classes/class.ilExSubmissionBaseGUI.php";
256 include_once
"Modules/Exercise/classes/class.ilExSubmissionObjectGUI.php";
258 $exc_gui->submitBlog($this->node_id);
261 $ilCtrl->returnToParent($this);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupName($a_user_id)
lookup user name
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static setUseRelativeDates($a_status)
set use relative dates
static _lookupTitle($a_id)
lookup object title
static getExerciseInfo($a_assignment_id)
finalize()
Finalize and submit blog to exercise.
static _getAllReferences($a_id)
get all reference ids of object
static useRelativeDates()
check if relative dates are used
static initGUIForSubmit($a_ass_id, $a_user_id=null)
This is a utility class for the yui overlays.
static formatDate(ilDateTime $date)
Format a date public.
Reload workbook from saved file
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
Create styles array
The data for the language used.
static findUserFiles($a_user_id, $a_filetitle)
Check if given file was assigned.
static checkExercise($a_node_id)
getFiles(array $a_file_ids=null, $a_only_valid=false, $a_min_timestamp=null)