GUI class for exercise assignments.
More...
GUI class for exercise assignments.
This is not a real GUI class, could be moved to ilObjExerciseGUI
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 11 of file class.ilExAssignmentGUI.php.
◆ __construct()
◆ addFiles()
Definition at line 247 of file class.ilExAssignmentGUI.php.
References $file, $files, $ilCtrl, $lng, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), array, ilExAssignment\getFiles(), and getSubmissionLink().
Referenced by getOverviewBody().
addSection($a_title)
add a new section
Create styles array
The data for the language used.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
getSubmissionLink($a_cmd, array $a_params=null)
◆ addInstructions()
◆ addPublicSubmissions()
◆ addSchedule()
Definition at line 168 of file class.ilExAssignmentGUI.php.
References $ilUser, $lng, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilExAssignment\beforeDeadline(), ilDatePresentation\formatDate(), ilExAssignment\getDeadline(), ilExAssignment\getPersonalDeadline(), ilExAssignment\getStartTime(), IL_CAL_UNIX, ilExAssignment\notStartedYet(), and time.
Referenced by getOverviewBody().
174 $a_info->
addSection($lng->txt(
"exc_schedule"));
189 $late_dl =
"<br />".sprintf($lng->txt(
"exc_late_submission_warning"), $late_dl);
190 $late_dl =
'<span class="warning">'.$late_dl.
'</span>';
204 $a_info->
addProperty($lng->txt(
"exc_edit_until"), $until);
218 $a_info->
addProperty($lng->txt(
"exc_individual_deadline"), $until);
223 $a_info->
addProperty($lng->txt(
"exc_time_to_send"),
224 "<b>".$this->getTimeString($idl).
"</b>");
getPersonalDeadline($a_user_id)
Get individual deadline.
getStartTime()
Get start time (timestamp)
getDeadline()
Get deadline (timestamp)
addSection($a_title)
add a new section
static formatDate(ilDateTime $date)
Format a date public.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
◆ addSubmission()
Definition at line 262 of file class.ilExAssignmentGUI.php.
References $ilCtrl, $ilUser, $lng, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), addSubmissionFeedback(), ilExAssignment\afterDeadlineStrict(), ilExAssignment\FEEDBACK_DATE_DEADLINE, ilDatePresentation\formatDate(), ilExAssignment\getFeedbackDate(), ilExAssignment\getFeedbackFile(), ilExAssignment\getId(), ilExSubmissionGUI\getOverviewContent(), ilExPeerReviewGUI\getOverviewContent(), and IL_CAL_DATETIME.
Referenced by getOverviewBody().
266 $a_info->
addSection($lng->txt(
"exc_your_submission"));
268 include_once
"Modules/Exercise/classes/class.ilExSubmission.php";
271 include_once
"Modules/Exercise/classes/class.ilExSubmissionGUI.php";
275 if($submission->hasSubmitted())
277 $last_sub = $submission->getLastSubmission();
281 $a_info->
addProperty($lng->txt(
"exc_last_submission"), $last_sub);
285 include_once
"Modules/Exercise/classes/class.ilExPeerReviewGUI.php";
addSubmissionFeedback(ilInfoScreenGUI $a_info, ilExAssignment $a_ass, $a_feedback_id, $a_show_global_feedback)
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
getFeedbackDate()
Get (global) feedback file availability date.
getId()
Get assignment id.
addSection($a_title)
add a new section
static formatDate(ilDateTime $date)
Format a date public.
getFeedbackFile()
Get (global) feedback file.
afterDeadlineStrict($a_include_personal=true)
const FEEDBACK_DATE_DEADLINE
addProperty($a_name, $a_value, $a_link="")
add a property to current section
static getOverviewContent(ilInfoScreenGUI $a_info, ilExSubmission $a_submission)
◆ addSubmissionFeedback()
Definition at line 301 of file class.ilExAssignmentGUI.php.
References $file, $files, $img, $lng, ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), array, ilFSStorageExercise\countFeedbackFiles(), ilExAssignment\getExerciseId(), ilExAssignment\getFeedbackFile(), ilExAssignment\getId(), ilExAssignment\getMemberStatus(), and getSubmissionLink().
Referenced by addSubmission().
312 if ($lpcomment !=
"" ||
314 $status !=
"notgraded" ||
316 $a_show_global_feedback)
318 $a_info->
addSection($lng->txt(
"exc_feedback_from_tutor"));
319 if ($lpcomment !=
"")
335 else if ($status !=
"notgraded")
337 $img =
'<img src="'.ilUtil::getImagePath(
"scorm/".$status.
".svg").
'" '.
338 ' alt="'.$lng->txt(
"exc_".$status).
'" title="'.$lng->txt(
"exc_".$status).
341 $img.
" ".$lng->txt(
"exc_".$status));
346 $a_info->
addSection($lng->txt(
"exc_fb_files").
347 '<a name="fb'.$a_ass->getId().
'"></a>');
351 $files = $storage->getFeedbackFiles($a_feedback_id);
355 $lng->txt(
"download"),
362 if($a_show_global_feedback)
364 $a_info->
addSection($lng->txt(
"exc_global_feedback_file"));
367 $lng->txt(
"download"),
getMemberStatus($a_user_id=null)
getId()
Get assignment id.
addSection($a_title)
add a new section
getExerciseId()
Get exercise id.
getFeedbackFile()
Get (global) feedback file.
Create styles array
The data for the language used.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
countFeedbackFiles($a_user_id)
Count number of feedback files for a user.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
getSubmissionLink($a_cmd, array $a_params=null)
◆ getOverviewBody()
Get assignment body for overview.
Definition at line 115 of file class.ilExAssignmentGUI.php.
References $info, $tpl, addFiles(), addInstructions(), addPublicSubmissions(), addSchedule(), addSubmission(), ilExAssignment\getId(), and ilExAssignment\notStartedYet().
117 $this->current_ass_id = $a_ass->
getId();
119 $tpl =
new ilTemplate(
"tpl.assignment_body.html",
true,
true,
"Modules/Exercise");
121 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
122 include_once(
"./Services/UIComponent/Button/classes/class.ilLinkButton.php");
125 $info->setTableClass(
"");
130 if ($this->exc->getShowSubmissions())
141 $tpl->setVariable(
"CONTENT",
$info->getHTML());
addPublicSubmissions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
getId()
Get assignment id.
addInstructions(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addSchedule(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
addFiles(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
special template class to simplify handling of ITX/PEAR
addSubmission(ilInfoScreenGUI $a_info, ilExAssignment $a_ass)
◆ getOverviewHeader()
Get assignment header for overview.
Definition at line 27 of file class.ilExAssignmentGUI.php.
References $ilUser, $lng, $tpl, ilDatePresentation\formatDate(), ilExAssignment\getDeadline(), ilUtil\getImagePath(), ilExAssignment\getMandatory(), ilExAssignment\getMemberStatus(), ilExAssignment\getPeerReview(), ilExAssignment\getPeerReviewDeadline(), ilExAssignment\getPersonalDeadline(), ilExAssignment\getStartTime(), getTimeString(), ilExAssignment\getTitle(), IL_CAL_UNIX, ilExAssignment\notStartedYet(), and time.
31 $lng->loadLanguageModule(
"exc");
33 $tpl =
new ilTemplate(
"tpl.assignment_head.html",
true,
true,
"Modules/Exercise");
44 $tpl->setCurrentBlock(
"prop");
45 $tpl->setVariable(
"PROP", $lng->txt(
"exc_ended_on"));
46 $tpl->setVariable(
"PROP_VAL",
48 $tpl->parseCurrentBlock();
54 $tpl->setCurrentBlock(
"prop");
55 $tpl->setVariable(
"PROP", $lng->txt(
"exc_peer_review_deadline"));
56 $tpl->setVariable(
"PROP_VAL",
58 $tpl->parseCurrentBlock();
63 $tpl->setCurrentBlock(
"prop");
64 $tpl->setVariable(
"PROP", $lng->txt(
"exc_starting_on"));
65 $tpl->setVariable(
"PROP_VAL",
67 $tpl->parseCurrentBlock();
72 $tpl->setCurrentBlock(
"prop");
73 $tpl->setVariable(
"PROP", $lng->txt(
"exc_time_to_send"));
74 $tpl->setVariable(
"PROP_VAL", $time_str);
75 $tpl->parseCurrentBlock();
79 $tpl->setCurrentBlock(
"prop");
80 $tpl->setVariable(
"PROP", $lng->txt(
"exc_edit_until"));
81 $tpl->setVariable(
"PROP_VAL",
83 $tpl->parseCurrentBlock();
88 $tpl->setCurrentBlock(
"prop");
89 $tpl->setVariable(
"PROP", $lng->txt(
"exc_individual_deadline"));
90 $tpl->setVariable(
"PROP_VAL",
92 $tpl->parseCurrentBlock();
99 $mand =
" (".$lng->txt(
"exc_mandatory").
")";
107 $tpl->setVariable(
"ALT_STATUS", $lng->txt(
"exc_".$stat));
getPeerReview()
Get peer review status.
getMemberStatus($a_user_id=null)
getPersonalDeadline($a_user_id)
Get individual deadline.
getStartTime()
Get start time (timestamp)
getDeadline()
Get deadline (timestamp)
getTimeString($a_deadline)
Get time string for deadline.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
getMandatory()
Get mandatory.
getPeerReviewDeadline()
Get peer review deadline (timestamp)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
◆ getSubmissionLink()
ilExAssignmentGUI::getSubmissionLink |
( |
|
$a_cmd, |
|
|
array |
$a_params = null |
|
) |
| |
|
protected |
Definition at line 397 of file class.ilExAssignmentGUI.php.
References $ilCtrl, and $url.
Referenced by addFiles(), addPublicSubmissions(), and addSubmissionFeedback().
401 if(is_array($a_params))
403 foreach($a_params as $name => $value)
405 $ilCtrl->setParameterByClass(
"ilexsubmissiongui", $name, $value);
409 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id", $this->current_ass_id);
410 $url = $ilCtrl->getLinkTargetByClass(
"ilexsubmissiongui", $a_cmd);
411 $ilCtrl->setParameterByClass(
"ilexsubmissiongui",
"ass_id",
"");
413 if(is_array($a_params))
415 foreach($a_params as $name => $value)
417 $ilCtrl->setParameterByClass(
"ilexsubmissiongui", $name,
"");
◆ getTimeString()
ilExAssignmentGUI::getTimeString |
( |
|
$a_deadline | ) |
|
Get time string for deadline.
Definition at line 376 of file class.ilExAssignmentGUI.php.
References $lng, IL_CAL_UNIX, ilUtil\period2String(), and time.
Referenced by getOverviewHeader().
380 if ($a_deadline == 0)
382 return $lng->txt(
"exc_no_deadline_specified");
385 if ($a_deadline -
time() <= 0)
387 $time_str = $lng->txt(
"exc_time_over_short");
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
◆ $current_ass_id
ilExAssignmentGUI::$current_ass_id |
|
protected |
◆ $exc
The documentation for this class was generated from the following file: