ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilExerciseManagementGUI Class Reference

ilExerciseManagementGUI: ilRepositorySearchGUI ilExerciseManagementGUI: ilExSubmissionTeamGUI, ilExSubmissionFileGUI ilExerciseManagementGUI: ilExSubmissionTextGUI, ilExPeerReviewGUI ilExerciseManagementGUI: ilParticipantsPerAssignmentTableGUI ilExerciseManagementGUI: ilResourceCollectionGUI, ilRepoStandardUploadHandlerGUI ilExerciseManagementGUI: ilExerciseSubmissionFeedbackGUI More...

+ Collaboration diagram for ilExerciseManagementGUI:

Public Member Functions

 __construct (InternalService $service, ?ilExAssignment $a_ass=null)
 Constructor. More...
 
 executeCommand ()
 
 addSubTabs (string $a_activate)
 
 waitingDownloadObject ()
 
 membersObject ()
 All participants and submission of one assignment. More...
 
 downloadSelectedObject ()
 
 downloadSubmissionsObject (?array $selected_participants=null)
 
 backToCurrentOverview ()
 
 membersApplyObject ()
 
 membersResetObject ()
 
 saveGradesObject ()
 
 compareTextAssignmentsObject ()
 TODO -> Deal with the redirection after update the grade via action button. More...
 
 getReportPanel (array $a_data)
 
 getEvaluationModal (array $a_data)
 
 getEvaluationModalForm (array $a_data)
 
 saveEvaluationFromModalObject ()
 
 addUserFromAutoCompleteObject ()
 
 addMembersObject ($a_user_ids=array())
 
 selectAssignmentObject ()
 
 showParticipantObject ()
 Show Participant. More...
 
 showParticipantApplyObject ()
 
 showParticipantResetObject ()
 
 selectParticipantObject ()
 
 showGradesOverviewObject ()
 
 redirectFeedbackMailObject ()
 
 sendMembersObject ()
 
 confirmDeassignMembersObject ()
 
 deassignMembersObject ()
 
 saveStatusParticipantObject (?array $selected_ass_ids=null)
 Save assignment status (participant view) More...
 
 saveStatusAllObject (?array $a_selected=null, bool $a_redirect=true)
 
 saveStatusSelectedObject ()
 
 exportExcelObject ()
 
 createTeamsObject ()
 
 dissolveTeamsObject ()
 
 adoptTeamsFromGroupObject (?ilPropertyFormGUI $a_form=null)
 
 createTeamsFromGroupsObject ()
 
 getMultiFeedbackForm (int $a_ass_id)
 
 handleMultiFeedbackUploadResult (FileUpload $upload, UploadResult $result)
 
 showMultiFeedbackObject (?FormAdapterGUI $form=null)
 
 downloadMultiFeedbackZipObject ()
 Download multi-feedback structrue file. More...
 
 uploadMultiFeedbackObject ()
 Upload multi feedback file. More...
 
 showMultiFeedbackConfirmationTableObject ()
 Show multi feedback confirmation table. More...
 
 cancelMultiFeedbackObject ()
 Cancel Multi Feedback. More...
 
 saveMultiFeedbackObject ()
 Save multi feedback. More...
 
 initFilter ()
 
 openSubmissionPrintViewObject ()
 Open HTML view for portfolio submissions. More...
 
 openSubmissionViewObject (bool $print_version=false)
 Open HTML view for portfolio submissions. More...
 
 collectFeedbackDataFromPeer (int $user_id, string $ts, string $text)
 
 sendGradingNotificationObject ()
 

Data Fields

const VIEW_ASSIGNMENT = 1
 
const VIEW_PARTICIPANT = 2
 
const VIEW_GRADES = 3
 
const FEEDBACK_ONLY_SUBMISSION = "submission_only"
 
const FEEDBACK_FULL_SUBMISSION = "submission_feedback"
 
const GRADE_NOT_GRADED = "notgraded"
 
const GRADE_PASSED = "passed"
 
const GRADE_FAILED = "failed"
 

Protected Member Functions

 getViewBack ()
 
 initSubmission ()
 
 getMultiActionUserIds (bool $a_keep_teams=false)
 
 saveStatus (array $a_data, bool $a_redirect=true)
 
 initGroupForm ()
 
 initIndividualDeadlineModal ()
 
 parseIndividualDeadlineData (array $a_data)
 
 handleIndividualDeadlineCallsObject ()
 
 initIndividualDeadlineForm (array $a_ass_map, array $ids)
 
 setIndividualDeadlineObject ()
 
 getWebFilePathFromExternalFilePath (string $external_file_path)
 Get the object specific file path from an external full file path. More...
 
 setBackToMembers ()
 
 setFailedObject ()
 
 setPassedObject ()
 
 setSingleStatus ($ass_id, $part_id, $status)
 

Protected Attributes

ZipAdapter $zip
 
ilGlobalTemplateInterface $tpl
 
ILIAS Exercise InternalDomainService $domain
 
ILIAS Exercise Notification NotificationManager $notification
 
TutorFeedbackFileManager $tutor_feedback_file
 
InternalGUIService $gui
 
ILIAS HTTP Services $http
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilLanguage $lng
 
ilAccessHandler $access
 
Factory $ui_factory
 
Renderer $ui_renderer
 
array $filter = []
 
ilToolbarGUI $toolbar
 
ilObjExercise $exercise
 
ilExAssignment $assignment = null
 
TaskFactory $task_factory
 
ilLogger $log
 
ilObjUser $user
 
InternalService $service
 
ilDBInterface $db = null
 
int $ass_id = 0
 
int $requested_member_id = 0
 
int $requested_part_id = 0
 
int $requested_ass_id = 0
 
string $requested_idl_id
 
bool $done = false
 
array $requested_learning_comments
 
string $requested_comment
 
string $requested_user_login
 
array $selected_participants
 
array $listed_participants
 
array $selected_ass_ids
 
array $listed_ass_ids
 
array $requested_marks
 
array $requested_status
 
array $requested_tutor_notices
 
array $requested_group_members
 
array $requested_files
 
string $requested_filter_status
 
string $requested_filter_feedback
 
GUIRequest $request
 
ilExerciseSubmissionFeedbackGUI $feedback_gui
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilExerciseManagementGUI::__construct ( InternalService  $service,
?ilExAssignment  $a_ass = null 
)

Constructor.

Parameters
InternalService$service
ilExAssignment | null$a_ass

Definition at line 106 of file class.ilExerciseManagementGUI.php.

References $DIC, $request, $service, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Exercise\InternalService\domain(), ILIAS\Exercise\GUIRequest\getAssId(), ILIAS\Exercise\GUIRequest\getComment(), ILIAS\Exercise\GUIRequest\getDone(), ILIAS\Exercise\GUIRequest\getExercise(), ILIAS\Exercise\GUIRequest\getFiles(), ILIAS\Exercise\GUIRequest\getFilterFeedback(), ILIAS\Exercise\GUIRequest\getFilterStatus(), ILIAS\Exercise\GUIRequest\getGroupMembers(), ILIAS\Exercise\GUIRequest\getIdlId(), ILIAS\Exercise\GUIRequest\getLearningComments(), ILIAS\Exercise\GUIRequest\getListedAssignments(), ILIAS\Exercise\GUIRequest\getListedParticipants(), ILIAS\Exercise\GUIRequest\getMarks(), ILIAS\Exercise\GUIRequest\getMemberId(), ILIAS\Exercise\GUIRequest\getParticipantId(), ILIAS\Exercise\GUIRequest\getRefId(), ILIAS\Exercise\GUIRequest\getSelectedAssignments(), ILIAS\Exercise\GUIRequest\getSelectedParticipants(), ILIAS\Exercise\GUIRequest\getStatus(), ILIAS\Exercise\GUIRequest\getTutorNotices(), ILIAS\Exercise\GUIRequest\getUserLogin(), ILIAS\Exercise\InternalService\gui(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\UI\examples\Symbol\Glyph\Notification\notification(), null, ILIAS\Exercise\InternalGUIService\request(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

107  {
108  global $DIC;
109 
110  $this->service = $service;
111  $this->gui = $gui = $service->gui();
112  $this->domain = $domain = $service->domain();
113 
114  $this->user = $domain->user();
115  $this->log = $domain->logger()->exc();
116  $this->access = $domain->access();
117  $this->lng = $domain->lng();
118 
119  $this->toolbar = $gui->toolbar();
120  $this->ui_factory = $gui->ui()->factory();
121  $this->ui_renderer = $gui->ui()->renderer();
122  $this->ctrl = $gui->ctrl();
123  $this->tabs_gui = $gui->tabs();
124  $this->tpl = $gui->ui()->mainTemplate();
125  $this->http = $gui->http();
126 
127  $this->task_factory = $domain->backgroundTasks()->taskFactory();
128  $this->request = $gui->request();
130 
131  $this->exercise = $request->getExercise();
132  if ($a_ass !== null) {
133  $this->assignment = $a_ass;
134  $this->ass_id = $this->assignment->getId();
135  }
136  $this->requested_member_id = $request->getMemberId();
137  $this->requested_part_id = $request->getParticipantId();
138  $this->requested_ass_id = $request->getAssId();
139  $this->requested_idl_id = $request->getIdlId();
140  $this->done = $request->getDone();
141  $this->requested_learning_comments = $request->getLearningComments();
142  $this->requested_comment = $request->getComment();
143  $this->requested_user_login = $request->getUserLogin();
144  $this->selected_participants = $request->getSelectedParticipants();
145  $this->listed_participants = $request->getListedParticipants();
146  $this->selected_ass_ids = $request->getSelectedAssignments();
147  $this->listed_ass_ids = $request->getListedAssignments();
148  $this->requested_marks = $request->getMarks();
149  $this->requested_status = $request->getStatus();
150  $this->requested_tutor_notices = $request->getTutorNotices();
151  $this->requested_group_members = $request->getGroupMembers();
152  $this->requested_files = $request->getFiles();
153  $this->requested_filter_status = $request->getFilterStatus();
154  $this->requested_filter_feedback = $request->getFilterFeedback();
155 
156  $this->notification = $domain->notification($request->getRefId());
157 
158  $this->feedback_gui = $DIC->exercise()->internal()->gui()->getSubmissionFeedbackGUI(
159  $this->exercise,
160  $this->notification
161  );
162 
163  $this->ctrl->saveParameter($this, array("vw", "member_id"));
164  if ($this->ass_id > 0) {
165  $this->tutor_feedback_file = $domain->assignment()->tutorFeedbackFile($this->ass_id);
166  }
167  $this->zip = $domain->resources()->zip();
168  $this->ctrl->saveParameter($this, array("part_id"));
169  }
getTutorNotices()
key might be ass_ids or user_ids!
getStatus()
key might be ass_ids or user_ids!
getMarks()
key might be ass_ids or user_ids!
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper.
notification()
description: > Example for rendring a notification glyph.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
ILIAS Exercise InternalDomainService $domain
+ Here is the call graph for this function:

Member Function Documentation

◆ addMembersObject()

ilExerciseManagementGUI::addMembersObject (   $a_user_ids = array())

Definition at line 943 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by addUserFromAutoCompleteObject().

943  : void
944  {
945  if (!count($a_user_ids)) {
946  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
947  } else {
948  if (!$this->exercise->members_obj->assignMembers($a_user_ids)) {
949  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("exc_members_already_assigned"), true);
950  } else {
951  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_members_assigned"), true);
952  }
953  }
954  $this->ctrl->redirect($this, "members");
955  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubTabs()

ilExerciseManagementGUI::addSubTabs ( string  $a_activate)

Definition at line 313 of file class.ilExerciseManagementGUI.php.

References $ctrl, $lng, $requested_part_id, $tabs_gui, null, and ilLanguage\txt().

Referenced by executeCommand(), membersObject(), showGradesOverviewObject(), showMultiFeedbackConfirmationTableObject(), showMultiFeedbackObject(), and showParticipantObject().

313  : void
314  {
315  $ilTabs = $this->tabs_gui;
316  $lng = $this->lng;
317  $ilCtrl = $this->ctrl;
318 
319  $ass_id = $this->assignment !== null ? $this->assignment->getId() : 0;
320  $part_id = $this->requested_part_id;
321 
322  $ilCtrl->setParameter($this, "vw", "");
323  $ilCtrl->setParameter($this, "member_id", "");
324  $ilCtrl->setParameter($this, "ass_id", "");
325  $ilCtrl->setParameter($this, "part_id", "");
326 
327  $ilTabs->addSubTab(
328  "assignment",
329  $lng->txt("exc_assignment_view"),
330  $ilCtrl->getLinkTarget($this, "members")
331  );
332  $ilTabs->addSubTab(
333  "participant",
334  $lng->txt("exc_participant_view"),
335  $ilCtrl->getLinkTarget($this, "showParticipant")
336  );
337  $ilTabs->addSubTab(
338  "grades",
339  $lng->txt("exc_grades_overview"),
340  $ilCtrl->getLinkTarget($this, "showGradesOverview")
341  );
342  $ilTabs->activateSubTab($a_activate);
343 
344  $ilCtrl->setParameter($this, "ass_id", $ass_id);
345  $ilCtrl->setParameter($this, "part_id", $part_id);
346  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addUserFromAutoCompleteObject()

ilExerciseManagementGUI::addUserFromAutoCompleteObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 917 of file class.ilExerciseManagementGUI.php.

References $user_id, ilObjUser\_lookupId(), addMembersObject(), ILIAS\Repository\lng(), and membersObject().

917  : void
918  {
919  if ($this->requested_user_login == "") {
920  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_search_string'));
921  $this->membersObject();
922  return;
923  }
924  $users = explode(',', $this->requested_user_login);
925 
926  $user_ids = array();
927  foreach ($users as $user) {
929 
930  if (!$user_id) {
931  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('user_not_known'));
932  $this->membersObject();
933  return;
934  }
935 
936  $user_ids[] = $user_id;
937  }
938 
939  $this->addMembersObject($user_ids);
940  }
static _lookupId($a_user_str)
membersObject()
All participants and submission of one assignment.
+ Here is the call graph for this function:

◆ adoptTeamsFromGroupObject()

ilExerciseManagementGUI::adoptTeamsFromGroupObject ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 1544 of file class.ilExerciseManagementGUI.php.

References $ctrl, $lng, $tabs_gui, $tpl, getViewBack(), initGroupForm(), null, ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

Referenced by createTeamsFromGroupsObject().

1546  : void {
1547  $ilCtrl = $this->ctrl;
1548  $ilTabs = $this->tabs_gui;
1549  $lng = $this->lng;
1550  $tpl = $this->tpl;
1551 
1552  $ilTabs->clearTargets();
1553  $ilTabs->setBackTarget(
1554  $lng->txt("back"),
1555  $ilCtrl->getLinkTarget($this, $this->getViewBack())
1556  );
1557 
1558  if ($a_form === null) {
1559  $a_form = $this->initGroupForm();
1560  }
1561  $tpl->setContent($a_form->getHTML());
1562  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backToCurrentOverview()

ilExerciseManagementGUI::backToCurrentOverview ( )

Definition at line 517 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), and null.

Referenced by downloadSelectedObject(), and downloadSubmissionsObject().

517  : void
518  {
519  if ($this->assignment !== null) {
520  $this->ctrl->redirect($this, "members");
521  } else {
522  $this->ctrl->redirect($this, "showParticipant");
523  }
524  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancelMultiFeedbackObject()

ilExerciseManagementGUI::cancelMultiFeedbackObject ( )

Cancel Multi Feedback.

Definition at line 1812 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl().

1812  : void
1813  {
1814  $this->ctrl->redirect($this, "members");
1815  }
+ Here is the call graph for this function:

◆ collectFeedbackDataFromPeer()

ilExerciseManagementGUI::collectFeedbackDataFromPeer ( int  $user_id,
string  $ts,
string  $text 
)

Definition at line 2222 of file class.ilExerciseManagementGUI.php.

References $data, ilRTE\_replaceMediaObjectImageSrc(), ilObjUser\getFirstname(), and ilObjUser\getLastname().

Referenced by compareTextAssignmentsObject(), and saveGradesObject().

2226  : array {
2227  $user = new ilObjUser($user_id);
2228  $uname = $user->getFirstname() . " " . $user->getLastname();
2229 
2230  $data = array(
2231  "uid" => $user_id,
2232  "uname" => $uname,
2233  "udate" => $ts,
2234  "utext" => ilRTE::_replaceMediaObjectImageSrc($text, 1) // mob id to mob src
2235  );
2236 
2237  //get data peer and assign it
2238  $peer_review = new ilExPeerReview($this->assignment);
2239  $data["peer"] = array();
2240  foreach ($peer_review->getPeerReviewsByPeerId($user_id) as $value) {
2241  $data["peer"][] = $value['giver_id'];
2242  }
2243 
2244  $data["fb_received"] = count($data["peer"]);
2245  $data["fb_given"] = $peer_review->countGivenFeedback(true, $user_id);
2246 
2247  return $data;
2248  }
static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
Exercise peer review.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compareTextAssignmentsObject()

ilExerciseManagementGUI::compareTextAssignmentsObject ( )

TODO -> Deal with the redirection after update the grade via action button.

Extract the data collection to another method. List and compare use this. DRY

Exceptions
ilDateTimeException|ilExcUnknownAssignmentTypeException

Definition at line 643 of file class.ilExerciseManagementGUI.php.

References $data, collectFeedbackDataFromPeer(), ILIAS\Repository\filter(), getMultiActionUserIds(), getReportPanel(), ILIAS\Repository\lng(), and setBackToMembers().

643  : void
644  {
645  $this->setBackToMembers();
646  $subm = $this->domain->submission($this->assignment->getId());
647 
648  $group_panels_tpl = new ilTemplate("tpl.exc_group_report_panels.html", true, true, "components/ILIAS/Exercise");
649  $group_panels_tpl->setVariable('TITLE', $this->lng->txt("exc_compare_selected_submissions"));
650 
651  $report_html = "";
652  //participant ids selected via checkboxes
653  $participants = array_keys($this->getMultiActionUserIds());
654 
655  foreach ($participants as $participant_id) {
656  $subs = $subm->getSubmissionsOfUser($participant_id);
657  $ts = "";
658  $text = "";
659  if ($s = $subs->current()) {
660  $ts = $s->getTimestamp();
661  $text = $s->getText();
662  }
663 
664  $feedback_data = $this->collectFeedbackDataFromPeer(
665  $participant_id,
666  $ts,
667  $text
668  );
669 
670  $submission_data = $this->assignment->getExerciseMemberAssignmentData((int) $participant_id, $this->filter["status"] ?? "");
671 
672  if (is_array($submission_data)) {
673  $data = array_merge($feedback_data, $submission_data);
674  $report_html .= $this->getReportPanel($data);
675  }
676  }
677 
678  $group_panels_tpl->setVariable('CONTENT', $report_html);
679  $this->tpl->setContent($group_panels_tpl->get());
680  }
collectFeedbackDataFromPeer(int $user_id, string $ts, string $text)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
getMultiActionUserIds(bool $a_keep_teams=false)
+ Here is the call graph for this function:

◆ confirmDeassignMembersObject()

ilExerciseManagementGUI::confirmDeassignMembersObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1266 of file class.ilExerciseManagementGUI.php.

References $ctrl, $lng, $tpl, getMultiActionUserIds(), ilUserUtil\getNamePresentation(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1266  : void
1267  {
1268  $ilCtrl = $this->ctrl;
1269  $tpl = $this->tpl;
1270  $lng = $this->lng;
1271 
1272  $members = $this->getMultiActionUserIds();
1273 
1274  $cgui = new ilConfirmationGUI();
1275  $cgui->setFormAction($ilCtrl->getFormAction($this));
1276  $cgui->setHeaderText($lng->txt("exc_msg_sure_to_deassign_participant"));
1277  $cgui->setCancel($lng->txt("cancel"), "members");
1278  $cgui->setConfirm($lng->txt("remove"), "deassignMembers");
1279  foreach ($members as $k => $m) {
1280  $cgui->addItem(
1281  "member_ids[]",
1282  $k,
1283  ilUserUtil::getNamePresentation((int) $k, false, false, "", true)
1284  );
1285  }
1286 
1287  $tpl->setContent($cgui->getHTML());
1288  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
getMultiActionUserIds(bool $a_keep_teams=false)
+ Here is the call graph for this function:

◆ createTeamsFromGroupsObject()

ilExerciseManagementGUI::createTeamsFromGroupsObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1608 of file class.ilExerciseManagementGUI.php.

References $lng, $requested_group_members, $user_id, $valid, adoptTeamsFromGroupObject(), ILIAS\Repository\ctrl(), ilExAssignmentTeam\getAssignmentTeamMap(), ilExAssignmentTeam\getGroupMembersMap(), ilExAssignmentTeam\getInstanceByUserId(), ilUserUtil\getNamePresentation(), initGroupForm(), and ilLanguage\txt().

1608  : void
1609  {
1610  $lng = $this->lng;
1611 
1612  $req_members = $this->requested_group_members;
1613 
1614  $form = $this->initGroupForm();
1615  if ($form->checkInput()) {
1616  $map = ilExAssignmentTeam::getGroupMembersMap($this->exercise->getRefId());
1617  $all_members = $teams = array();
1618  $valid = true;
1619  foreach (array_keys($map) as $grp_id) {
1620  if (isset($req_members[$grp_id]) && is_array($req_members[$grp_id])) {
1621  $members = $req_members[$grp_id];
1622  $teams[] = $members;
1623  $invalid_team_members = array();
1624 
1625  foreach ($members as $user_id) {
1626  if (!array_key_exists($user_id, $all_members)) {
1627  $all_members[$user_id] = $grp_id;
1628  } else {
1629  // user is selected in multiple groups
1630  $invalid_team_members[] = $user_id;
1631  }
1632  }
1633 
1634  if ($invalid_team_members !== []) {
1635  $valid = false;
1636 
1637  $alert = array();
1638  foreach ($invalid_team_members as $user_id) {
1639  $user_name = ilUserUtil::getNamePresentation($user_id, false, false, "", true);
1640  $grp_title = $map[$all_members[$user_id]]["title"];
1641  $alert[] = sprintf($lng->txt("exc_adopt_group_teams_conflict"), $user_name, $grp_title);
1642  }
1643  $input = $form->getItemByPostVar("grpt[" . $grp_id . "]");
1644  $input->setAlert(implode("<br/>", $alert));
1645  }
1646  }
1647  }
1648  if ($valid) {
1649  if ($teams !== []) {
1650  $existing_users = array_keys(ilExAssignmentTeam::getAssignmentTeamMap($this->assignment->getId()));
1651 
1652  // create teams from group selections
1653  $sum = array("added" => 0, "blocked" => 0);
1654  foreach ($teams as $members) {
1655  foreach ($members as $user_id) {
1656  if (!$this->exercise->members_obj->isAssigned($user_id)) {
1657  $this->exercise->members_obj->assignMember($user_id);
1658  }
1659 
1660  if (!in_array($user_id, $existing_users)) {
1661  $sum["added"]++;
1662  } else {
1663  $sum["blocked"]++;
1664  }
1665  }
1666 
1667  $first = array_shift($members);
1668  $team = ilExAssignmentTeam::getInstanceByUserId($this->assignment->getId(), $first, true);
1669 
1670  // getTeamId() does NOT send notification
1671  // $team->sendNotification($this->exercise->getRefId(), $first, "add");
1672 
1673  foreach ($members as $user_id) {
1674  $team->addTeamMember($user_id);
1675  }
1676  }
1677 
1678  $mess = array();
1679  if ($sum["added"] !== 0) {
1680  $mess[] = sprintf($lng->txt("exc_adopt_group_teams_added"), $sum["added"]);
1681  }
1682  if ($sum["blocked"] !== 0) {
1683  $mess[] = sprintf($lng->txt("exc_adopt_group_teams_blocked"), $sum["blocked"]);
1684  }
1685  if ($sum["added"] !== 0) {
1686  $this->tpl->setOnScreenMessage('success', implode(" ", $mess), true);
1687  } else {
1688  $this->tpl->setOnScreenMessage('failure', implode(" ", $mess), true);
1689  }
1690  }
1691  $this->ctrl->redirect($this, "members");
1692  } else {
1693  $this->tpl->setOnScreenMessage('failure', $lng->txt("form_input_not_valid"));
1694  }
1695  }
1696 
1697  $form->setValuesByPost();
1698  $this->adoptTeamsFromGroupObject($form);
1699  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
adoptTeamsFromGroupObject(?ilPropertyFormGUI $a_form=null)
$valid
static getInstanceByUserId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
static getAssignmentTeamMap(int $a_ass_id)
static getGroupMembersMap(int $a_exc_ref_id)
+ Here is the call graph for this function:

◆ createTeamsObject()

ilExerciseManagementGUI::createTeamsObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1464 of file class.ilExerciseManagementGUI.php.

References $ctrl, $user_id, ilExAssignmentTeam\getInstanceByUserId(), getMultiActionUserIds(), and ILIAS\Repository\lng().

1464  : void
1465  {
1466  $ilCtrl = $this->ctrl;
1467 
1468  $members = $this->getMultiActionUserIds(true);
1469 
1470  $new_members = array();
1471 
1472  foreach ($members as $group) {
1473  if (is_array($group)) {
1474  $new_members = array_merge($new_members, $group);
1475 
1476  $first_user = $group;
1477  $first_user = array_shift($first_user);
1478  $team = ilExAssignmentTeam::getInstanceByUserId($this->assignment->getId(), $first_user);
1479  foreach ($group as $user_id) {
1480  $team->removeTeamMember($user_id);
1481  }
1482  } else {
1483  $new_members[] = $group;
1484  }
1485  }
1486 
1487  if ($new_members !== []) {
1488  // see ilExSubmissionTeamGUI::addTeamMemberActionObject()
1489 
1490  $first_user = array_shift($new_members);
1491  $team = ilExAssignmentTeam::getInstanceByUserId($this->assignment->getId(), $first_user, true);
1492  foreach ($new_members as $user_id) {
1493  $team->addTeamMember($user_id);
1494  }
1495 
1496  // re-evaluate complete team, as some members might have had submitted
1497  $submission = new ilExSubmission($this->assignment, $first_user);
1498  $this->exercise->processExerciseStatus(
1499  $this->assignment,
1500  $team->getMembers(),
1501  $submission->hasSubmitted(),
1502  $submission->validatePeerReviews()
1503  );
1504  }
1505 
1506  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1507  $ilCtrl->redirect($this, "members");
1508  }
static getInstanceByUserId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
Exercise submission //TODO: This class has many static methods related to delivered "files"...
getMultiActionUserIds(bool $a_keep_teams=false)
+ Here is the call graph for this function:

◆ deassignMembersObject()

ilExerciseManagementGUI::deassignMembersObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1295 of file class.ilExerciseManagementGUI.php.

References $ctrl, $lng, and ilLanguage\txt().

1295  : void
1296  {
1297  $ilCtrl = $this->ctrl;
1298  $lng = $this->lng;
1299 
1300  $member_ids = $this->request->getMemberIds();
1301 
1302  foreach ($member_ids as $usr_id) {
1303  $this->exercise->members_obj->deassignMember((int) $usr_id);
1304  }
1305  $this->tpl->setOnScreenMessage('success', $lng->txt("exc_msg_participants_removed"), true);
1306  $ilCtrl->redirect($this, "members");
1307  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ dissolveTeamsObject()

ilExerciseManagementGUI::dissolveTeamsObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1513 of file class.ilExerciseManagementGUI.php.

References $ctrl, $user_id, ilExAssignmentTeam\getInstanceByUserId(), getMultiActionUserIds(), and ILIAS\Repository\lng().

1513  : void
1514  {
1515  $ilCtrl = $this->ctrl;
1516 
1517  $members = $this->getMultiActionUserIds(true);
1518 
1519  foreach ($members as $group) {
1520  // if single member - nothing to do
1521  if (is_array($group)) {
1522  // see ilExSubmissionTeamGUI::removeTeamMemberObject()
1523 
1524  $first_user = $group;
1525  $first_user = array_shift($first_user);
1526  $team = ilExAssignmentTeam::getInstanceByUserId($this->assignment->getId(), $first_user);
1527  foreach ($group as $user_id) {
1528  $team->removeTeamMember($user_id);
1529  }
1530 
1531  // reset ex team members, as any submission is not valid without team
1532  $this->exercise->processExerciseStatus(
1533  $this->assignment,
1534  $group,
1535  false
1536  );
1537  }
1538  }
1539 
1540  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1541  $ilCtrl->redirect($this, "members");
1542  }
static getInstanceByUserId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
getMultiActionUserIds(bool $a_keep_teams=false)
+ Here is the call graph for this function:

◆ downloadMultiFeedbackZipObject()

ilExerciseManagementGUI::downloadMultiFeedbackZipObject ( )

Download multi-feedback structrue file.

Definition at line 1769 of file class.ilExerciseManagementGUI.php.

1769  : void
1770  {
1771  $st_file = $this->domain->assignment()->tutorFeedbackZip()->getMultiFeedbackStructureFile(
1772  $this->assignment,
1773  $this->exercise
1774  );
1775  $this->gui->httpUtil()->deliverString(
1776  $st_file->content,
1777  $st_file->filename,
1778  "application/zip"
1779  );
1780  }

◆ downloadSelectedObject()

ilExerciseManagementGUI::downloadSelectedObject ( )

Definition at line 489 of file class.ilExerciseManagementGUI.php.

References backToCurrentOverview(), and downloadSubmissionsObject().

489  : void
490  {
491  if (count($this->selected_participants) > 0) {
492  $this->downloadSubmissionsObject($this->selected_participants);
493  } else {
494  $this->backToCurrentOverview();
495  }
496  }
downloadSubmissionsObject(?array $selected_participants=null)
+ Here is the call graph for this function:

◆ downloadSubmissionsObject()

ilExerciseManagementGUI::downloadSubmissionsObject ( ?array  $selected_participants = null)

Definition at line 497 of file class.ilExerciseManagementGUI.php.

References $ass_id, $GLOBALS, $requested_part_id, $selected_participants, backToCurrentOverview(), ILIAS\Survey\Mode\getId(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

Referenced by downloadSelectedObject().

497  : void
498  {
499  $participant_id = $this->requested_part_id;
500 
501  $download_task = new ilDownloadSubmissionsBackgroundTask(
502  (int) $GLOBALS['DIC']->user()->getId(),
503  $this->exercise->getRefId(),
504  $this->exercise->getId(),
506  $participant_id,
508  );
509 
510  if ($download_task->run()) {
511  $this->tpl->setOnScreenMessage('success', $this->lng->txt('exc_down_files_started_bg'), true);
512  }
513 
514  $this->backToCurrentOverview();
515  }
$GLOBALS["DIC"]
Definition: wac.php:53
Download submissions and feedback for exercises.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilExerciseManagementGUI::executeCommand ( )
Exceptions
ilCtrlException
ilExcUnknownAssignmentTypeException

Definition at line 175 of file class.ilExerciseManagementGUI.php.

References $ctrl, $feedback_gui, $GLOBALS, $lng, $ref_id, $requested_member_id, $tabs_gui, addSubTabs(), ILIAS\Exercise\InternalGUIService\assignment(), ILIAS\Repository\ctrl(), getMultiFeedbackForm(), getViewBack(), initSubmission(), ILIAS\Repository\lng(), and ilLanguage\txt().

175  : void
176  {
177  $ilCtrl = $this->ctrl;
178  $lng = $this->lng;
179  $ilTabs = $this->tabs_gui;
180 
181  $class = $ilCtrl->getNextClass($this);
182  //$cmd = $ilCtrl->getCmd("listPublicSubmissions");
183 
184  switch ($class) {
185  // feedback files IRSS
186  case strtolower(ilResourceCollectionGUI::class):
187  $ilTabs->clearTargets();
188  $ilTabs->setBackTarget(
189  $lng->txt("back"),
190  $ilCtrl->getLinkTarget($this, $this->getViewBack())
191  );
192  $this->domain->assignment()->tutorFeedbackFile($this->ass_id)->addObserver();
193  $this->tpl->setOnScreenMessage('info', $lng->txt("exc_fb_tutor_info"));
194  $gui = $this->gui->assignment()->getTutorFeedbackFileResourceCollectionGUI(
195  $this->exercise->getRefId(),
196  $this->assignment->getId(),
198  );
199  $this->ctrl->forwardCommand($gui);
200  break;
201 
202  case 'ilrepositorysearchgui':
203  $rep_search = new ilRepositorySearchGUI();
204  $ref_id = $this->exercise->getRefId();
205  $rep_search->addUserAccessFilterCallable(function ($a_user_ids) use ($ref_id) {
206  return $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
207  'edit_submissions_grades',
208  'edit_submissions_grades',
209  $ref_id,
210  $a_user_ids
211  );
212  });
213  $rep_search->setTitle($this->lng->txt("exc_add_participant"));
214  $rep_search->setCallback($this, 'addMembersObject');
215 
216  // Set tabs
217  $this->addSubTabs("assignment");
218  $this->ctrl->setReturn($this, 'members');
219 
220  $this->ctrl->forwardCommand($rep_search);
221  break;
222 
223  case strtolower(ilRepoStandardUploadHandlerGUI::class):
224  $form = $this->getMultiFeedbackForm($this->assignment->getId());
225  $gui = $form->getRepoStandardUploadHandlerGUI("mfzip");
226  $this->ctrl->forwardCommand($gui);
227  break;
228 
229  case "ilexsubmissionteamgui":
230  $gui = new ilExSubmissionTeamGUI($this->exercise, $this->initSubmission());
231  $ilCtrl->forwardCommand($gui);
232  break;
233 
234  case "ilexsubmissionfilegui":
235  $gui = new ilExSubmissionFileGUI($this->exercise, $this->initSubmission());
236  $ilCtrl->forwardCommand($gui);
237  break;
238 
239  case "ilexsubmissiontextgui":
240  $ilCtrl->saveParameter($this, array("part_id"));
241  $gui = new ilExSubmissionTextGUI($this->exercise, $this->initSubmission());
242  $ilCtrl->forwardCommand($gui);
243  break;
244 
245  case "ilexpeerreviewgui":
246  $gui = new ilExPeerReviewGUI($this->assignment, $this->initSubmission());
247  $ilCtrl->forwardCommand($gui);
248  break;
249 
250  case "ilparticipantsperassignmenttablegui":
252  $this,
253  "members",
254  $this->exercise,
255  $this->assignment->getId(),
257  );
258  $this->ctrl->forwardCommand($table);
259  break;
260 
261  case "ilexercisesubmissionfeedbackgui":
262  $this->ctrl->forwardCommand($this->feedback_gui);
263  break;
264 
265  default:
266  $cmd = $ilCtrl->getCmd();
267  switch ($cmd) {
268  case 'downloadSubmissions':
269  $cmd = $ilCtrl->getCmd("downloadSubmissions");
270  break;
271  default:
272  $cmd = $ilCtrl->getCmd("listPublicSubmissions");
273  break;
274  }
275  $this->{$cmd . "Object"}();
276  break;
277  }
278  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:65
$GLOBALS["DIC"]
Definition: wac.php:53
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilExerciseSubmissionFeedbackGUI $feedback_gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ exportExcelObject()

ilExerciseManagementGUI::exportExcelObject ( )

Definition at line 1450 of file class.ilExerciseManagementGUI.php.

References exit.

1450  : void
1451  {
1452  $this->exercise->exportGradesExcel();
1453  exit;
1454  }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getEvaluationModal()

ilExerciseManagementGUI::getEvaluationModal ( array  $a_data)

Definition at line 800 of file class.ilExerciseManagementGUI.php.

References $id, getEvaluationModalForm(), ILIAS\Repository\lng(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

Referenced by getReportPanel().

802  : RoundTrip {
803  $modal_tpl = new ilTemplate("tpl.exc_report_evaluation_modal.html", true, true, "components/ILIAS/Exercise");
804  $modal_tpl->setVariable("USER_NAME", $a_data['uname']);
805 
806  $form = $this->getEvaluationModalForm($a_data);
807  //TODO: CHECK ilias string utils. ilUtil shortenText with net blank.
808  if ($this->exercise->hasTutorFeedbackText()) {
809  $max_chars = 500;
810 
811  $u_text = strip_tags($a_data["utext"]); //otherwise will get open P
812  $text = $u_text;
813  //show more
814  if (strlen($u_text) > $max_chars) {
815  $text = "<input type='checkbox' class='read-more-state' id='post-1' />";
816  $text .= "<div class='read-more-wrap'>";
817  $text .= mb_substr($u_text, 0, $max_chars);
818  $text .= "<span class='read-more-target'>";
819  $text .= mb_substr($u_text, $max_chars);
820  $text .= "</span></div>";
821  $text .= "<label for='post-1' class='read-more-trigger'></label>";
822  }
823  $modal_tpl->setVariable("USER_TEXT", $text);
824  }
825 
826  $modal_tpl->setVariable("FORM", $form->getHTML());
827 
828  $form_id = 'form_' . $form->getId();
829  $submit_btn = $this->ui_factory->button()->primary($this->lng->txt("save"), '#')
830  ->withOnLoadCode(function ($id) use ($form_id) {
831  return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
832  });
833 
834  return $this->ui_factory->modal()->roundtrip(strtoupper($this->lng->txt("grade_evaluate")), $this->ui_factory->legacy()->content($modal_tpl->get()))->withActionButtons([$submit_btn]);
835  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEvaluationModalForm()

ilExerciseManagementGUI::getEvaluationModalForm ( array  $a_data)

Definition at line 837 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormPropertyGUI\setInfo(), and ilSelectInputGUI\setOptions().

Referenced by getEvaluationModal(), and saveEvaluationFromModalObject().

840  $form = new ilPropertyFormGUI();
841  $form->setFormAction($this->ctrl->getFormAction($this, "saveEvaluationFromModal"));
842  $form->setId(uniqid('form'));
843 
844  //Grade
845  $options = array(
846  self::GRADE_NOT_GRADED => $this->lng->txt("exc_notgraded"),
847  self::GRADE_PASSED => $this->lng->txt("exc_passed"),
848  self::GRADE_FAILED => $this->lng->txt("exc_failed")
849  );
850  $si = new ilSelectInputGUI($this->lng->txt("exc_tbl_status"), "grade");
851  $si->setOptions($options);
852  $si->setValue($a_data['status'] ?? "");
853  $form->addItem($si);
854 
855  //Mark
856  $mark_input = new ilTextInputGUI($this->lng->txt("exc_tbl_mark"), "mark");
857  $mark_input->setValue($a_data['mark'] ?? "");
858  $mark_input->setMaxLength(32);
859  $mark_input->setSize(4);
860  $form->addItem($mark_input);
861 
862  $item = new ilHiddenInputGUI('mem_id');
863  $item->setValue($a_data['uid'] ?? "");
864  $form->addItem($item);
865 
866  //TODO: CHECK ilias string utils. ilUtil shortenText with net blank.
867  if ($this->exercise->hasTutorFeedbackText()) {
868  $ta = new ilTextAreaInputGUI($this->lng->txt("exc_comment"), 'comment');
869  $ta->setInfo($this->lng->txt("exc_comment_for_learner_info"));
870  $ta->setValue($a_data['comment'] ?? "");
871  $ta->setRows(10);
872  $form->addItem($ta);
873  }
874  return $form;
875  }
This class represents a selection list property in a property form.
setOptions(array $a_options)
This class represents a hidden form property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMultiActionUserIds()

ilExerciseManagementGUI::getMultiActionUserIds ( bool  $a_keep_teams = false)
protected
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1184 of file class.ilExerciseManagementGUI.php.

References $ass_id, $requested_part_id, $user_id, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and null.

Referenced by compareTextAssignmentsObject(), confirmDeassignMembersObject(), createTeamsObject(), dissolveTeamsObject(), redirectFeedbackMailObject(), sendMembersObject(), setFailedObject(), and setPassedObject().

1184  : array
1185  {
1186  $members = [];
1187  // multi-user
1188  if ($this->assignment !== null) {
1189  if (count($this->selected_participants) == 0) {
1190  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1191  $this->ctrl->redirect($this, "members");
1192  }
1193 
1194  foreach ($this->selected_participants as $user_id) {
1195  $submission = new ilExSubmission($this->assignment, $user_id);
1196  $tmembers = $submission->getUserIds();
1197  if (!$a_keep_teams) {
1198  foreach ($tmembers as $tuser_id) {
1199  $members[$tuser_id] = 1;
1200  }
1201  } else {
1202  if ($tmembers) {
1203  $members[] = $tmembers;
1204  } else {
1205  // no team yet
1206  $members[] = $user_id;
1207  }
1208  }
1209  }
1210  }
1211  // multi-ass
1212  else {
1213  if (count($this->selected_ass_ids) == 0) {
1214  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1215  $this->ctrl->redirect($this, "showParticipant");
1216  }
1217 
1218  $user_id = $this->requested_part_id;
1219 
1220  foreach ($this->selected_ass_ids as $ass_id) {
1221  $submission = new ilExSubmission(new ilExAssignment($ass_id), $user_id);
1222  $tmembers = $submission->getUserIds();
1223  if (!$a_keep_teams) {
1224  foreach ($tmembers as $tuser_id) {
1225  $members[$ass_id][] = $tuser_id;
1226  }
1227  } else {
1228  if ($tmembers) {
1229  $members[$ass_id][] = $tmembers;
1230  } else {
1231  // no team yet
1232  $members[$ass_id][] = $user_id;
1233  }
1234  }
1235  }
1236  }
1237 
1238  return $members;
1239  }
Exercise assignment.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Exercise submission //TODO: This class has many static methods related to delivered "files"...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMultiFeedbackForm()

ilExerciseManagementGUI::getMultiFeedbackForm ( int  $a_ass_id)

Definition at line 1706 of file class.ilExerciseManagementGUI.php.

References $lng, handleMultiFeedbackUploadResult(), ilExAssignment\lookupTitle(), and ilLanguage\txt().

Referenced by executeCommand(), showMultiFeedbackObject(), and uploadMultiFeedbackObject().

1706  : FormAdapterGUI
1707  {
1708  $lng = $this->lng;
1709 
1710  $form = $this->gui->form([self::class], "uploadMultiFeedback")
1711  ->section("main", ilExAssignment::lookupTitle($a_ass_id))
1712  ->file(
1713  "mfzip",
1714  $lng->txt("exc_multi_feedback_file"),
1715  $this->handleMultiFeedbackUploadResult(...),
1716  "rc_id",
1717  "",
1718  1,
1719  ["application/zip"]
1720  );
1721  return $form;
1722  }
handleMultiFeedbackUploadResult(FileUpload $upload, UploadResult $result)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static lookupTitle(int $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getReportPanel()

ilExerciseManagementGUI::getReportPanel ( array  $a_data)
Exceptions
ilDateTimeException

Definition at line 685 of file class.ilExerciseManagementGUI.php.

References $comment, ilObject\_lookupType(), ILIAS\Repository\ctrl(), ILIAS\Repository\filter(), ilDatePresentation\formatDate(), getEvaluationModal(), ilObjUser\getFirstname(), ilObjUser\getLastname(), IL_CAL_DATETIME, ILIAS\Repository\lng(), and null.

Referenced by compareTextAssignmentsObject(), and saveGradesObject().

685  : string
686  {
687  $modal = $this->getEvaluationModal($a_data);
688 
689  $this->ctrl->setParameter($this, "member_id", $a_data['uid']);
690  $actions = array(
691  $this->ui_factory->button()->shy($this->lng->txt("grade_evaluate"), "#")->withOnClick($modal->getShowSignal())
692  );
693 
694  if ($this->exercise->hasTutorFeedbackMail()) {
695  $actions[] = $this->ui_factory->button()->shy(
696  $this->lng->txt("exc_tbl_action_feedback_mail"),
697  $this->ctrl->getLinkTarget($this, "redirectFeedbackMail")
698  );
699  }
700  if ($this->exercise->hasTutorFeedbackFile()) {
701  $actions[] = $this->ui_factory->button()->shy(
702  $this->lng->txt("exc_tbl_action_feedback_file"),
703  $this->ctrl->getLinkTargetByClass(ilResourceCollectionGUI::class)
704  );
705  }
706 
707  $this->ctrl->setParameter($this, "member_id", "");
708 
709  $actions_dropdown = $this->ui_factory->dropdown()->standard($actions);
710  if ($a_data['status'] == self::GRADE_NOT_GRADED) {
711  $str_status_key = $this->lng->txt('exc_tbl_status') . ": ";
712  $str_status_value = "-";
713  } else {
714  $str_status_key = $this->lng->txt('exc_tbl_status_time') . ": ";
715  $str_status_value = ilDatePresentation::formatDate(new ilDateTime($a_data["status_time"], IL_CAL_DATETIME));
716  }
717 
718  $str_mark_key = $this->lng->txt("exc_tbl_mark") . ": ";
719  $str_mark_value = "-";
720 
721  if (($a_data['mark'] != "")) {
722  $str_mark_value = $a_data['mark'];
723  }
724 
725  if ($a_data['feedback_time']) {
726  $str_evaluation_key = $this->lng->txt('exc_tbl_feedback_time') . ": ";
727  $str_evaluation_value = ilDatePresentation::formatDate(new ilDateTime($a_data["feedback_time"], IL_CAL_DATETIME));
728  } else {
729  $str_evaluation_key = $this->lng->txt('exc_settings_feedback') . ": ";
730  $str_evaluation_value = "-";
731  }
732 
733  $card_content = array(
734  $this->lng->txt("exc_tbl_submission_date") . ": " => ilDatePresentation::formatDate(new ilDateTime($a_data["udate"], IL_CAL_DATETIME)),
735  $str_status_key => $str_status_value,
736  $str_mark_key => $str_mark_value,
737  $str_evaluation_key => $str_evaluation_value,
738  $this->lng->txt('feedback_given') . ": " => $a_data['fb_given'],
739  $this->lng->txt('feedback_received') . ": " => $a_data['fb_received']
740  );
741  $card_tpl = new ilTemplate("tpl.exc_report_details_card.html", true, true, "components/ILIAS/Exercise");
742  foreach ($card_content as $key => $value) {
743  $card_tpl->setCurrentBlock("assingment_card");
744  $card_tpl->setVariable("ROW_KEY", $key);
745  $card_tpl->setVariable("ROW_VALUE", $value);
746  $card_tpl->parseCurrentBlock();
747  }
748 
749  $main_panel = $this->ui_factory->panel()->sub($a_data['uname'], $this->ui_factory->legacy()->content($a_data['utext']))
750  ->withFurtherInformation($this->ui_factory->card()->standard($this->lng->txt('text_assignment'))->withSections(array($this->ui_factory->legacy()->content($card_tpl->get()))))->withActions($actions_dropdown);
751 
752  $feedback_tpl = new ilTemplate("tpl.exc_report_feedback.html", true, true, "components/ILIAS/Exercise");
753  //if no feedback filter the feedback is displayed. Can be list submissions or compare submissions.
754  $filter_feedback = $this->filter["feedback"] ?? "";
755  if (array_key_exists("peer", $a_data) && (($filter_feedback == self::FEEDBACK_FULL_SUBMISSION) || $filter_feedback == "")) {
756  $feedback_tpl->setCurrentBlock("feedback");
757  foreach ($a_data["peer"] as $peer_id) {
758  if (ilObject::_lookupType($peer_id) == "usr") {
759  $user = new ilObjUser($peer_id);
760  $peer_name = $user->getFirstname() . " " . $user->getLastname();
761  } else {
762  $peer_name = $this->lng->txt("exc_deleted_user");
763  }
764 
765  $feedback_tpl->setCurrentBlock("peer_feedback");
766  $feedback_tpl->setVariable("PEER_NAME", $peer_name);
767 
768  $submission = new ilExSubmission($this->assignment, $a_data["uid"]);
769  $values = $submission->getPeerReview()->getPeerReviewValues($peer_id, $a_data["uid"]);
770 
771  $review_html = "";
772  foreach ($this->assignment->getPeerReviewCriteriaCatalogueItems() as $crit) {
773  $crit_id = $crit->getId()
774  ? $crit->getId()
775  : $crit->getType();
776  $crit->setPeerReviewContext($this->assignment, $peer_id, $a_data["uid"]);
777 
778  $review_html .=
779  '<div class="ilBlockPropertyCaption">' . $crit->getTitle() . '</div>' .
780  '<div style="margin:2px 0;">' . $crit->getHTML($values[$crit_id] ?? null) . '</div>';
781  }
782  $feedback_tpl->setVariable("PEER_FEEDBACK", $review_html);
783  $feedback_tpl->parseCurrentBlock();
784  }
785  $feedback_tpl->parseCurrentBlock();
786  }
787  $feedback_tpl->setVariable("GRADE", $this->lng->txt('exc_grading') . ": " . $this->lng->txt('exc_' . $a_data['status']));
788  $comment = ($a_data['comment'] === "")
789  ? "-"
790  : $a_data['comment'];
791  $feedback_tpl->setVariable("COMMENT", $this->lng->txt('exc_comment') . ": <br>" . $comment);
792 
793  $feedback_panel = $this->ui_factory->panel()->sub("", $this->ui_factory->legacy()->content($feedback_tpl->get()));
794 
795  $report = $this->ui_factory->panel()->report("", array($main_panel, $feedback_panel));
796 
797  return $this->ui_renderer->render([$modal,$report]);
798  }
const IL_CAL_DATETIME
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$comment
Definition: buildRTE.php:72
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
Exercise submission //TODO: This class has many static methods related to delivered "files"...
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getViewBack()

ilExerciseManagementGUI::getViewBack ( )
protected

Definition at line 280 of file class.ilExerciseManagementGUI.php.

Referenced by adoptTeamsFromGroupObject(), executeCommand(), initSubmission(), redirectFeedbackMailObject(), saveStatus(), and sendGradingNotificationObject().

280  : string
281  {
282  switch ($this->request->getBackView()) {
283  case self::VIEW_PARTICIPANT:
284  $back_cmd = "showParticipant";
285  break;
286 
287  case self::VIEW_GRADES:
288  $back_cmd = "showGradesOverview";
289  break;
290 
291  default:
292  // case self::VIEW_ASSIGNMENT:
293  $back_cmd = "members";
294  break;
295  }
296  return $back_cmd;
297  }
+ Here is the caller graph for this function:

◆ getWebFilePathFromExternalFilePath()

ilExerciseManagementGUI::getWebFilePathFromExternalFilePath ( string  $external_file_path)
protected

Get the object specific file path from an external full file path.

Definition at line 2201 of file class.ilExerciseManagementGUI.php.

References CLIENT_ID.

2203  : string {
2204  list($external_path, $internal_file_path) = explode(CLIENT_ID . "/ilExercise", $external_file_path);
2205  $internal_file_path = "ilExercise" . $internal_file_path;
2206  return $internal_file_path;
2207  }
const CLIENT_ID
Definition: constants.php:41

◆ handleIndividualDeadlineCallsObject()

ilExerciseManagementGUI::handleIndividualDeadlineCallsObject ( )
protected
Exceptions
ilExcUnknownAssignmentTypeException
ilDateTimeException

Definition at line 1897 of file class.ilExerciseManagementGUI.php.

References $ass_id, $id, $post, $res, $tpl, $user_id, $valid, ilDateTime\_before(), ILIAS\Repository\ctrl(), exit, ilDatePresentation\formatDate(), ILIAS\UICore\GlobalTemplate\getOnLoadCodeForAsynch(), ILIAS\FileDelivery\http(), IL_CAL_UNIX, initIndividualDeadlineForm(), ILIAS\Repository\lng(), ILIAS\UI\examples\Symbol\Glyph\Notification\notification(), null, and parseIndividualDeadlineData().

1897  : void
1898  {
1899  $tpl = $this->tpl;
1900 
1901  $this->ctrl->saveParameter($this, "part_id");
1902 
1903  // from request "dn", see ilExcIdl.js
1904  if ($this->done) {
1905  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
1906  $this->ctrl->redirect($this, $this->assignment !== null
1907  ? "members"
1908  : "showParticipant");
1909  }
1910 
1911  // initial form call
1912  if ($this->requested_idl_id != "") {
1913  $tmp = $this->parseIndividualDeadlineData(explode(",", $this->requested_idl_id));
1914  if (is_array($tmp)) {
1915  $form = $this->initIndividualDeadlineForm($tmp[1], $tmp[0]);
1916  echo $form->getHTML() .
1918  }
1919  }
1920  // form "submit"
1921  else {
1922  $tmp = array();
1923  $post = $this->http->request()->getParsedBody();
1924  foreach (array_keys($post) as $id) {
1925  if (substr($id, 0, 3) == "dl_") {
1926  $tmp[] = substr($id, 3);
1927  }
1928  }
1929  $tmp = $this->parseIndividualDeadlineData($tmp);
1930  $ass_map = $tmp[1];
1931  $users = $tmp[0];
1932  unset($tmp);
1933 
1934  $form = $this->initIndividualDeadlineForm($ass_map, $users);
1935  $res = array();
1936  if ($valid = $form->checkInput()) {
1937  foreach ($users as $ass_id => $users2) {
1938  $ass = $ass_map[$ass_id];
1939 
1940  // :TODO: should individual deadlines BEFORE extended be possible?
1941  $dl = new ilDateTime($ass->getDeadline(), IL_CAL_UNIX);
1942 
1943  foreach ($users2 as $user_id) {
1944  $date_field = $form->getItemByPostVar("dl_" . $ass_id . "_" . $user_id);
1945  if (ilDate::_before($date_field->getDate(), $dl)) {
1946  $date_field->setAlert(sprintf($this->lng->txt("exc_individual_deadline_before_global"), ilDatePresentation::formatDate($dl)));
1947  $valid = false;
1948  } else {
1949  $res[$ass_id][$user_id] = $date_field->getDate();
1950  }
1951  }
1952  }
1953  }
1954 
1955  if (!$valid) {
1956  $form->setValuesByPost();
1957  echo $form->getHTML() .
1959  } else {
1960  foreach ($res as $ass_id => $users) {
1961  $ass = $ass_map[$ass_id];
1962 
1963  foreach ($users as $id => $date) {
1964  $ass->setIndividualDeadline($id, $date);
1965  if (is_numeric($id)) {
1966  $this->notification->sendDeadlineSetNotification($ass_id, $id);
1967  }
1968  }
1969 
1970  $subm = $this->domain->submission($ass->getId());
1971  $subm->recalculateLateSubmissions();
1972  }
1973 
1974  echo "ok";
1975  }
1976  }
1977 
1978  exit();
1979  }
$res
Definition: ltiservices.php:66
static _before(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
$valid
const IL_CAL_UNIX
notification()
description: > Example for rendring a notification glyph.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
$post
Definition: ltitoken.php:46
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initIndividualDeadlineForm(array $a_ass_map, array $ids)
+ Here is the call graph for this function:

◆ handleMultiFeedbackUploadResult()

ilExerciseManagementGUI::handleMultiFeedbackUploadResult ( FileUpload  $upload,
UploadResult  $result 
)

Definition at line 1724 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\user().

Referenced by getMultiFeedbackForm().

1727  : BasicHandlerResult {
1728  $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
1729  $rid = $feedback_zip->importFromUploadResult(
1730  $this->ass_id,
1731  $this->user->getId(),
1732  $result
1733  );
1734  return new \ILIAS\FileUpload\Handler\BasicHandlerResult(
1735  '',
1736  \ILIAS\FileUpload\Handler\HandlerResult::STATUS_OK,
1737  $rid,
1738  ''
1739  );
1740  }
Interface Observer Contains several chained tasks and infos about them.
Class FileUpload.
Definition: FileUpload.php:37
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFilter()

ilExerciseManagementGUI::initFilter ( )

Definition at line 2055 of file class.ilExerciseManagementGUI.php.

References $requested_filter_feedback, $requested_filter_status, ILIAS\Repository\ctrl(), ILIAS\Repository\filter(), ILIAS\Repository\lng(), ilSelectInputGUI\setOptions(), and ILIAS\Repository\toolbar().

Referenced by saveGradesObject().

2055  : void
2056  {
2057  if ($this->requested_filter_status != "") {
2058  $this->filter["status"] = $this->requested_filter_status;
2059  }
2060 
2061  $this->lng->loadLanguageModule("search");
2062 
2063  $this->toolbar->setFormAction($this->ctrl->getFormAction($this, "listTextAssignment"));
2064 
2065  // Status
2066 
2067  $si_status = new ilSelectInputGUI($this->lng->txt("exc_tbl_status"), "filter_status");
2068  $options = array(
2069  "" => $this->lng->txt("search_any"),
2070  self::GRADE_NOT_GRADED => $this->lng->txt("exc_notgraded"),
2071  self::GRADE_PASSED => $this->lng->txt("exc_passed"),
2072  self::GRADE_FAILED => $this->lng->txt("exc_failed")
2073  );
2074  $si_status->setOptions($options);
2075  $si_status->setValue($this->filter["status"] ?? "");
2076 
2077  $si_feedback = new ilSelectInputGUI($this->lng->txt("feedback"), "filter_feedback");
2078  $options = array(
2079  self::FEEDBACK_FULL_SUBMISSION => $this->lng->txt("submissions_feedback"),
2080  self::FEEDBACK_ONLY_SUBMISSION => $this->lng->txt("submissions_only")
2081  );
2082  $si_feedback->setOptions($options);
2083  $si_feedback->setValue($this->filter["feedback"] ?? "");
2084 
2085  $this->toolbar->addInputItem($si_status, true);
2086 
2087  // Submissions and Feedback
2088  #24713
2089  if ($this->assignment->getPeerReview()) {
2090  if ($this->requested_filter_feedback != "") {
2091  $this->filter["feedback"] = $this->requested_filter_feedback;
2092  } else {
2093  $this->filter["feedback"] = "submission_feedback";
2094  }
2095 
2096  $si_feedback = new ilSelectInputGUI($this->lng->txt("feedback"), "filter_feedback");
2097  $options = array(
2098  "submission_feedback" => $this->lng->txt("submissions_feedback"),
2099  "submission_only" => $this->lng->txt("submissions_only")
2100  );
2101  $si_feedback->setOptions($options);
2102  $si_feedback->setValue($this->filter["feedback"] ?? "");
2103 
2104  $this->toolbar->addInputItem($si_feedback, true);
2105  }
2106 
2107  $this->gui->button(
2108  $this->lng->txt("filter"),
2109  "listTextAssignment"
2110  )->submit()->toToolbar();
2111  }
This class represents a selection list property in a property form.
setOptions(array $a_options)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initGroupForm()

ilExerciseManagementGUI::initGroupForm ( )
protected

Definition at line 1564 of file class.ilExerciseManagementGUI.php.

References $lng, $user_id, ILIAS\Repository\ctrl(), ilExAssignmentTeam\getGroupMembersMap(), ilUserUtil\getNamePresentation(), and ilLanguage\txt().

Referenced by adoptTeamsFromGroupObject(), and createTeamsFromGroupsObject().

1565  {
1566  $lng = $this->lng;
1567 
1568  $form = new ilPropertyFormGUI();
1569  $form->setTitle($lng->txt("exc_adopt_group_teams") . " - " . $this->assignment->getTitle());
1570  $form->setFormAction($this->ctrl->getFormAction($this, "createTeamsFromGroups"));
1571 
1572  $all_members = array();
1573  foreach (ilExAssignmentTeam::getGroupMembersMap($this->exercise->getRefId()) as $grp_id => $group) {
1574  if (count($group["members"]) !== 0) {
1575  $grp_team = new ilCheckboxGroupInputGUI($lng->txt("obj_grp") . " \"" . $group["title"] . "\"", "grpt[" . $grp_id . "]");
1576  $grp_value = $options = array();
1577  foreach ($group["members"] as $user_id) {
1578  $user_name = ilUserUtil::getNamePresentation($user_id, false, false, "", true);
1579  $options[$user_id] = $user_name;
1580  if (!in_array($user_id, $all_members)) {
1581  $grp_value[] = $user_id;
1582  $all_members[] = $user_id;
1583  }
1584  }
1585  asort($options);
1586  foreach ($options as $user_id => $user_name) {
1587  $grp_team->addOption(new ilCheckboxOption($user_name, $user_id));
1588  }
1589  $grp_team->setValue($grp_value);
1590  } else {
1591  $grp_team = new ilNonEditableValueGUI($group["title"]);
1592  $grp_team->setValue($lng->txt("exc_adopt_group_teams_no_members"));
1593  }
1594  $form->addItem($grp_team);
1595  }
1596 
1597  if ($all_members !== []) {
1598  $form->addCommandButton("createTeamsFromGroups", $lng->txt("save"));
1599  }
1600  $form->addCommandButton("members", $lng->txt("cancel"));
1601 
1602  return $form;
1603  }
This class represents an option in a checkbox group.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
This class represents a property in a property form.
static getGroupMembersMap(int $a_exc_ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initIndividualDeadlineForm()

ilExerciseManagementGUI::initIndividualDeadlineForm ( array  $a_ass_map,
array  $ids 
)
protected
Exceptions
ilDateTimeException

Definition at line 1984 of file class.ilExerciseManagementGUI.php.

References $ass_id, $id, ilObjUser\_lookupName(), ILIAS\Repository\ctrl(), ilExAssignmentTeam\getInstancesFromMap(), IL_CAL_UNIX, ILIAS\Repository\int(), and ILIAS\Repository\lng().

Referenced by handleIndividualDeadlineCallsObject().

1987  : ilPropertyFormGUI {
1988  $form = new ilPropertyFormGUI();
1989  $form->setFormAction($this->ctrl->getFormAction($this));
1990  $form->setName("ilExcIDlForm");
1991 
1992  foreach ($ids as $ass_id => $users) {
1993  $ass = $a_ass_map[$ass_id];
1994 
1995  $section = new ilFormSectionHeaderGUI();
1996  $section->setTitle($ass->getTitle());
1997  $form->addItem($section);
1998 
1999  $teams = ilExAssignmentTeam::getInstancesFromMap($ass->getId());
2000 
2001  $values = $ass->getIndividualDeadlines();
2002 
2003  foreach ($users as $id) {
2004  // single user
2005  if (is_numeric($id)) {
2006  $name = ilObjUser::_lookupName($id);
2007  $name = $name["lastname"] . ", " . $name["firstname"];
2008  }
2009  // team
2010  else {
2011  $name = "";
2012  $team_id = (int) substr($id, 1);
2013  if (array_key_exists($team_id, $teams)) {
2014  $name = array();
2015  foreach ($teams[$team_id]->getMembers() as $member_id) {
2016  $uname = ilObjUser::_lookupName($member_id);
2017  $name[] = $uname["lastname"] . ", " . $uname["firstname"];
2018  }
2019  asort($name);
2020  $name = implode("<br />", $name);
2021  }
2022  }
2023 
2024  $dl = new ilDateTimeInputGUI($name, "dl_" . $ass_id . "_" . $id);
2025  $dl->setShowTime(true);
2026  $dl->setRequired(true);
2027  $form->addItem($dl);
2028 
2029  if (array_key_exists($id, $values)) {
2030  $dl->setDate(new ilDateTime($values[$id], IL_CAL_UNIX));
2031  }
2032  }
2033  }
2034 
2035  $form->addCommandButton("", $this->lng->txt("save"));
2036 
2037  return $form;
2038  }
static _lookupName(int $a_user_id)
lookup user name
const IL_CAL_UNIX
This class represents a date/time property in a property form.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getInstancesFromMap(int $a_assignment_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initIndividualDeadlineModal()

ilExerciseManagementGUI::initIndividualDeadlineModal ( )
protected

Definition at line 1839 of file class.ilExerciseManagementGUI.php.

References $lng, $tpl, ILIAS\UICore\GlobalTemplate\addJavaScript(), ILIAS\UICore\GlobalTemplate\addOnLoadCode(), ILIAS\Repository\ctrl(), ilCalendarUtil\initDateTimePicker(), and ilLanguage\txt().

Referenced by membersObject(), and showParticipantObject().

1839  : string
1840  {
1841  $lng = $this->lng;
1842  $tpl = $this->tpl;
1843 
1844  // prepare modal
1845  $modal = $this->ui_factory->modal()->roundtrip(
1846  $lng->txt("exc_individual_deadline"),
1847  $this->ui_factory->legacy()->content('<div id="ilExcIDlBody"></div>')
1848  );
1849  $show = $modal->getShowSignal()->getId();
1850  $close = $modal->getCloseSignal()->getId();
1851 
1852  $ajax_url = $this->ctrl->getLinkTarget($this, "handleIndividualDeadlineCalls", "", true, false);
1853 
1854  $tpl->addJavaScript("assets/js/ilExcIDl.js", true, 3);
1855  $tpl->addOnLoadCode("il.ExcIDl.init('" . $ajax_url . "','" . $show . "','" . $close . "');");
1856 
1858 
1859  return $this->ui_renderer->render($modal);
1860  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSubmission()

ilExerciseManagementGUI::initSubmission ( )
protected

Definition at line 299 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), getViewBack(), ILIAS\Repository\lng(), and null.

Referenced by executeCommand().

300  {
301  $back_cmd = $this->getViewBack();
302  $this->ctrl->setReturn($this, $back_cmd);
303 
304  $this->tabs_gui->clearTargets();
305  $this->tabs_gui->setBackTarget(
306  $this->lng->txt("back"),
307  $this->ctrl->getLinkTarget($this, $back_cmd)
308  );
309 
310  return new ilExSubmission($this->assignment, $this->requested_member_id, null, true);
311  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Exercise submission //TODO: This class has many static methods related to delivered "files"...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ membersApplyObject()

ilExerciseManagementGUI::membersApplyObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 529 of file class.ilExerciseManagementGUI.php.

References $feedback_gui, membersObject(), null, ilTable2GUI\resetOffset(), and saveStatusAllObject().

529  : void
530  {
531  $this->saveStatusAllObject(null, false);
533  $this,
534  "members",
535  $this->exercise,
536  $this->assignment->getId(),
538  );
539  $exc_tab->resetOffset();
540  $exc_tab->writeFilterToSession();
541 
542  $this->membersObject();
543  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
resetOffset(bool $a_in_determination=false)
saveStatusAllObject(?array $a_selected=null, bool $a_redirect=true)
membersObject()
All participants and submission of one assignment.
ilExerciseSubmissionFeedbackGUI $feedback_gui
+ Here is the call graph for this function:

◆ membersObject()

ilExerciseManagementGUI::membersObject ( )

All participants and submission of one assignment.

Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 367 of file class.ilExerciseManagementGUI.php.

References Vendor\Package\$a, $ctrl, $feedback_gui, $GLOBALS, $lng, $toolbar, $tpl, addSubTabs(), ILIAS\Repository\ctrl(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilExAssignmentTeam\getAdoptableGroups(), ilExAssignment\getInstancesByExercise(), initIndividualDeadlineModal(), ILIAS\Repository\lng(), null, ILIAS\UICore\GlobalTemplate\setContent(), ilSelectInputGUI\setOptions(), ilLanguage\txt(), ilExAssignment\TYPE_TEXT, and ilExAssignment\TYPE_UPLOAD_TEAM.

Referenced by addUserFromAutoCompleteObject(), membersApplyObject(), membersResetObject(), setIndividualDeadlineObject(), and waitingDownloadObject().

367  : void
368  {
369  $tpl = $this->tpl;
370  $ilToolbar = $this->toolbar;
371  $ilCtrl = $this->ctrl;
372  $lng = $this->lng;
373 
374  $this->addSubTabs("assignment");
375  $this->gui->permanentLink()->setGradesPermanentLink();
376 
377  // assignment selection
378  $ass = ilExAssignment::getInstancesByExercise($this->exercise->getId());
379 
380  if ($this->assignment === null && count($ass) > 0) {
381  $this->assignment = current($ass);
382  }
383 
384  reset($ass);
385  if (count($ass) > 1) {
386  $options = array();
387  foreach ($ass as $a) {
388  $options[$a->getId()] = $a->getTitle();
389  }
390  $si = new ilSelectInputGUI($this->lng->txt("exc_assignment"), "ass_id");
391  $si->setOptions($options);
392  $si->setValue($this->assignment->getId());
393  $ilToolbar->addStickyItem($si, true);
394  $this->gui->button(
395  $this->lng->txt("select"),
396  "selectAssignment"
397  )->submit()->toToolbar(true);
398 
399  $ilToolbar->addSeparator();
400  }
401  // #16165 - if only 1 assignment dropdown is not displayed;
402  elseif ($this->assignment) {
403  $ilCtrl->setParameter($this, "ass_id", $this->assignment->getId());
404  }
405 
406  // add member
407  // is only shown if 'edit_submissions_grades' is granted by rbac. positions
408  // access is not sufficient.
409  $has_rbac_access = $GLOBALS['DIC']->access()->checkAccess(
410  'edit_submissions_grades',
411  '',
412  $this->exercise->getRefId()
413  );
414  if ($has_rbac_access) {
416  $this,
417  $ilToolbar,
418  array(
419  'auto_complete_name' => $lng->txt('user'),
420  'submit_name' => $lng->txt('add'),
421  'add_search' => true,
422  'add_from_container' => $this->exercise->getRefId()
423  )
424  );
425  }
426 
427  // #16168 - no assignments
428  if ($ass !== []) {
429  if ($has_rbac_access) {
430  $ilToolbar->addSeparator();
431  }
432 
433  // we do not want the ilRepositorySearchGUI form action
434  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
435 
436  $ilCtrl->setParameter($this, "ass_id", $this->assignment->getId());
437 
438  if ($this->assignment->getType() == ilExAssignment::TYPE_UPLOAD_TEAM) {
439  if (ilExAssignmentTeam::getAdoptableGroups($this->exercise->getRefId())) {
440  $ilToolbar->addButton(
441  $this->lng->txt("exc_adopt_group_teams"),
442  $this->ctrl->getLinkTarget($this, "adoptTeamsFromGroup")
443  );
444 
445  $ilToolbar->addSeparator();
446  }
447  } elseif ($this->exercise->hasTutorFeedbackFile()) {
448  if (!$this->assignment->getAssignmentType()->usesTeams()) {
449  // multi-feedback
450  $ilToolbar->addButton(
451  $this->lng->txt("exc_multi_feedback"),
452  $this->ctrl->getLinkTarget($this, "showMultiFeedback")
453  );
454 
455  $ilToolbar->addSeparator();
456  }
457  }
458 
459  $submission_repository = $this->service->repo()->submission();
460 
461  if ($submission_repository->hasSubmissions($this->assignment->getId()) !== 0) {
462  $ass_type = $this->assignment->getType();
463  //todo change addFormButton for addButtonInstance
464  if ($ass_type == ilExAssignment::TYPE_TEXT) {
465  $ilToolbar->addFormButton($lng->txt("exc_list_text_assignment"), "listTextAssignment");
466  }
467  $ilToolbar->addFormButton($lng->txt("download_all_returned_files"), "downloadSubmissions");
468  }
469  $this->ctrl->setParameter($this, "vw", self::VIEW_ASSIGNMENT);
470 
472  $this,
473  "members",
474  $this->exercise,
475  $this->assignment->getId(),
477  );
478  $tpl->setContent(
479  $exc_tab->getHTML() .
481  );
482  } else {
483  $this->tpl->setOnScreenMessage('info', $lng->txt("exc_no_assignments_available"));
484  }
485 
486  $ilCtrl->setParameter($this, "ass_id", "");
487  }
This class represents a selection list property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
setOptions(array $a_options)
static getAdoptableGroups(int $a_exc_ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$GLOBALS["DIC"]
Definition: wac.php:53
static getInstancesByExercise(int $a_exc_id)
static fillAutoCompleteToolbar(object $parent_object, ?ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt(&#39;user&#39;), auto_complete_size = 15, user_type = array(ilCoursePar...
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
ilExerciseSubmissionFeedbackGUI $feedback_gui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ membersResetObject()

ilExerciseManagementGUI::membersResetObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 548 of file class.ilExerciseManagementGUI.php.

References $feedback_gui, membersObject(), and ilTable2GUI\resetOffset().

548  : void
549  {
551  $this,
552  "members",
553  $this->exercise,
554  $this->assignment->getId(),
556  );
557  $exc_tab->resetOffset();
558  $exc_tab->resetFilter();
559 
560  $this->membersObject();
561  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
resetOffset(bool $a_in_determination=false)
membersObject()
All participants and submission of one assignment.
ilExerciseSubmissionFeedbackGUI $feedback_gui
+ Here is the call graph for this function:

◆ openSubmissionPrintViewObject()

ilExerciseManagementGUI::openSubmissionPrintViewObject ( )

Open HTML view for portfolio submissions.

Definition at line 2116 of file class.ilExerciseManagementGUI.php.

References openSubmissionViewObject().

2116  : void
2117  {
2118  $this->openSubmissionViewObject(true);
2119  }
openSubmissionViewObject(bool $print_version=false)
Open HTML view for portfolio submissions.
+ Here is the call graph for this function:

◆ openSubmissionViewObject()

ilExerciseManagementGUI::openSubmissionViewObject ( bool  $print_version = false)

Open HTML view for portfolio submissions.

Definition at line 2124 of file class.ilExerciseManagementGUI.php.

References $DIC, $requested_member_id, CLIENT_ID, ilFileSystemAbstractionStorage\createPathFromId(), ILIAS_WEB_DIR, ILIAS\Repository\lng(), ilUtil\redirect(), and ilWACSignedPath\signFolderOfStartFile().

Referenced by openSubmissionPrintViewObject().

2124  : void
2125  {
2126  global $DIC;
2127 
2128  $member_id = $this->requested_member_id;
2129 
2130  $submission = new ilExSubmission($this->assignment, $member_id);
2131  $entry = $submission->getSubmittedEntry($print_version);
2132  if (is_null($entry)) {
2133  throw new ilExerciseException("No submission entry for " . $this->assignment->getId() . " / " .
2134  $member_id . ".");
2135  }
2136  $rid = $entry->getRid();
2137 
2138  $last_opening = $submission->getLastOpeningHTMLView();
2139  $submission_time = $submission->getLastSubmission();
2140 
2141  if ($rid !== "") {
2142  $zip_internal_path = "ilExercise/" . \ilFileSystemAbstractionStorage::createPathFromId(
2143  $this->assignment->getExerciseId(),
2144  "exc"
2145  ) . "/subm_" . $this->assignment->getId() . "/" . $member_id . "/resource.zip";
2146  $obj_id = str_replace([".zip", "print"], "", $entry->getTitle());
2147  $obj_id = $this->assignment->getAssignmentType()->getExportObjIdForResourceId($obj_id);
2148  }
2149  if ($print_version) {
2150  $obj_id .= "print";
2151  }
2152 
2153  $obj_dir = $this->assignment->getAssignmentType()->getStringIdentifier() . "_" . $obj_id;
2154 
2155  $index_html_file =
2156  ILIAS_WEB_DIR .
2157  DIRECTORY_SEPARATOR .
2158  CLIENT_ID .
2159  DIRECTORY_SEPARATOR .
2160  dirname($zip_internal_path) .
2161  //DIRECTORY_SEPARATOR .
2162  //$obj_dir .
2163  DIRECTORY_SEPARATOR .
2164  "index.html";
2165  $this->log->debug("index html file: " . $index_html_file);
2166 
2167  $web_filesystem = $DIC->filesystem()->web();
2168  if ($last_opening > $submission_time && $web_filesystem->has($index_html_file)) {
2169  ilWACSignedPath::signFolderOfStartFile($index_html_file);
2170  ilUtil::redirect($index_html_file);
2171  }
2172  $error_msg = "";
2173  if ($rid !== "") {
2174  $file_copied = $this->domain->submission($this->ass_id)->copyRidToWebDir($rid, $zip_internal_path);
2175  }
2176 
2177  // e.g. data/ilias/ilExercise/3/exc_327/subm_9/2/20231212085734_167.zip ?
2178  if ($file_copied) {
2179  $this->zip->unzipFile($file_copied);
2180  $web_filesystem->delete($zip_internal_path);
2181  $this->log->debug("deleting: " . $zip_internal_path);
2182 
2183  $submission_repository = $this->service->repo()->submission();
2184  $submission_repository->updateWebDirAccessTime($this->assignment->getId(), $member_id);
2185  ilWACSignedPath::signFolderOfStartFile($index_html_file);
2186  ilUtil::redirect($index_html_file . "?" . time());
2187  }
2188 
2189  $error_msg = $this->lng->txt("exc_copy_zip_error");
2190 
2191  if ($error_msg === '' || $error_msg === '0') {
2192  $error_msg = $this->lng->txt("exc_find_zip_error");
2193  }
2194 
2195  $this->tpl->setOnScreenMessage('failure', $error_msg);
2196  }
static signFolderOfStartFile(string $start_file_path)
static createPathFromId(int $a_container_id, string $a_name)
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:22
static redirect(string $a_script)
Exercise submission //TODO: This class has many static methods related to delivered "files"...
const ILIAS_WEB_DIR
Definition: constants.php:45
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseIndividualDeadlineData()

ilExerciseManagementGUI::parseIndividualDeadlineData ( array  $a_data)
protected
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1865 of file class.ilExerciseManagementGUI.php.

References $ass_id, $assignment, and $user_id.

Referenced by handleIndividualDeadlineCallsObject().

1867  : array {
1868  if ($a_data) {
1869  $map = array();
1870  $ass_tmp = array();
1871  foreach ($a_data as $item) {
1872  $item = explode("_", $item);
1873  $ass_id = $item[0];
1874  $user_id = $item[1];
1875 
1876  if (!array_key_exists($ass_id, $ass_tmp)) {
1877  if ($this->assignment &&
1878  $ass_id == $this->assignment->getId()) {
1879  $ass_tmp[$ass_id] = $this->assignment;
1880  } else {
1881  $ass_tmp[$ass_id] = new ilExAssignment($ass_id);
1882  }
1883  }
1884 
1885  $map[$ass_id][] = $user_id;
1886  }
1887 
1888  return array($map, $ass_tmp);
1889  }
1890  return [];
1891  }
Exercise assignment.
+ Here is the caller graph for this function:

◆ redirectFeedbackMailObject()

ilExerciseManagementGUI::redirectFeedbackMailObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1139 of file class.ilExerciseManagementGUI.php.

References $user_id, ilObjUser\_lookupLogin(), getMultiActionUserIds(), ilMailFormCall\getRedirectTarget(), getViewBack(), ILIAS\Repository\lng(), ilUtil\redirect(), and ilMailFormCall\SIGNATURE_KEY.

1139  : void
1140  {
1141  if ($this->requested_member_id > 0) {
1142  $submission = new ilExSubmission($this->assignment, $this->requested_member_id);
1143  $members = $submission->getUserIds();
1144  } elseif ($members = $this->getMultiActionUserIds()) {
1145  $members = array_keys($members);
1146  }
1147 
1148  if ($members !== []) {
1149  $logins = array();
1150  foreach ($members as $user_id) {
1151  $member_status = $this->assignment->getMemberStatus($user_id);
1152  $member_status->setFeedback(true);
1153  $member_status->update();
1154 
1155  $logins[] = ilObjUser::_lookupLogin($user_id);
1156  }
1157  $logins = implode(",", $logins);
1158 
1159  // #16530 - see ilObjCourseGUI::createMailSignature
1160  $sig = chr(13) . chr(10) . chr(13) . chr(10);
1161  $sig .= $this->lng->txt('exc_mail_permanent_link');
1162  $sig .= chr(13) . chr(10) . chr(13) . chr(10);
1163  $sig .= ilLink::_getLink($this->exercise->getRefId());
1164  $sig = rawurlencode(base64_encode($sig));
1165 
1167  $this,
1168  $this->getViewBack(),
1169  array(),
1170  array(
1171  'type' => 'new',
1172  'rcp_to' => $logins,
1174  )
1175  ));
1176  }
1177  }
static redirect(string $a_script)
final const SIGNATURE_KEY
static getRedirectTarget( $gui, string $cmd, array $gui_params=[], array $mail_params=[], array $context_params=[])
Exercise submission //TODO: This class has many static methods related to delivered "files"...
getMultiActionUserIds(bool $a_keep_teams=false)
static _lookupLogin(int $a_user_id)
+ Here is the call graph for this function:

◆ saveEvaluationFromModalObject()

ilExerciseManagementGUI::saveEvaluationFromModalObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 882 of file class.ilExerciseManagementGUI.php.

References $comment, $user_id, ILIAS\Repository\ctrl(), getEvaluationModalForm(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and ilUtil\stripSlashes().

882  : void
883  {
884  $form = $this->getEvaluationModalForm([]);
885  $user_id = 0;
886  $comment = "";
887  $mark = "";
888  $grade = "";
889  if ($form->checkInput()) {
890  $comment = trim($form->getInput('comment'));
891  $user_id = (int) $form->getInput('mem_id');
892  $grade = trim($form->getInput('grade'));
893  $mark = trim($form->getInput('mark'));
894  }
895 
896  if ($this->assignment->getId() && $user_id > 0) {
897  $member_status = $this->assignment->getMemberStatus($user_id);
898  $member_status->setComment(ilUtil::stripSlashes($comment));
899  if ($grade != "") {
900  $member_status->setStatus($grade);
901  }
902  $member_status->setMark($mark);
903  if ($comment != "") {
904  $member_status->setFeedback(true);
905  }
906  $member_status->update();
907  }
908  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_status_saved"), true);
909  $this->ctrl->redirect($this, "listTextAssignment");
910  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$comment
Definition: buildRTE.php:72
+ Here is the call graph for this function:

◆ saveGradesObject()

ilExerciseManagementGUI::saveGradesObject ( )

Definition at line 563 of file class.ilExerciseManagementGUI.php.

References $ass_id, $ctrl, $data, $id, $lng, collectFeedbackDataFromPeer(), ILIAS\Repository\filter(), ilExerciseMembersFilter\filterParticipantsByAccess(), ilExSubmission\getAssignmentParticipants(), getReportPanel(), initFilter(), ILIAS\Repository\int(), ILIAS\Repository\lng(), setBackToMembers(), ILIAS\Repository\toolbar(), ilLanguage\txt(), ILIAS\Repository\user(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

563  : void
564  {
565  $ilCtrl = $this->ctrl;
566  $lng = $this->lng;
567 
568  foreach ($this->requested_learning_comments as $k => $v) {
569  $marks_obj = new ilLPMarks($this->exercise->getId(), (int) $k);
570  $marks_obj->setComment($v);
571  $marks_obj->update();
572  }
573  foreach ($this->requested_marks as $k => $v) {
574  $marks_obj = new ilLPMarks($this->exercise->getId(), (int) $k);
575  $marks_obj->setMark($v);
576  $marks_obj->update();
577  }
578  $this->tpl->setOnScreenMessage('success', $lng->txt("exc_msg_saved_grades"), true);
579  $ilCtrl->redirect($this, "showGradesOverview");
580  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ saveMultiFeedbackObject()

ilExerciseManagementGUI::saveMultiFeedbackObject ( )

Save multi feedback.

Definition at line 1820 of file class.ilExerciseManagementGUI.php.

References $requested_files, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

1820  : void
1821  {
1822  $feedback_zip = $this->domain->assignment()->tutorFeedbackZip();
1823  $feedback_zip->saveMultiFeedbackFiles(
1824  $this->exercise,
1825  $this->assignment->getId(),
1826  $this->user->getId(),
1828  );
1829 
1830  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1831  $this->ctrl->redirect($this, "members");
1832  }
+ Here is the call graph for this function:

◆ saveStatus()

ilExerciseManagementGUI::saveStatus ( array  $a_data,
bool  $a_redirect = true 
)
protected
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1401 of file class.ilExerciseManagementGUI.php.

References $ctrl, $user_id, ilObjUser\_lookupName(), getViewBack(), and ILIAS\Repository\lng().

Referenced by saveStatusAllObject(), and saveStatusParticipantObject().

1404  : void {
1405  $ilCtrl = $this->ctrl;
1406  $saved_for = array();
1407  foreach ($a_data as $ass_id => $users) {
1408  $ass = ($ass_id < 0)
1409  ? $this->assignment
1410  : new ilExAssignment($ass_id);
1411  foreach ($users as $user_id => $values) {
1412  // this will add team members if available
1413  // $user_id is only the ID of one team member here,
1414  // $sub_user_id will be all team members
1415  $submission = new ilExSubmission($ass, $user_id);
1416  foreach ($submission->getUserIds() as $sub_user_id) {
1417  $uname = ilObjUser::_lookupName($sub_user_id);
1418  $saved_for[$sub_user_id] = $uname["lastname"] . ", " . $uname["firstname"];
1419 
1420  $member_status = $ass->getMemberStatus($sub_user_id);
1421 
1422  // see bug #22566
1423  $status = $values["status"];
1424  if ($status == "") {
1425  $status = self::GRADE_NOT_GRADED;
1426  }
1427  $member_status->setStatus($status);
1428  if (array_key_exists("mark", $values)) {
1429  $member_status->setMark($values["mark"]);
1430  }
1431  if (array_key_exists("notice", $values)) {
1432  $member_status->setNotice($values["notice"]);
1433  }
1434  $member_status->update();
1435  }
1436  }
1437  }
1438 
1439  $save_for_str = "";
1440  if ($saved_for !== []) {
1441  $save_for_str = "(" . implode(" - ", $saved_for) . ")";
1442  }
1443 
1444  if ($a_redirect) {
1445  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_status_saved") . " " . $save_for_str, true);
1446  $ilCtrl->redirect($this, $this->getViewBack());
1447  }
1448  }
Exercise assignment.
static _lookupName(int $a_user_id)
lookup user name
Exercise submission //TODO: This class has many static methods related to delivered "files"...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveStatusAllObject()

ilExerciseManagementGUI::saveStatusAllObject ( ?array  $a_selected = null,
bool  $a_redirect = true 
)
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1346 of file class.ilExerciseManagementGUI.php.

References $data, $GLOBALS, $listed_participants, $requested_marks, $requested_status, $requested_tutor_notices, $user_id, null, and saveStatus().

Referenced by membersApplyObject(), and saveStatusSelectedObject().

1349  : void {
1350  $user_ids = $this->listed_participants;
1351  $marks = $this->requested_marks;
1352  $notices = $this->requested_tutor_notices;
1353  $status = $this->requested_status;
1354  $filtered_user_ids = $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1355  'edit_submissions_grades',
1356  'edit_submissions_grades',
1357  $this->exercise->getRefId(),
1358  $user_ids
1359  );
1360 
1361  $data = array();
1362  foreach ($filtered_user_ids as $user_id) {
1363  if (is_array($a_selected) &&
1364  !in_array($user_id, $a_selected)) {
1365  continue;
1366  }
1367 
1368  $data[-1][$user_id] = array(
1369  "status" => $status[$user_id] ?? null
1370  );
1371 
1372  if (isset($marks[$user_id])) {
1373  $data[-1][$user_id]["mark"] = $marks[$user_id];
1374  }
1375  if (isset($notices[$user_id])) {
1376  $data[-1][$user_id]["notice"] = $notices[$user_id];
1377  }
1378  }
1379  $this->saveStatus($data, $a_redirect);
1380  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$GLOBALS["DIC"]
Definition: wac.php:53
saveStatus(array $a_data, bool $a_redirect=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveStatusParticipantObject()

ilExerciseManagementGUI::saveStatusParticipantObject ( ?array  $selected_ass_ids = null)

Save assignment status (participant view)

Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1313 of file class.ilExerciseManagementGUI.php.

References $ass_id, $ctrl, $data, $requested_marks, $requested_part_id, $requested_status, $requested_tutor_notices, and saveStatus().

Referenced by saveStatusSelectedObject().

1313  : void
1314  {
1315  $ilCtrl = $this->ctrl;
1316 
1317  $member_id = $this->requested_part_id;
1318  $data = array();
1319  $marks = $this->requested_marks;
1320  $status = $this->requested_status;
1321  $notices = $this->requested_tutor_notices;
1322  foreach ($this->listed_ass_ids as $ass_id) {
1323  if (is_array($selected_ass_ids) &&
1324  !in_array($ass_id, $selected_ass_ids)) {
1325  continue;
1326  }
1327 
1328  $data[$ass_id][$member_id] = array(
1329  "status" => $status[$ass_id]
1330  );
1331  if (isset($marks[$ass_id])) {
1332  $data[$ass_id][$member_id]["mark"] = $marks[$ass_id];
1333  }
1334  if (isset($notices[$ass_id])) {
1335  $data[$ass_id][$member_id]["notice"] = $notices[$ass_id];
1336  }
1337  }
1338 
1339  $ilCtrl->setParameter($this, "part_id", $member_id); // #17629
1340  $this->saveStatus($data);
1341  }
saveStatus(array $a_data, bool $a_redirect=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveStatusSelectedObject()

ilExerciseManagementGUI::saveStatusSelectedObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1385 of file class.ilExerciseManagementGUI.php.

References null, saveStatusAllObject(), and saveStatusParticipantObject().

1385  : void
1386  {
1387  //$members = $this->getMultiActionUserIds();
1388 
1389  if ($this->assignment !== null) {
1390  $this->saveStatusAllObject($this->selected_participants);
1391  } else {
1392  $this->saveStatusParticipantObject($this->selected_ass_ids);
1393  }
1394  }
saveStatusParticipantObject(?array $selected_ass_ids=null)
Save assignment status (participant view)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
saveStatusAllObject(?array $a_selected=null, bool $a_redirect=true)
+ Here is the call graph for this function:

◆ selectAssignmentObject()

ilExerciseManagementGUI::selectAssignmentObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 960 of file class.ilExerciseManagementGUI.php.

References $ctrl, ilCtrl\redirect(), and ilCtrl\setParameter().

960  : void
961  {
962  $ctrl = $this->ctrl;
963  $ctrl->setParameter($this, "ass_id", $this->requested_ass_id);
964  $ctrl->redirect($this, "members");
965  }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ selectParticipantObject()

ilExerciseManagementGUI::selectParticipantObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1093 of file class.ilExerciseManagementGUI.php.

References $ctrl, ilCtrl\redirect(), and ilCtrl\setParameter().

1093  : void
1094  {
1095  $ctrl = $this->ctrl;
1096  $ctrl->setParameter($this, "part_id", $this->requested_part_id);
1097  $ctrl->redirect($this, "showParticipant");
1098  }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ sendGradingNotificationObject()

ilExerciseManagementGUI::sendGradingNotificationObject ( )

Definition at line 2250 of file class.ilExerciseManagementGUI.php.

References $user_id, ILIAS\Repository\ctrl(), getViewBack(), ILIAS\Repository\lng(), and ilExerciseMailNotification\TYPE_GRADING_DONE.

2250  : void
2251  {
2252 
2253  $ass_id = $this->request->getAssId();
2254  $selected_users = $this->request->getSelectedParticipants();
2255 
2256  $graded_users = array_filter($selected_users, function ($user_id) {
2257  return $this->assignment->getMemberStatus($user_id)->getStatus() !== "notgraded";
2258  });
2259 
2260  if (count($graded_users) === 0) {
2261  $this->tpl->setOnScreenMessage("failure", $this->lng->txt("exc_no_graded_mem_selected"), true);
2262  $this->ctrl->redirect($this, $this->getViewBack());
2263  }
2264 
2265  $not = new ilExerciseMailNotification();
2267  $not->setAssignmentId($ass_id);
2268  $not->setObjId($this->exercise->getId());
2269  $not->setRefId($this->exercise->getRefId());
2270  $not->setRecipients($graded_users);
2271  $not->send();
2272  $this->tpl->setOnScreenMessage("success", $this->lng->txt("exc_graded_mem_notified"), true);
2273  $this->ctrl->redirect($this, $this->getViewBack());
2274  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ sendMembersObject()

ilExerciseManagementGUI::sendMembersObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1246 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), getMultiActionUserIds(), ILIAS\Repository\lng(), and null.

1246  : void
1247  {
1248  $members = $this->getMultiActionUserIds();
1249 
1250  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_sent"), true);
1251  if ($this->assignment !== null) {
1252  $this->exercise->sendAssignment($this->assignment, array_keys($members));
1253  $this->ctrl->redirect($this, "members");
1254  } else {
1255  foreach ($members as $ass_id => $users) {
1256  $this->exercise->sendAssignment(new ilExAssignment($ass_id), $users);
1257  }
1258  $this->ctrl->setParameter($this, "part_id", $this->requested_part_id); // #17629
1259  $this->ctrl->redirect($this, "showParticipant");
1260  }
1261  }
Exercise assignment.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMultiActionUserIds(bool $a_keep_teams=false)
+ Here is the call graph for this function:

◆ setBackToMembers()

ilExerciseManagementGUI::setBackToMembers ( )
protected

Definition at line 2212 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by compareTextAssignmentsObject(), and saveGradesObject().

2212  : void
2213  {
2214  //tabs
2215  $this->tabs_gui->clearTargets();
2216  $this->tabs_gui->setBackTarget(
2217  $this->lng->txt("back"),
2218  $this->ctrl->getLinkTarget($this, "members")
2219  );
2220  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFailedObject()

ilExerciseManagementGUI::setFailedObject ( )
protected

Definition at line 2276 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), getMultiActionUserIds(), ILIAS\Repository\lng(), null, and setSingleStatus().

2276  : void
2277  {
2278  $members = $this->getMultiActionUserIds();
2279  $done = false;
2280  if ($this->assignment !== null) {
2281  foreach (array_keys($members) as $mem) {
2282  $done = true;
2283  $this->setSingleStatus($this->assignment->getId(), $mem, "failed");
2284  }
2285  if ($done) {
2286  $this->tpl->setOnScreenMessage("success", $this->lng->txt("msg_obj_modified"), true);
2287  }
2288  }
2289  $this->ctrl->redirect($this, "members");
2290  }
setSingleStatus($ass_id, $part_id, $status)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMultiActionUserIds(bool $a_keep_teams=false)
+ Here is the call graph for this function:

◆ setIndividualDeadlineObject()

ilExerciseManagementGUI::setIndividualDeadlineObject ( )
protected
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 2043 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\lng(), membersObject(), null, and showParticipantObject().

2043  : void
2044  {
2045  // this will only get called if no selection
2046  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_one"));
2047 
2048  if ($this->assignment !== null) {
2049  $this->membersObject();
2050  } else {
2051  $this->showParticipantObject();
2052  }
2053  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
membersObject()
All participants and submission of one assignment.
+ Here is the call graph for this function:

◆ setPassedObject()

ilExerciseManagementGUI::setPassedObject ( )
protected

Definition at line 2292 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), getMultiActionUserIds(), ILIAS\Repository\lng(), null, and setSingleStatus().

2292  : void
2293  {
2294  $members = $this->getMultiActionUserIds();
2295  $done = false;
2296  if ($this->assignment !== null) {
2297  foreach (array_keys($members) as $mem) {
2298  $done = true;
2299  $this->setSingleStatus($this->assignment->getId(), $mem, "passed");
2300  }
2301  if ($done) {
2302  $this->tpl->setOnScreenMessage("success", $this->lng->txt("msg_obj_modified"), true);
2303  }
2304  }
2305  $this->ctrl->redirect($this, "members");
2306  }
setSingleStatus($ass_id, $part_id, $status)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMultiActionUserIds(bool $a_keep_teams=false)
+ Here is the call graph for this function:

◆ setSingleStatus()

ilExerciseManagementGUI::setSingleStatus (   $ass_id,
  $part_id,
  $status 
)
protected

Definition at line 2308 of file class.ilExerciseManagementGUI.php.

Referenced by setFailedObject(), and setPassedObject().

2308  : void
2309  {
2310  $ass = new ilExAssignment($ass_id);
2311  $submission = new ilExSubmission($ass, $part_id);
2312  $member_status = $ass->getMemberStatus($part_id);
2313  $member_status->setStatus($status);
2314  $member_status->update();
2315  }
Exercise assignment.
Exercise submission //TODO: This class has many static methods related to delivered "files"...
+ Here is the caller graph for this function:

◆ showGradesOverviewObject()

ilExerciseManagementGUI::showGradesOverviewObject ( )

Definition at line 1100 of file class.ilExerciseManagementGUI.php.

References $ctrl, $GLOBALS, $lng, $toolbar, $tpl, addSubTabs(), ILIAS\Repository\ctrl(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1100  : void
1101  {
1102  $tpl = $this->tpl;
1103  $ilToolbar = $this->toolbar;
1104  $ilCtrl = $this->ctrl;
1105  $lng = $this->lng;
1106 
1107  $this->addSubTabs("grades");
1108 
1109  $mem_obj = new ilExerciseMembers($this->exercise);
1110  $mems = $mem_obj->getMembers();
1111 
1112  $mems = $GLOBALS['DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
1113  'edit_submissions_grades',
1114  'edit_submissions_grades',
1115  $this->exercise->getRefId(),
1116  $mems
1117  );
1118  if (count($mems) > 0) {
1119  $ilToolbar->addButton(
1120  $lng->txt("exc_export_excel"),
1121  $ilCtrl->getLinkTarget($this, "exportExcel")
1122  );
1123  }
1124 
1125  $this->ctrl->setParameter($this, "vw", self::VIEW_GRADES);
1126 
1127  $grades_tab = new ilExGradesTableGUI(
1128  $this,
1129  "showGradesOverview",
1130  $this->service,
1131  $mem_obj
1132  );
1133  $tpl->setContent($grades_tab->getHTML());
1134  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
$GLOBALS["DIC"]
Definition: wac.php:53
Exercise participant table.
+ Here is the call graph for this function:

◆ showMultiFeedbackConfirmationTableObject()

ilExerciseManagementGUI::showMultiFeedbackConfirmationTableObject ( )

Show multi feedback confirmation table.

Definition at line 1799 of file class.ilExerciseManagementGUI.php.

References $tpl, addSubTabs(), and ILIAS\UICore\GlobalTemplate\setContent().

1799  : void
1800  {
1801  $tpl = $this->tpl;
1802 
1803  $this->addSubTabs("assignment");
1804 
1805  $tab = new ilFeedbackConfirmationTable2GUI($this, "showMultiFeedbackConfirmationTable", $this->assignment);
1806  $tpl->setContent($tab->getHTML());
1807  }
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ showMultiFeedbackObject()

ilExerciseManagementGUI::showMultiFeedbackObject ( ?FormAdapterGUI  $form = null)

Definition at line 1743 of file class.ilExerciseManagementGUI.php.

References $lng, $tpl, addSubTabs(), ILIAS\Repository\ctrl(), getMultiFeedbackForm(), ILIAS\Repository\lng(), null, ILIAS\UICore\GlobalTemplate\setContent(), ILIAS\UICore\GlobalTemplate\setOnScreenMessage(), and ilLanguage\txt().

Referenced by uploadMultiFeedbackObject().

1745  : void {
1746  $lng = $this->lng;
1747  $tpl = $this->tpl;
1748 
1749  $this->tpl->setOnScreenMessage('info', $lng->txt("exc_multi_feedb_info"));
1750 
1751  $this->addSubTabs("assignment");
1752 
1753  // #13719
1754  $this->gui->button(
1755  $this->lng->txt("exc_download_zip_structure"),
1756  $this->ctrl->getLinkTarget($this, "downloadMultiFeedbackZip")
1757  )->toToolbar();
1758 
1759  if ($form === null) {
1760  $form = $this->getMultiFeedbackForm($this->assignment->getId());
1761  }
1762 
1763  $tpl->setContent($form->render());
1764  }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showParticipantApplyObject()

ilExerciseManagementGUI::showParticipantApplyObject ( )

Definition at line 1058 of file class.ilExerciseManagementGUI.php.

References showParticipantObject().

1058  : void
1059  {
1060  $exc_tab = new ilAssignmentsPerParticipantTableGUI(
1061  $this,
1062  "showParticipant",
1063  $this->exercise,
1064  $this->requested_part_id,
1065  $this->feedback_gui
1066  );
1067  $exc_tab->resetOffset();
1068  $exc_tab->writeFilterToSession();
1069 
1070  $this->showParticipantObject();
1071  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ showParticipantObject()

ilExerciseManagementGUI::showParticipantObject ( )

Show Participant.

Definition at line 970 of file class.ilExerciseManagementGUI.php.

References $access, $ctrl, $lng, $requested_part_id, $toolbar, $tpl, ilObjUser\_lookupName(), ilObject\_lookupType(), addSubTabs(), ILIAS\Repository\ctrl(), ilOrgUnitPositionAndRBACAccessHandler\filterUserIdsByRbacOrPositionOfCurrentUser(), initIndividualDeadlineModal(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\setContent(), ilSelectInputGUI\setOptions(), ilArrayUtil\sortArray(), and ilLanguage\txt().

Referenced by setIndividualDeadlineObject(), showParticipantApplyObject(), and showParticipantResetObject().

970  : void
971  {
972  $tpl = $this->tpl;
973  $ilToolbar = $this->toolbar;
974  $ilCtrl = $this->ctrl;
975  $lng = $this->lng;
977 
978  $this->addSubTabs("participant");
979  $this->ctrl->setParameter($this, "ass_id", "");
980 
981  // participant selection
982  $members = $this->exercise->members_obj->getMembers();
983 
985  'edit_submissions_grades',
986  'edit_submissions_grades',
987  $this->exercise->getRefId(),
988  $members
989  );
990 
991 
992  if (count($members) == 0) {
993  $this->tpl->setOnScreenMessage('info', $lng->txt("exc_no_participants"));
994  return;
995  }
996 
997  $mems = array();
998  foreach ($members as $mem_id) {
999  if (ilObject::_lookupType($mem_id) == "usr") {
1000  $name = ilObjUser::_lookupName($mem_id);
1001  if (trim($name["login"]) != "") { // #20073
1002  $mems[$mem_id] = $name;
1003  }
1004  }
1005  }
1006 
1007  $mems = ilArrayUtil::sortArray($mems, "lastname", "asc", false, true);
1008 
1009  if ($this->requested_part_id == 0 && $mems !== [] && key($mems) > 0) {
1010  $ilCtrl->setParameter($this, "part_id", key($mems));
1011  $ilCtrl->redirect($this, "showParticipant");
1012  }
1013 
1014  $current_participant = $this->requested_part_id;
1015 
1016  reset($mems);
1017  if (count($mems) > 1) {
1018  $options = array();
1019  foreach ($mems as $k => $m) {
1020  $options[$k] =
1021  $m["lastname"] . ", " . $m["firstname"] . " [" . $m["login"] . "]";
1022  }
1023  $si = new ilSelectInputGUI($this->lng->txt("exc_participant"), "part_id");
1024  $si->setOptions($options);
1025  $si->setValue($current_participant);
1026  $ilToolbar->addStickyItem($si, true);
1027 
1028  $this->gui->button(
1029  $this->lng->txt("select"),
1030  "selectParticipant"
1031  )->submit()->toToolbar(true);
1032  }
1033 
1034  if ($mems !== []) {
1035  $this->ctrl->setParameter($this, "vw", self::VIEW_PARTICIPANT);
1036  $this->ctrl->setParameter($this, "part_id", $current_participant);
1037 
1038  $ilToolbar->addSeparator();
1039  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1040  $ilToolbar->addFormButton($lng->txt("download_all_returned_files"), "downloadSubmissions");
1041 
1042  $part_tab = new ilAssignmentsPerParticipantTableGUI(
1043  $this,
1044  "showParticipant",
1045  $this->exercise,
1046  $current_participant,
1047  $this->feedback_gui
1048  );
1049  $tpl->setContent($part_tab->getHTML() .
1050  $this->initIndividualDeadlineModal());
1051  } else {
1052  $this->tpl->setOnScreenMessage('info', $this->lng->txt("exc_no_assignments_available"));
1053  }
1054  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a selection list property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _lookupName(int $a_user_id)
lookup user name
setContent(string $a_html)
Sets content for standard template.
setOptions(array $a_options)
filterUserIdsByRbacOrPositionOfCurrentUser(string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids)
static _lookupType(int $id, bool $reference=false)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showParticipantResetObject()

ilExerciseManagementGUI::showParticipantResetObject ( )

Definition at line 1075 of file class.ilExerciseManagementGUI.php.

References showParticipantObject().

1075  : void
1076  {
1077  $exc_tab = new ilAssignmentsPerParticipantTableGUI(
1078  $this,
1079  "showParticipant",
1080  $this->exercise,
1081  $this->requested_part_id,
1082  $this->feedback_gui
1083  );
1084  $exc_tab->resetOffset();
1085  $exc_tab->resetFilter();
1086 
1087  $this->showParticipantObject();
1088  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ uploadMultiFeedbackObject()

ilExerciseManagementGUI::uploadMultiFeedbackObject ( )

Upload multi feedback file.

Definition at line 1785 of file class.ilExerciseManagementGUI.php.

References ILIAS\Repository\ctrl(), getMultiFeedbackForm(), and showMultiFeedbackObject().

1785  : void
1786  {
1787  // #11983
1788  $form = $this->getMultiFeedbackForm($this->assignment->getId());
1789  if ($form->isValid()) {
1790  $this->ctrl->redirect($this, "showMultiFeedbackConfirmationTable");
1791  }
1792 
1793  $this->showMultiFeedbackObject($form);
1794  }
showMultiFeedbackObject(?FormAdapterGUI $form=null)
+ Here is the call graph for this function:

◆ waitingDownloadObject()

ilExerciseManagementGUI::waitingDownloadObject ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 351 of file class.ilExerciseManagementGUI.php.

References $ctrl, $lng, $url, membersObject(), ilCtrl\setParameterByClass(), and ilLanguage\txt().

351  : void
352  {
353  $lng = $this->lng;
354  $ilCtrl = $this->ctrl;
355 
356  $ilCtrl->setParameterByClass("ilExSubmissionFileGUI", "member_id", $this->requested_member_id);
357  $url = $ilCtrl->getLinkTargetByClass(array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"), "downloadNewReturned");
358  $js_url = $ilCtrl->getLinkTargetByClass(array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"), "downloadNewReturned", "", "", false);
359  $this->tpl->setOnScreenMessage('info', $lng->txt("exc_wait_for_files") . "<a href='$url'> " . $lng->txt('exc_download_files') . "</a><script>window.location.href ='" . $js_url . "';</script>");
360  $this->membersObject();
361  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setParameterByClass(string $a_class, string $a_parameter, $a_value)
$url
Definition: shib_logout.php:66
membersObject()
All participants and submission of one assignment.
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilExerciseManagementGUI::$access
protected

Definition at line 64 of file class.ilExerciseManagementGUI.php.

Referenced by showParticipantObject().

◆ $ass_id

◆ $assignment

ilExAssignment ilExerciseManagementGUI::$assignment = null
protected

Definition at line 70 of file class.ilExerciseManagementGUI.php.

Referenced by parseIndividualDeadlineData().

◆ $ctrl

◆ $db

ilDBInterface ilExerciseManagementGUI::$db = null
protected

Definition at line 75 of file class.ilExerciseManagementGUI.php.

◆ $domain

ILIAS Exercise InternalDomainService ilExerciseManagementGUI::$domain
protected

Definition at line 55 of file class.ilExerciseManagementGUI.php.

◆ $done

bool ilExerciseManagementGUI::$done = false
protected

Definition at line 81 of file class.ilExerciseManagementGUI.php.

◆ $exercise

ilObjExercise ilExerciseManagementGUI::$exercise
protected

Definition at line 69 of file class.ilExerciseManagementGUI.php.

◆ $feedback_gui

ilExerciseSubmissionFeedbackGUI ilExerciseManagementGUI::$feedback_gui
protected

◆ $filter

array ilExerciseManagementGUI::$filter = []
protected

Definition at line 67 of file class.ilExerciseManagementGUI.php.

◆ $gui

InternalGUIService ilExerciseManagementGUI::$gui
protected

Definition at line 58 of file class.ilExerciseManagementGUI.php.

◆ $http

ILIAS HTTP Services ilExerciseManagementGUI::$http
protected

Definition at line 59 of file class.ilExerciseManagementGUI.php.

◆ $listed_ass_ids

array ilExerciseManagementGUI::$listed_ass_ids
protected

Definition at line 88 of file class.ilExerciseManagementGUI.php.

◆ $listed_participants

array ilExerciseManagementGUI::$listed_participants
protected

Definition at line 86 of file class.ilExerciseManagementGUI.php.

Referenced by saveStatusAllObject().

◆ $lng

◆ $log

ilLogger ilExerciseManagementGUI::$log
protected

Definition at line 72 of file class.ilExerciseManagementGUI.php.

◆ $notification

ILIAS Exercise Notification NotificationManager ilExerciseManagementGUI::$notification
protected

Definition at line 56 of file class.ilExerciseManagementGUI.php.

◆ $request

GUIRequest ilExerciseManagementGUI::$request
protected

Definition at line 97 of file class.ilExerciseManagementGUI.php.

Referenced by __construct().

◆ $requested_ass_id

int ilExerciseManagementGUI::$requested_ass_id = 0
protected

Definition at line 79 of file class.ilExerciseManagementGUI.php.

◆ $requested_comment

string ilExerciseManagementGUI::$requested_comment
protected

Definition at line 83 of file class.ilExerciseManagementGUI.php.

◆ $requested_files

array ilExerciseManagementGUI::$requested_files
protected

Definition at line 94 of file class.ilExerciseManagementGUI.php.

Referenced by saveMultiFeedbackObject().

◆ $requested_filter_feedback

string ilExerciseManagementGUI::$requested_filter_feedback
protected

Definition at line 96 of file class.ilExerciseManagementGUI.php.

Referenced by initFilter().

◆ $requested_filter_status

string ilExerciseManagementGUI::$requested_filter_status
protected

Definition at line 95 of file class.ilExerciseManagementGUI.php.

Referenced by initFilter().

◆ $requested_group_members

array ilExerciseManagementGUI::$requested_group_members
protected

Definition at line 92 of file class.ilExerciseManagementGUI.php.

Referenced by createTeamsFromGroupsObject().

◆ $requested_idl_id

string ilExerciseManagementGUI::$requested_idl_id
protected

Definition at line 80 of file class.ilExerciseManagementGUI.php.

◆ $requested_learning_comments

array ilExerciseManagementGUI::$requested_learning_comments
protected

Definition at line 82 of file class.ilExerciseManagementGUI.php.

◆ $requested_marks

array ilExerciseManagementGUI::$requested_marks
protected

◆ $requested_member_id

int ilExerciseManagementGUI::$requested_member_id = 0
protected

Definition at line 77 of file class.ilExerciseManagementGUI.php.

Referenced by executeCommand(), and openSubmissionViewObject().

◆ $requested_part_id

int ilExerciseManagementGUI::$requested_part_id = 0
protected

◆ $requested_status

array ilExerciseManagementGUI::$requested_status
protected

◆ $requested_tutor_notices

array ilExerciseManagementGUI::$requested_tutor_notices
protected

◆ $requested_user_login

string ilExerciseManagementGUI::$requested_user_login
protected

Definition at line 84 of file class.ilExerciseManagementGUI.php.

◆ $selected_ass_ids

array ilExerciseManagementGUI::$selected_ass_ids
protected

Definition at line 87 of file class.ilExerciseManagementGUI.php.

◆ $selected_participants

array ilExerciseManagementGUI::$selected_participants
protected

Definition at line 85 of file class.ilExerciseManagementGUI.php.

Referenced by downloadSubmissionsObject().

◆ $service

InternalService ilExerciseManagementGUI::$service
protected

Definition at line 74 of file class.ilExerciseManagementGUI.php.

Referenced by __construct().

◆ $tabs_gui

ilTabsGUI ilExerciseManagementGUI::$tabs_gui
protected

◆ $task_factory

TaskFactory ilExerciseManagementGUI::$task_factory
protected

Definition at line 71 of file class.ilExerciseManagementGUI.php.

◆ $toolbar

ilToolbarGUI ilExerciseManagementGUI::$toolbar
protected

◆ $tpl

◆ $tutor_feedback_file

TutorFeedbackFileManager ilExerciseManagementGUI::$tutor_feedback_file
protected

Definition at line 57 of file class.ilExerciseManagementGUI.php.

◆ $ui_factory

Factory ilExerciseManagementGUI::$ui_factory
protected

Definition at line 65 of file class.ilExerciseManagementGUI.php.

◆ $ui_renderer

Renderer ilExerciseManagementGUI::$ui_renderer
protected

Definition at line 66 of file class.ilExerciseManagementGUI.php.

◆ $user

ilObjUser ilExerciseManagementGUI::$user
protected

Definition at line 73 of file class.ilExerciseManagementGUI.php.

◆ $zip

ZipAdapter ilExerciseManagementGUI::$zip
protected

Definition at line 53 of file class.ilExerciseManagementGUI.php.

◆ FEEDBACK_FULL_SUBMISSION

const ilExerciseManagementGUI::FEEDBACK_FULL_SUBMISSION = "submission_feedback"

Definition at line 48 of file class.ilExerciseManagementGUI.php.

◆ FEEDBACK_ONLY_SUBMISSION

const ilExerciseManagementGUI::FEEDBACK_ONLY_SUBMISSION = "submission_only"

Definition at line 47 of file class.ilExerciseManagementGUI.php.

◆ GRADE_FAILED

const ilExerciseManagementGUI::GRADE_FAILED = "failed"

Definition at line 52 of file class.ilExerciseManagementGUI.php.

◆ GRADE_NOT_GRADED

const ilExerciseManagementGUI::GRADE_NOT_GRADED = "notgraded"

◆ GRADE_PASSED

const ilExerciseManagementGUI::GRADE_PASSED = "passed"

Definition at line 51 of file class.ilExerciseManagementGUI.php.

◆ VIEW_ASSIGNMENT

const ilExerciseManagementGUI::VIEW_ASSIGNMENT = 1

Definition at line 43 of file class.ilExerciseManagementGUI.php.

◆ VIEW_GRADES

const ilExerciseManagementGUI::VIEW_GRADES = 3

Definition at line 45 of file class.ilExerciseManagementGUI.php.

◆ VIEW_PARTICIPANT

const ilExerciseManagementGUI::VIEW_PARTICIPANT = 2

Definition at line 44 of file class.ilExerciseManagementGUI.php.


The documentation for this class was generated from the following file: