ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilExAssignment Class Reference

Exercise assignment. More...

+ Collaboration diagram for ilExAssignment:

Public Member Functions

 __construct ($a_id=0)
 Constructor. More...
 
 hasTeam ()
 
 setId (int $a_val)
 
 getId ()
 
 setExerciseId (int $a_val)
 
 getExerciseId ()
 
 setStartTime (?int $a_val)
 
 getStartTime ()
 
 setDeadline (?int $a_val)
 
 getDeadline ()
 
 setDeadlineMode (int $a_val)
 Set deadline mode. More...
 
 getDeadlineMode ()
 
 setRelativeDeadline (int $a_val)
 
 getRelativeDeadline ()
 
 setRelDeadlineLastSubmission (int $a_val)
 
 getRelDeadlineLastSubmission ()
 
 getPersonalDeadline (int $a_user_id)
 
 getLastPersonalDeadline ()
 
 setExtendedDeadline (?int $a_val)
 
 getExtendedDeadline ()
 
 setInstruction (string $a_val)
 
 getInstruction ()
 
 getInstructionPresentation ()
 
 setTitle (string $a_val)
 
 getTitle ()
 
 setMandatory (bool $a_val)
 
 getMandatory ()
 
 setOrderNr (int $a_val)
 
 getOrderNr ()
 
 setType (int $a_value)
 Set type this will most probably become an non public function in the future (or become obsolete) More...
 
 getAssignmentType ()
 
 getType ()
 Get type this will most probably become an non public function in the future (or become obsolete) More...
 
 isValidType (int $a_value)
 
 setPeerReview (bool $a_value)
 
 getPeerReview ()
 
 setPeerReviewMin (int $a_value)
 
 getPeerReviewMin ()
 
 setPeerReviewSimpleUnlock (int $a_value)
 
 getPeerReviewSimpleUnlock ()
 
 setPeerReviewDeadline (int $a_val)
 
 getPeerReviewDeadline ()
 
 setPeerReviewValid (int $a_value)
 Set peer review validation. More...
 
 getPeerReviewValid ()
 
 setPeerReviewRating (bool $a_val)
 
 hasPeerReviewRating ()
 
 setPeerReviewText (bool $a_val)
 
 hasPeerReviewText ()
 
 setPeerReviewFileUpload (bool $a_val)
 
 hasPeerReviewFileUpload ()
 
 setPeerReviewPersonalized (bool $a_val)
 
 hasPeerReviewPersonalized ()
 
 setPeerReviewChars (?int $a_value)
 
 getPeerReviewChars ()
 
 setPeerReviewCriteriaCatalogue (?int $a_value)
 
 getPeerReviewCriteriaCatalogue ()
 
 setFeedbackFile (?string $a_value)
 
 getFeedbackFile ()
 
 setFeedbackCron (bool $a_value)
 Toggle (global) feedback file cron. More...
 
 hasFeedbackCron ()
 
 setFeedbackDate (int $a_value)
 
 getFeedbackDate ()
 
 setFeedbackDateCustom (int $a_value)
 Set (global) feedback file availability using a custom date. More...
 
 getFeedbackDateCustom ()
 
 setTeamTutor (bool $a_value)
 
 getTeamTutor ()
 
 setMaxFile (?int $a_value)
 
 getMaxFile ()
 
 setPortfolioTemplateId (int $a_val)
 
 getPortfolioTemplateId ()
 
 read ()
 
 save ()
 
 update ()
 
 delete (ilObjExercise $exc, bool $update_user_status=true)
 
 getFiles ()
 
 getInstructionFilesOrder ()
 
 getMemberListData ()
 
 getExerciseMemberAssignmentData (int $a_user_id, string $a_grade="")
 Get submission data for an specific user,exercise and assignment. More...
 
 afterDeadline ()
 
 afterDeadlineStrict (bool $a_include_personal=true)
 
 afterCustomDate ()
 
 beforeDeadline ()
 
 notStartedYet ()
 
 handleGlobalFeedbackFileUpload (int $ass_id, array $a_file)
 
 getMemberStatus (?int $a_user_id=null)
 
 setIndividualDeadline (string $id, ilDateTime $date)
 
 getIndividualDeadlines ()
 
 getRequestedDeadlines ()
 
 hasActiveIDl ()
 
 hasReadOnlyIDl ()
 
 fixInstructionFileOrdering ()
 
 fileAddOrder (array $a_entries=array())
 
 setMinCharLimit (int $a_val)
 
 getMinCharLimit ()
 
 setMaxCharLimit (int $a_val)
 
 getMaxCharLimit ()
 
 getCalculatedDeadlines ()
 Get calculated deadlines for user/team members. More...
 
 canParticipantReceiveFeedback (int $part_id)
 

Static Public Member Functions

static getInstancesByExercise (int $a_exc_id)
 
static instructionFileGetFileOrderData (array $a_file_data, int $a_ass_id)
 
static getAssignmentDataOfExercise (int $a_exc_id)
 
static cloneAssignmentsOfExercise (int $a_old_exc_id, int $a_new_exc_id, array $a_crit_cat_map)
 Clone assignments of exercise. More...
 
static lookupMaxOrderNrForEx (int $a_exc_id)
 
static lookupAssignmentOnline (int $a_ass_id)
 
static lookupExerciseId (int $a_ass_id)
 
static lookupTitle (int $a_id)
 
static lookupType (int $a_id)
 
static saveAssOrderOfExercise (int $a_ex_id, array $a_order)
 
static orderAssByDeadline (int $a_ex_id)
 
static countMandatory (int $a_ex_id)
 
static count (int $a_ex_id)
 
static isInExercise (int $a_ass_id, int $a_ex_id)
 
static createNewUserRecords (int $a_user_id, int $a_exc_id)
 
static createNewAssignmentRecords (int $a_ass_id, ilObjExercise $a_exc)
 
static getPendingFeedbackNotifications ()
 
static sendFeedbackNotifications (int $a_ass_id, ?int $a_user_id=null)
 
static saveInstructionFilesOrderOfAssignment (int $a_ass_id, array $a_order)
 
static insertFileOrderNr (int $a_ass_id, string $a_filename, int $a_order_nr)
 
static instructionFileInsertOrder (string $a_filename, int $a_ass_id, int $a_order_nr=0)
 
static instructionFileDeleteOrder (int $a_ass_id, array $a_file)
 
static renameInstructionFile (string $a_old_name, string $a_new_name, int $a_ass_id)
 
static instructionFileExistsInDb (string $a_filename, int $a_ass_id)
 
static instructionFileOrderGetMax (int $a_ass_id)
 

Data Fields

const TYPE_UPLOAD = 1
 direct checks against const should be avoided, use type objects instead More...
 
const TYPE_BLOG = 2
 
const TYPE_PORTFOLIO = 3
 
const TYPE_UPLOAD_TEAM = 4
 
const TYPE_TEXT = 5
 
const TYPE_WIKI_TEAM = 6
 
const FEEDBACK_DATE_DEADLINE = 1
 
const FEEDBACK_DATE_SUBMISSION = 2
 
const FEEDBACK_DATE_CUSTOM = 3
 
const PEER_REVIEW_VALID_NONE = 1
 
const PEER_REVIEW_VALID_ONE = 2
 
const PEER_REVIEW_VALID_ALL = 3
 
const TEAMS_FORMED_BY_PARTICIPANTS = 0
 
const TEAMS_FORMED_BY_TUTOR = 1
 
const TEAMS_FORMED_BY_RANDOM = 2
 
const TEAMS_FORMED_BY_ASSIGNMENT = 3
 
const DEADLINE_ABSOLUTE = 0
 
const DEADLINE_RELATIVE = 1
 
const DEADLINE_ABSOLUTE_INDIVIDUAL = 2
 

Protected Member Functions

 initFromDB (array $a_set)
 Import DB record. More...
 
 handleCalendarEntries (string $a_event, ilObjExercise $exc)
 Handle calendar entries for deadline(s) More...
 

Protected Attributes

ILIAS Exercise InternalGUIService $gui
 
ILIAS Exercise InternalDomainService $domain
 
ILIAS Refinery String Group $string_transform
 
ilDBInterface $db
 
ilLanguage $lng
 
ilObjUser $user
 
ilAppEventHandler $app_event_handler
 
ilAccessHandler $access
 
int $id = 0
 
int $exc_id = 0
 
int $type = 0
 
int $start_time = null
 
int $deadline = null
 
int $deadline2 = null
 
string $instruction = ""
 
string $title = ""
 
bool $mandatory = false
 
int $order_nr = 0
 
bool $peer = false
 
int $peer_min = 0
 
int $peer_unlock = 0
 
int $peer_dl = 0
 
int $peer_valid
 
bool $peer_file = false
 
bool $peer_personal = false
 
int $peer_char = null
 
bool $peer_text = false
 
bool $peer_rating = false
 
int $peer_crit_cat = 0
 
string $feedback_file = null
 
bool $feedback_cron = false
 
int $feedback_date = 0
 
int $feedback_date_custom = 0
 
bool $team_tutor = false
 
int $max_file = null
 
int $portfolio_template = 0
 
int $min_char_limit = 0
 
int $max_char_limit = 0
 
ilExAssignmentTypes $types
 
ilExAssignmentTypeInterface $ass_type
 
int $deadline_mode = 0
 
int $relative_deadline = 0
 
int $rel_deadline_last_subm = 0
 
array $member_status = []
 
ilLogger $log
 
int $crit_cat = 0
 

Static Private Member Functions

static lookup (int $a_id, string $a_field)
 

Detailed Description

Exercise assignment.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 34 of file class.ilExAssignment.php.

Constructor & Destructor Documentation

◆ __construct()

ilExAssignment::__construct (   $a_id = 0)

Constructor.

Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 115 of file class.ilExAssignment.php.

116 {
117 global $DIC;
118
119 $this->domain = $DIC->exercise()->internal()->domain();
120 $this->db = $DIC->database();
121 $this->lng = $DIC->language();
122 $this->user = $DIC->user();
123 $this->app_event_handler = $DIC["ilAppEventHandler"];
124 $this->types = ilExAssignmentTypes::getInstance();
125 $this->access = $DIC->access();
126 $this->domain = $DIC->exercise()->internal()->domain();
127 $this->gui = $DIC->exercise()->internal()->gui();
128
129 $this->setType(self::TYPE_UPLOAD);
130 $this->setFeedbackDate(self::FEEDBACK_DATE_DEADLINE);
131
132 $this->log = ilLoggerFactory::getLogger("exc");
133
134 if ($a_id > 0) {
135 $this->setId($a_id);
136 $this->read();
137 }
138 $this->string_transform = $DIC->refinery()
139 ->string();
140 }
setType(int $a_value)
Set type this will most probably become an non public function in the future (or become obsolete)
setFeedbackDate(int $a_value)
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\access(), ilExAssignmentTypes\getInstance(), ilLoggerFactory\getLogger(), ILIAS\Repository\lng(), read(), setFeedbackDate(), setId(), setType(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ afterCustomDate()

ilExAssignment::afterCustomDate ( )
Returns
bool return if sample solution is available using a custom date.

Definition at line 1587 of file class.ilExAssignment.php.

1587 : bool
1588 {
1589 $date_custom = $this->getFeedbackDateCustom();
1590 //if the solution will be displayed only after reach all the deadlines.
1591 //$final_deadline = $this->afterDeadlineStrict();
1592 //$dl = max($final_deadline, time());
1593 //return ($date_custom - $dl <= 0);
1594 return ($date_custom - time() <= 0);
1595 }

◆ afterDeadline()

ilExAssignment::afterDeadline ( )

Definition at line 1549 of file class.ilExAssignment.php.

1549 : bool
1550 {
1551 $ilUser = $this->user;
1552
1553 // :TODO: always current user?
1554 $idl = $this->getPersonalDeadline($ilUser->getId()); // official deadline
1555
1556 // no deadline === true
1557 $deadline = max($this->deadline, $this->deadline2, $idl); // includes grace period
1558 return ($deadline - time() <= 0);
1559 }
getPersonalDeadline(int $a_user_id)

◆ afterDeadlineStrict()

ilExAssignment::afterDeadlineStrict ( bool  $a_include_personal = true)

Definition at line 1561 of file class.ilExAssignment.php.

1561 : bool
1562 {
1563 // :TODO: this means that peer feedback, global feedback is available
1564 // after LAST personal deadline
1565 // team management is currently ignoring personal deadlines
1566 $idl = $a_include_personal
1567 ? $this->getLastPersonalDeadline()
1568 : null;
1569
1570 // no deadline === false
1571 $deadline = max($this->deadline, $this->deadline2, $idl);
1572
1573 // #18271 - afterDeadline() does not handle last personal deadline
1574 // after effective deadline of all users
1575 if ($idl && $deadline == $idl) {
1576 return ($deadline - time() <= 0);
1577 }
1578
1579 // like: after effective deadline (for single user), except: no deadline false
1580 return ($deadline > 0 &&
1581 $this->afterDeadline());
1582 }

◆ beforeDeadline()

ilExAssignment::beforeDeadline ( )

Definition at line 1598 of file class.ilExAssignment.php.

1598 : bool
1599 {
1600 // no deadline === true
1601 return !$this->afterDeadlineStrict();
1602 }
afterDeadlineStrict(bool $a_include_personal=true)

◆ canParticipantReceiveFeedback()

ilExAssignment::canParticipantReceiveFeedback ( int  $part_id)

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

1984 : bool
1985 {
1986 if ($this->hasTeam()) {
1987 if (!ilExAssignmentTeam::getTeamId($this->getId(), $part_id)) {
1988 return false;
1989 }
1990 }
1991 return true;
1992 }
static getTeamId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)

References ILIAS\Survey\Mode\getId(), and ilExAssignmentTeam\getTeamId().

+ Here is the call graph for this function:

◆ cloneAssignmentsOfExercise()

static ilExAssignment::cloneAssignmentsOfExercise ( int  $a_old_exc_id,
int  $a_new_exc_id,
array  $a_crit_cat_map 
)
static

Clone assignments of exercise.

Exceptions
DirectoryNotFoundException
FileNotFoundException
IOException
ilExcUnknownAssignmentTypeException|ilDateTimeException

Definition at line 945 of file class.ilExAssignment.php.

949 : void {
950 global $DIC;
951
952 $ass_domain = $DIC->exercise()->internal()->domain()->assignment();
953 $ass_data = self::getInstancesByExercise($a_old_exc_id);
954 foreach ($ass_data as $d) {
955 // clone assignment
956 $new_ass = new ilExAssignment();
957 $new_ass->setExerciseId($a_new_exc_id);
958 $new_ass->setTitle($d->getTitle());
959 $new_ass->setDeadline($d->getDeadline());
960 $new_ass->setExtendedDeadline($d->getExtendedDeadline());
961 $new_ass->setInstruction($d->getInstruction());
962 $new_ass->setMandatory($d->getMandatory());
963 $new_ass->setOrderNr($d->getOrderNr());
964 $new_ass->setStartTime($d->getStartTime());
965 $new_ass->setType($d->getType());
966 $new_ass->setPeerReview($d->getPeerReview());
967 $new_ass->setPeerReviewMin($d->getPeerReviewMin());
968 $new_ass->setPeerReviewDeadline($d->getPeerReviewDeadline());
969 $new_ass->setPeerReviewFileUpload($d->hasPeerReviewFileUpload());
970 $new_ass->setPeerReviewPersonalized($d->hasPeerReviewPersonalized());
971 $new_ass->setPeerReviewValid($d->getPeerReviewValid());
972 $new_ass->setPeerReviewChars($d->getPeerReviewChars());
973 $new_ass->setPeerReviewText($d->hasPeerReviewText());
974 $new_ass->setPeerReviewRating($d->hasPeerReviewRating());
975 $new_ass->setPeerReviewCriteriaCatalogue($d->getPeerReviewCriteriaCatalogue());
976 $new_ass->setPeerReviewSimpleUnlock($d->getPeerReviewSimpleUnlock());
977 $new_ass->setFeedbackFile($d->getFeedbackFile());
978 $new_ass->setFeedbackDate($d->getFeedbackDate());
979 $new_ass->setFeedbackDateCustom($d->getFeedbackDateCustom());
980 $new_ass->setFeedbackCron($d->hasFeedbackCron()); // #16295
981 $new_ass->setTeamTutor($d->getTeamTutor());
982 $new_ass->setMaxFile($d->getMaxFile());
983 $new_ass->setMinCharLimit($d->getMinCharLimit());
984 $new_ass->setMaxCharLimit($d->getMaxCharLimit());
985 $new_ass->setPortfolioTemplateId($d->getPortfolioTemplateId());
986 $new_ass->setDeadlineMode($d->getDeadlineMode());
987 $new_ass->setRelativeDeadline($d->getRelativeDeadline());
988 $new_ass->setRelDeadlineLastSubmission($d->getRelDeadlineLastSubmission());
989
990 // criteria catalogue(s)
991 if ($d->getPeerReviewCriteriaCatalogue() &&
992 array_key_exists($d->getPeerReviewCriteriaCatalogue(), $a_crit_cat_map)) {
993 $new_ass->setPeerReviewCriteriaCatalogue($a_crit_cat_map[$d->getPeerReviewCriteriaCatalogue()]);
994 }
995
996 $new_ass->save();
997
998 // clone assignment files
999 $ass_domain->instructionFiles($d->getId())->cloneTo($new_ass->getId());
1000
1001 // clone global feedback file
1002 $ass_domain->sampleSolution($d->getId())->cloneTo($new_ass->getId());
1003
1004 // clone reminders
1008 $rmd_sub = new ilExAssignmentReminder($a_old_exc_id, $d->getId(), $rem_type);
1009 if ($rmd_sub->getReminderStatus()) {
1010 $new_rmd_sub = new ilExAssignmentReminder($a_new_exc_id, $new_ass->getId(), $rem_type);
1011 $new_rmd_sub->setReminderStatus($rmd_sub->getReminderStatus());
1012 $new_rmd_sub->setReminderStart($rmd_sub->getReminderStart());
1013 $new_rmd_sub->setReminderEnd($rmd_sub->getReminderEnd());
1014 $new_rmd_sub->setReminderFrequency($rmd_sub->getReminderFrequency());
1015 $new_rmd_sub->setReminderMailTemplate($rmd_sub->getReminderMailTemplate());
1016 $new_rmd_sub->save();
1017 }
1018 }
1019
1020
1021 // type specific properties
1022 $ass_type = $d->getAssignmentType();
1024 }
1025 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Exercise assignment.
ilExAssignmentTypeInterface $ass_type
static getInstancesByExercise(int $a_exc_id)
cloneSpecificProperties(ilExAssignment $source, ilExAssignment $target)

◆ count()

static ilExAssignment::count ( int  $a_ex_id)
static

Definition at line 1183 of file class.ilExAssignment.php.

1183 : int
1184 {
1185 global $DIC;
1186
1187 $ilDB = $DIC->database();
1188
1189 $set = $ilDB->query(
1190 "SELECT count(*) cntm FROM exc_assignment " .
1191 " WHERE exc_id = " . $ilDB->quote($a_ex_id, "integer")
1192 );
1193 $rec = $ilDB->fetchAssoc($set);
1194 return $rec["cntm"];
1195 }

References $DIC, and $ilDB.

Referenced by ILIAS\Exercise\Settings\SettingsGUI\getEditForm().

+ Here is the caller graph for this function:

◆ countMandatory()

static ilExAssignment::countMandatory ( int  $a_ex_id)
static

Definition at line 1167 of file class.ilExAssignment.php.

1167 : int
1168 {
1169 global $DIC;
1170
1171 $ilDB = $DIC->database();
1172
1173 $set = $ilDB->query(
1174 "SELECT count(*) cntm FROM exc_assignment " .
1175 " WHERE exc_id = " . $ilDB->quote($a_ex_id, "integer") .
1176 " AND mandatory = " . $ilDB->quote(1, "integer")
1177 );
1178 $rec = $ilDB->fetchAssoc($set);
1179 return (int) $rec["cntm"];
1180 }

References $DIC, and $ilDB.

Referenced by ILIAS\Exercise\Settings\SettingsGUI\getEditForm().

+ Here is the caller graph for this function:

◆ createNewAssignmentRecords()

static ilExAssignment::createNewAssignmentRecords ( int  $a_ass_id,
ilObjExercise  $a_exc 
)
static

Definition at line 1343 of file class.ilExAssignment.php.

1346 : void {
1347 global $DIC;
1348
1349 $ilDB = $DIC->database();
1350 $ass_domain = $DIC->exercise()->internal()->domain()->assignment();
1351
1352 $exmem = new ilExerciseMembers($a_exc);
1353 $mems = $exmem->getMembers();
1354
1355 foreach ($mems as $mem) {
1356 $ilDB->replace("exc_mem_ass_status", array(
1357 "ass_id" => array("integer", $a_ass_id),
1358 "usr_id" => array("integer", $mem)
1359 ), array(
1360 "status" => array("text", "notgraded")
1361 ));
1362 if (!$ass_domain->tutorFeedbackFile($a_ass_id)->hasCollection($mem)) {
1363 $ass_domain->tutorFeedbackFile($a_ass_id)->createCollection($mem);
1364 }
1365 }
1366 }
Class ilExerciseMembers.

◆ createNewUserRecords()

static ilExAssignment::createNewUserRecords ( int  $a_user_id,
int  $a_exc_id 
)
static

Definition at line 1318 of file class.ilExAssignment.php.

1321 : void {
1322 global $DIC;
1323
1324 $ilDB = $DIC->database();
1325 $ass_domain = $DIC->exercise()->internal()->domain()->assignment();
1326
1327 $ass_data = self::getAssignmentDataOfExercise($a_exc_id);
1328 foreach ($ass_data as $ass) {
1329 //echo "-".$ass["id"]."-".$a_user_id."-";
1330 $ilDB->replace("exc_mem_ass_status", array(
1331 "ass_id" => array("integer", $ass["id"]),
1332 "usr_id" => array("integer", $a_user_id)
1333 ), array(
1334 "status" => array("text", "notgraded")
1335 ));
1336 if (!$ass_domain->tutorFeedbackFile((int) $ass["id"])->hasCollection($a_user_id)) {
1337 $ass_domain->tutorFeedbackFile((int) $ass["id"])->createCollection($a_user_id);
1338 }
1339 }
1340 }
static getAssignmentDataOfExercise(int $a_exc_id)

Referenced by ilExerciseMembers\assignMember().

+ Here is the caller graph for this function:

◆ delete()

ilExAssignment::delete ( ilObjExercise  $exc,
bool  $update_user_status = true 
)
Exceptions
ilDateTimeException

Definition at line 833 of file class.ilExAssignment.php.

836 : void {
838
839 // delete submissions
840 $exc_members = new ilExerciseMembers($exc);
841 foreach ($exc_members->getMembers() as $mem) {
842 $submission = new ilExSubmission($this, $mem);
843 $submission->deleteAllFiles();
844 }
845
846 $ilDB->manipulateF(
847 "DELETE FROM exc_usr_tutor " .
848 "WHERE ass_id = %s",
849 array("integer"),
850 array($this->getId())
851 );
852
853 // remove peer review data
854 if ($this->getPeerReview()) {
855 $peer_review = new ilExPeerReview($this);
856 $peer_review->resetPeerReviews();
857 }
858
859 $ilDB->manipulate(
860 "DELETE FROM exc_ass_file_order" .
861 " WHERE assignment_id = " . $ilDB->quote($this->getId(), 'integer')
862 );
863
864 $ilDB->manipulate(
865 "DELETE FROM exc_mem_ass_status" .
866 " WHERE ass_id = " . $ilDB->quote($this->getId(), 'integer')
867 );
868
869 $ilDB->manipulate(
870 "DELETE FROM exc_assignment WHERE " .
871 " id = " . $ilDB->quote($this->getId(), "integer")
872 );
873
874 if ($update_user_status) {
875 $exc->updateAllUsersStatus();
876 }
877
878 $this->handleCalendarEntries("delete", $exc);
879
881
882 $reminder = new ilExAssignmentReminder();
883 $reminder->deleteReminders($this->getId());
884
885 // delete teams
886 $this->domain->team()->deleteTeamsOfAssignment($this->getId());
887
888 // delete resource collections and resources
889 $this->domain->assignment()->instructionFiles($this->getId())
890 ->deleteCollection();
891 }
handleCalendarEntries(string $a_event, ilObjExercise $exc)
Handle calendar entries for deadline(s)
Exercise peer review.
Exercise submission //TODO: This class has many static methods related to delivered "files".
updateAllUsersStatus()
Update status of all users.

References $ilDB, ilExcIndividualDeadline\deleteForAssignment(), ILIAS\Survey\Mode\getId(), and ilObjExercise\updateAllUsersStatus().

+ Here is the call graph for this function:

◆ fileAddOrder()

ilExAssignment::fileAddOrder ( array  $a_entries = array())

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

1899 : array {
1901
1902 $order = $this->getInstructionFilesOrder();
1903 foreach ($a_entries as $k => $e) {
1904 $a_entries[$k]["order_val"] = $order[$e["file"]]["order_nr"] ?? 0;
1905 $a_entries[$k]["order_id"] = $order[$e["file"]]["id"] ?? "";
1906 }
1907
1908 return $a_entries;
1909 }

◆ fixInstructionFileOrdering()

ilExAssignment::fixInstructionFileOrdering ( )

Definition at line 1858 of file class.ilExAssignment.php.

1858 : void
1859 {
1860 $db = $this->db;
1861
1862 $files = array_map(function ($v) {
1863 return $v["name"];
1864 }, $this->getFiles());
1865
1866 $set = $db->query("SELECT * FROM exc_ass_file_order " .
1867 " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1868 " ORDER BY order_nr");
1869 $order_nr = 10;
1870 $numbered_files = array();
1871 while ($rec = $db->fetchAssoc($set)) {
1872 // file exists, set correct order nr
1873 if (in_array($rec["filename"], $files)) {
1874 $db->manipulate(
1875 "UPDATE exc_ass_file_order SET " .
1876 " order_nr = " . $db->quote($order_nr, "integer") .
1877 " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1878 " AND id = " . $db->quote($rec["id"], "integer")
1879 );
1880 $order_nr += 10;
1881 $numbered_files[] = $rec["filename"];
1882 } else { // file does not exist, delete entry
1883 $db->manipulate(
1884 "DELETE FROM exc_ass_file_order " .
1885 " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1886 " AND id = " . $db->quote($rec["id"], "integer")
1887 );
1888 }
1889 }
1890 foreach ($files as $f) {
1891 if (!in_array($f, $numbered_files)) {
1893 }
1894 }
1895 }
static instructionFileInsertOrder(string $a_filename, int $a_ass_id, int $a_order_nr=0)
quote($value, string $type)
manipulate(string $query)
Run a (write) Query on the database.
query(string $query)
Run a (read-only) Query on the database.
fetchAssoc(ilDBStatement $statement)

References Vendor\Package\$f, ilDBInterface\fetchAssoc(), ILIAS\Survey\Mode\getId(), ilDBInterface\manipulate(), ilDBInterface\query(), and ilDBInterface\quote().

+ Here is the call graph for this function:

◆ getAssignmentDataOfExercise()

static ilExAssignment::getAssignmentDataOfExercise ( int  $a_exc_id)
static

Definition at line 895 of file class.ilExAssignment.php.

895 : array
896 {
897 global $DIC;
898
899 $ilDB = $DIC->database();
900
901 // should be changed to self::getInstancesByExerciseId()
902
903 $set = $ilDB->query("SELECT * FROM exc_assignment " .
904 " WHERE exc_id = " . $ilDB->quote($a_exc_id, "integer") .
905 " ORDER BY order_nr");
906 $data = array();
907
908 $order_val = 10;
909 while ($rec = $ilDB->fetchAssoc($set)) {
910 $data[] = array(
911 "id" => (int) $rec["id"],
912 "exc_id" => (int) $rec["exc_id"],
913 "deadline" => (int) $rec["time_stamp"],
914 "deadline2" => (int) $rec["deadline2"],
915 "instruction" => (string) $rec["instruction"],
916 "title" => (string) $rec["title"],
917 "start_time" => (int) $rec["start_time"],
918 "order_val" => $order_val,
919 "mandatory" => (bool) $rec["mandatory"],
920 "type" => (int) $rec["type"],
921 "peer" => (bool) $rec["peer"],
922 "peer_min" => (int) $rec["peer_min"],
923 "peer_dl" => (int) $rec["peer_dl"],
924 "peer_file" => (bool) $rec["peer_file"],
925 "peer_prsl" => (bool) $rec["peer_prsl"],
926 "fb_file" => (string) $rec["fb_file"],
927 "fb_date" => (int) $rec["fb_date"],
928 "fb_cron" => (bool) $rec["fb_cron"],
929 "deadline_mode" => (int) $rec["deadline_mode"],
930 "relative_deadline" => (int) $rec["relative_deadline"],
931 "rel_deadline_last_subm" => (int) $rec["rel_deadline_last_subm"]
932 );
933 $order_val += 10;
934 }
935 return $data;
936 }

References $data, $DIC, and $ilDB.

Referenced by ilExerciseXMLParser\__construct(), and ilExerciseXMLWriter\start().

+ Here is the caller graph for this function:

◆ getAssignmentType()

ilExAssignment::getAssignmentType ( )

Definition at line 404 of file class.ilExAssignment.php.

405 {
406 return $this->ass_type;
407 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by ilExSubmission\__construct().

+ Here is the caller graph for this function:

◆ getCalculatedDeadlines()

ilExAssignment::getCalculatedDeadlines ( )

Get calculated deadlines for user/team members.

These arrays will contain no entries, if team or user has not started the assignment yet.

Returns
array[array] contains two arrays one with key "user", second with key "team", each one has member id as keys and calculated deadline as value

Definition at line 1962 of file class.ilExAssignment.php.

1962 : array
1963 {
1964 $calculated_deadlines = array(
1965 "user" => array(),
1966 "team" => array()
1967 );
1968
1969 if ($this->getRelativeDeadline() && $this->getDeadlineMode() == self::DEADLINE_RELATIVE) {
1970 foreach (ilExcIndividualDeadline::getStartingTimestamps($this->getId()) as $ts) {
1971 $type = $ts["is_team"]
1972 ? "team"
1973 : "user";
1974
1975 $calculated_deadlines[$type][$ts["member_id"]] = array(
1976 "calculated_deadline" => $ts["starting_ts"] + ($this->getRelativeDeadline() * 24 * 60 * 60)
1977 );
1978 }
1979 }
1980 return $calculated_deadlines;
1981 }
static getStartingTimestamps(int $a_ass_id)
Get starting timestamp data for an assignment.

References ILIAS\Survey\Mode\getId(), and ilExcIndividualDeadline\getStartingTimestamps().

+ Here is the call graph for this function:

◆ getDeadline()

ilExAssignment::getDeadline ( )

Definition at line 243 of file class.ilExAssignment.php.

243 : ?int
244 {
245 return $this->deadline;
246 }

◆ getDeadlineMode()

ilExAssignment::getDeadlineMode ( )

Definition at line 257 of file class.ilExAssignment.php.

257 : int
258 {
260 }

◆ getExerciseId()

ilExAssignment::getExerciseId ( )

Definition at line 223 of file class.ilExAssignment.php.

223 : int
224 {
225 return $this->exc_id;
226 }

Referenced by ilFeedbackConfirmationTable2GUI\__construct().

+ Here is the caller graph for this function:

◆ getExerciseMemberAssignmentData()

ilExAssignment::getExerciseMemberAssignmentData ( int  $a_user_id,
string  $a_grade = "" 
)

Get submission data for an specific user,exercise and assignment.

todo we can refactor a bit the method getMemberListData to use this and remove duplicate code.

Definition at line 1282 of file class.ilExAssignment.php.

1285 : ?array {
1286 global $DIC;
1287 $ilDB = $DIC->database();
1288
1289 $and_grade = "";
1290 if (in_array($a_grade, array("notgraded", "passed", "failed"))) {
1291 $and_grade = " AND status = " . $ilDB->quote($a_grade, "text");
1292 }
1293
1294 $q = "SELECT * FROM exc_mem_ass_status " .
1295 "WHERE ass_id = " . $ilDB->quote($this->getId(), "integer") .
1296 " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
1297 $and_grade;
1298
1299 $set = $ilDB->query($q);
1300
1301 $data = null;
1302 while ($rec = $ilDB->fetchAssoc($set)) {
1303 $sub = new ilExSubmission($this, $a_user_id);
1304
1305 $data["sent_time"] = $rec["sent_time"];
1306 $data["submission"] = $sub->getLastSubmission();
1307 $data["status_time"] = $rec["status_time"];
1308 $data["feedback_time"] = $rec["feedback_time"];
1309 $data["notice"] = $rec["notice"];
1310 $data["status"] = $rec["status"];
1311 $data["mark"] = $rec["mark"];
1312 $data["comment"] = $rec["u_comment"];
1313 }
1314 return $data;
1315 }
$q
Definition: shib_logout.php:25

References $ilDB.

◆ getExtendedDeadline()

ilExAssignment::getExtendedDeadline ( )

Definition at line 326 of file class.ilExAssignment.php.

326 : ?int
327 {
328 return $this->deadline2;
329 }

◆ getFeedbackDate()

ilExAssignment::getFeedbackDate ( )

Definition at line 602 of file class.ilExAssignment.php.

602 : int
603 {
605 }

◆ getFeedbackDateCustom()

ilExAssignment::getFeedbackDateCustom ( )

Definition at line 616 of file class.ilExAssignment.php.

616 : int
617 {
619 }

◆ getFeedbackFile()

ilExAssignment::getFeedbackFile ( )

Definition at line 578 of file class.ilExAssignment.php.

578 : ?string
579 {
581 }

◆ getFiles()

ilExAssignment::getFiles ( )

Definition at line 1027 of file class.ilExAssignment.php.

1027 : array
1028 {
1029 return $this->domain->assignment()->instructionFiles($this->getId())->getFiles();
1030 }

References ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getId()

◆ getIndividualDeadlines()

ilExAssignment::getIndividualDeadlines ( )

Definition at line 1657 of file class.ilExAssignment.php.

1657 : array
1658 {
1659 $ilDB = $this->db;
1660
1661 $res = array();
1662
1663 $set = $ilDB->query("SELECT * FROM exc_idl" .
1664 " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer"));
1665 while ($row = $ilDB->fetchAssoc($set)) {
1666 if ($row["is_team"]) {
1667 $row["member_id"] = "t" . $row["member_id"];
1668 }
1669
1670 $res[$row["member_id"]] = $row["tstamp"];
1671 }
1672
1673 return $res;
1674 }
$res
Definition: ltiservices.php:69

References $ilDB, and $res.

Referenced by ilAssignmentsPerParticipantTableGUI\parseData().

+ Here is the caller graph for this function:

◆ getInstancesByExercise()

static ilExAssignment::getInstancesByExercise ( int  $a_exc_id)
static
Parameters
int$a_exc_id
Returns
ilExAssignment[]
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 147 of file class.ilExAssignment.php.

147 : array
148 {
149 global $DIC;
150
151 $ilDB = $DIC->database();
152
153 $set = $ilDB->query("SELECT * FROM exc_assignment " .
154 " WHERE exc_id = " . $ilDB->quote($a_exc_id, "integer") .
155 " ORDER BY order_nr");
156 $data = array();
157
158 $order_val = 10;
159 while ($rec = $ilDB->fetchAssoc($set)) {
160 // ???
161 $rec["order_val"] = $order_val;
162
163 $ass = new self();
164 $ass->initFromDB($rec);
165 $data[] = $ass;
166
167 $order_val += 10;
168 }
169
170 return $data;
171 }

References $data, $DIC, and $ilDB.

Referenced by ilExGradesTableGUI\__construct(), ilCalendarScheduleFilterExercise\addCustomEvents(), ilExerciseMembers\deassignMember(), ILIAS\Exercise\IndividualDeadline\IndividualDeadlineManager\deleteAllOfUserInExercise(), ilObjExercise\exportGradesExcel(), ILIAS\Exercise\Assignment\Mandatory\RandomAssignmentsManager\getAssignmentSelection(), ilExcCriteriaCatalogueTableGUI\getItems(), ILIAS\Exercise\Assignment\Mandatory\RandomAssignmentsManager\getTotalNumberOfAssignments(), ilExerciseManagementGUI\membersObject(), ilAssignmentsPerParticipantTableGUI\parseData(), ilObjExerciseGUI\showOverviewObject(), and ilExerciseManagementGUI\showParticipantObject().

+ Here is the caller graph for this function:

◆ getInstruction()

ilExAssignment::getInstruction ( )

Definition at line 336 of file class.ilExAssignment.php.

336 : string
337 {
338 return $this->instruction;
339 }

◆ getInstructionFilesOrder()

ilExAssignment::getInstructionFilesOrder ( )

Definition at line 1032 of file class.ilExAssignment.php.

1032 : array
1033 {
1034 // TODO IRSS: currently the ilResourceCollectionGUI does not support the order of files done by the component,
1035 // this should be implemented as well there and will follow.
1036 $ilDB = $this->db;
1037
1038 $set = $ilDB->query(
1039 "SELECT filename, order_nr, id FROM exc_ass_file_order " .
1040 " WHERE assignment_id = " . $ilDB->quote($this->getId(), "integer")
1041 );
1042
1043 $data = array();
1044 while ($rec = $ilDB->fetchAssoc($set)) {
1045 $data[$rec['filename']] = $rec;
1046 }
1047
1048 return $data;
1049 }

References $data, and $ilDB.

◆ getInstructionPresentation()

ilExAssignment::getInstructionPresentation ( )

Definition at line 341 of file class.ilExAssignment.php.

341 : string
342 {
343 $inst = $this->getInstruction();
344 if (trim($inst)) {
345 $is_html = (strlen($inst) != strlen(strip_tags($inst)));
346 if (!$is_html) {
347 $inst = nl2br(
348 $this->string_transform->makeClickable()->transform($inst)
349 );
350 }
351 }
352 $inst = $this->gui->html()->escapeCurly($inst);
353 return $inst;
354 }

◆ getLastPersonalDeadline()

ilExAssignment::getLastPersonalDeadline ( )

Definition at line 310 of file class.ilExAssignment.php.

310 : int
311 {
313
314 $set = $ilDB->query("SELECT MAX(tstamp) FROM exc_idl" .
315 " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer"));
316 $row = $ilDB->fetchAssoc($set);
317 return $row["tstamp"] ?? 0;
318 }

References $ilDB.

◆ getMandatory()

ilExAssignment::getMandatory ( )

Definition at line 371 of file class.ilExAssignment.php.

371 : bool
372 {
373 return $this->mandatory;
374 }

◆ getMaxCharLimit()

ilExAssignment::getMaxCharLimit ( )

Definition at line 1949 of file class.ilExAssignment.php.

1949 : int
1950 {
1951 return $this->max_char_limit;
1952 }

Referenced by ilExAssTypeTextGUI\getFormValuesArray().

+ Here is the caller graph for this function:

◆ getMaxFile()

ilExAssignment::getMaxFile ( )

Definition at line 638 of file class.ilExAssignment.php.

638 : ?int
639 {
640 return $this->max_file;
641 }

◆ getMemberListData()

ilExAssignment::getMemberListData ( )

Definition at line 1215 of file class.ilExAssignment.php.

1215 : array
1216 {
1217 $ilDB = $this->db;
1218
1219 $mem = array();
1220
1221 // first get list of members from member table
1222 $set = $ilDB->query("SELECT ud.usr_id, ud.lastname, ud.firstname, ud.login" .
1223 " FROM exc_members excm" .
1224 " JOIN usr_data ud ON (ud.usr_id = excm.usr_id)" .
1225 " WHERE excm.obj_id = " . $ilDB->quote($this->getExerciseId(), "integer"));
1226 while ($rec = $ilDB->fetchAssoc($set)) {
1227 $mem[$rec["usr_id"]] =
1228 array(
1229 "name" => $rec["lastname"] . ", " . $rec["firstname"],
1230 "login" => $rec["login"],
1231 "usr_id" => $rec["usr_id"],
1232 "lastname" => $rec["lastname"],
1233 "firstname" => $rec["firstname"]
1234 );
1235 }
1236
1237 // users in idl may already exist before occuring in the members db table
1238 // if user starts an assignment with relative deadline
1239 $idl = $this->getIndividualDeadlines();
1240 if (!$this->ass_type->usesTeams()) {
1241 foreach ($idl as $user_id => $v) {
1242 if (!isset($mem[$user_id])) {
1243 if (ilObjUser::_exists((int) $user_id)) {
1245 $mem[$user_id] =
1246 array(
1247 "name" => $name["lastname"] . ", " . $name["firstname"],
1248 "login" => $name["login"],
1249 "usr_id" => $user_id,
1250 "lastname" => $name["lastname"],
1251 "firstname" => $name["firstname"]
1252 );
1253 }
1254 }
1255 }
1256 }
1257
1258 $q = "SELECT * FROM exc_mem_ass_status " .
1259 "WHERE ass_id = " . $ilDB->quote($this->getId(), "integer");
1260 $set = $ilDB->query($q);
1261 while ($rec = $ilDB->fetchAssoc($set)) {
1262 if (isset($mem[$rec["usr_id"]])) {
1263 $sub = new ilExSubmission($this, $rec["usr_id"]);
1264
1265 $mem[$rec["usr_id"]]["sent_time"] = $rec["sent_time"];
1266 $mem[$rec["usr_id"]]["submission"] = $sub->getLastSubmission();
1267 $mem[$rec["usr_id"]]["status_time"] = $rec["status_time"];
1268 $mem[$rec["usr_id"]]["feedback_time"] = $rec["feedback_time"];
1269 $mem[$rec["usr_id"]]["notice"] = $rec["notice"];
1270 $mem[$rec["usr_id"]]["status"] = $rec["status"];
1271 $mem[$rec["usr_id"]]["mark"] = $rec["mark"];
1272 $mem[$rec["usr_id"]]["comment"] = $rec["u_comment"];
1273 }
1274 }
1275 return $mem;
1276 }
static _lookupName(int $a_user_id)
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data

References $ilDB, $q, $user_id, ilObject\_exists(), ilObjUser\_lookupName(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getMemberStatus()

ilExAssignment::getMemberStatus ( ?int  $a_user_id = null)

Definition at line 1625 of file class.ilExAssignment.php.

1626 {
1627 $ilUser = $this->user;
1628
1629 if (!$a_user_id) {
1630 $a_user_id = $ilUser->getId();
1631 }
1632 if (!array_key_exists($a_user_id, $this->member_status)) {
1633 $this->member_status[$a_user_id] = new ilExAssignmentMemberStatus($this->getId(), $a_user_id);
1634 }
1635 return $this->member_status[$a_user_id];
1636 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Survey\Mode\getId().

Referenced by ilAssignmentsPerParticipantTableGUI\parseData(), and ilObjExercise\processExerciseStatus().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMinCharLimit()

ilExAssignment::getMinCharLimit ( )

Definition at line 1938 of file class.ilExAssignment.php.

1938 : int
1939 {
1940 return $this->min_char_limit;
1941 }

Referenced by ilExAssTypeTextGUI\getFormValuesArray().

+ Here is the caller graph for this function:

◆ getOrderNr()

ilExAssignment::getOrderNr ( )

Definition at line 381 of file class.ilExAssignment.php.

381 : int
382 {
383 return $this->order_nr;
384 }

Referenced by ilAssignmentsPerParticipantTableGUI\parseData().

+ Here is the caller graph for this function:

◆ getPeerReview()

ilExAssignment::getPeerReview ( )

Definition at line 429 of file class.ilExAssignment.php.

429 : bool
430 {
431 return $this->peer;
432 }

Referenced by ilExPeerReviewGUI\buildSubmissionPropertiesAndActions(), and ILIAS\Exercise\PeerReview\DomainService\exPeerReview().

+ Here is the caller graph for this function:

◆ getPeerReviewChars()

ilExAssignment::getPeerReviewChars ( )

Definition at line 530 of file class.ilExAssignment.php.

530 : ?int
531 {
532 return $this->peer_char;
533 }

◆ getPeerReviewCriteriaCatalogue()

ilExAssignment::getPeerReviewCriteriaCatalogue ( )

Definition at line 540 of file class.ilExAssignment.php.

540 : ?int
541 {
542 return $this->crit_cat;
543 }

◆ getPeerReviewDeadline()

ilExAssignment::getPeerReviewDeadline ( )

Definition at line 462 of file class.ilExAssignment.php.

462 : int
463 {
464 return $this->peer_dl;
465 }

Referenced by ilExPeerReviewGUI\buildSubmissionPropertiesAndActions().

+ Here is the caller graph for this function:

◆ getPeerReviewMin()

ilExAssignment::getPeerReviewMin ( )

Definition at line 439 of file class.ilExAssignment.php.

439 : int
440 {
441 return $this->peer_min;
442 }

◆ getPeerReviewSimpleUnlock()

ilExAssignment::getPeerReviewSimpleUnlock ( )

Definition at line 449 of file class.ilExAssignment.php.

449 : int
450 {
451 return $this->peer_unlock;
452 }

◆ getPeerReviewValid()

ilExAssignment::getPeerReviewValid ( )

Definition at line 477 of file class.ilExAssignment.php.

477 : int
478 {
479 return $this->peer_valid;
480 }

◆ getPendingFeedbackNotifications()

static ilExAssignment::getPendingFeedbackNotifications ( )
static

Definition at line 1424 of file class.ilExAssignment.php.

1424 : array
1425 {
1426 global $DIC;
1427
1429 $log->debug("Get feedback notifications.");
1430
1431 $ilDB = $DIC->database();
1432
1433 $res = array();
1434
1435 $set = $ilDB->query("SELECT id,fb_file,time_stamp,deadline2,fb_date FROM exc_assignment" .
1436 " WHERE fb_cron = " . $ilDB->quote(1, "integer") .
1437 " AND (fb_date = " . $ilDB->quote(self::FEEDBACK_DATE_DEADLINE, "integer") .
1438 " AND time_stamp IS NOT NULL" .
1439 " AND time_stamp > " . $ilDB->quote(0, "integer") .
1440 " AND time_stamp < " . $ilDB->quote(time(), "integer") .
1441 " AND fb_cron_done = " . $ilDB->quote(0, "integer") .
1442 ") OR (fb_date = " . $ilDB->quote(self::FEEDBACK_DATE_CUSTOM, "integer") .
1443 " AND fb_date_custom IS NOT NULL" .
1444 " AND fb_date_custom > " . $ilDB->quote(0, "integer") .
1445 " AND fb_date_custom < " . $ilDB->quote(time(), "integer") .
1446 " AND fb_cron_done = " . $ilDB->quote(0, "integer") . ")");
1447
1448
1449
1450 while ($row = $ilDB->fetchAssoc($set)) {
1451 $log->debug("check assignment " . $row['id'] . ", fb_file " . $row["fb_file"]);
1452 if ($row['fb_date'] == self::FEEDBACK_DATE_DEADLINE) {
1453 $max = max($row['time_stamp'], $row['deadline2']);
1454 if (trim((string) $row["fb_file"]) && $max <= time()) {
1455 $log->debug("...adding(1)");
1456 $res[] = $row["id"];
1457 }
1458 } elseif ($row['fb_date'] == self::FEEDBACK_DATE_CUSTOM) {
1459 if (trim($row["fb_file"] ?? "") && ($row['fb_date_custom'] ?? 0) <= time()) {
1460 $log->debug("...adding(2)");
1461 $res[] = $row["id"];
1462 }
1463 }
1464 }
1465
1466 return $res;
1467 }
debug(string $message, array $context=[])

References $DIC, $ilDB, $log, $res, and ilLoggerFactory\getLogger().

Referenced by ilExcCronFeedbackNotification\run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPersonalDeadline()

ilExAssignment::getPersonalDeadline ( int  $a_user_id)

Definition at line 284 of file class.ilExAssignment.php.

284 : int
285 {
287
288 $is_team = false;
289 if ($this->ass_type->usesTeams()) {
290 $team_id = ilExAssignmentTeam::getTeamId($this->getId(), $a_user_id);
291 if (!$team_id) {
292 // #0021043
293 return $this->getDeadline();
294 }
295 $a_user_id = $team_id;
296 $is_team = true;
297 }
298
299 $set = $ilDB->query("SELECT tstamp FROM exc_idl" .
300 " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer") .
301 " AND member_id = " . $ilDB->quote($a_user_id, "integer") .
302 " AND is_team = " . $ilDB->quote($is_team, "integer"));
303 $row = $ilDB->fetchAssoc($set);
304
305 // use assignment deadline if no direct personal
306 return max(($row["tstamp"] ?? 0), $this->getDeadline());
307 }

References $ilDB, ILIAS\Survey\Mode\getId(), and ilExAssignmentTeam\getTeamId().

+ Here is the call graph for this function:

◆ getPortfolioTemplateId()

ilExAssignment::getPortfolioTemplateId ( )

Definition at line 649 of file class.ilExAssignment.php.

649 : int
650 {
652 }

Referenced by ilExAssTypePortfolioGUI\getFormValuesArray().

+ Here is the caller graph for this function:

◆ getRelativeDeadline()

ilExAssignment::getRelativeDeadline ( )

Definition at line 267 of file class.ilExAssignment.php.

267 : int
268 {
270 }

◆ getRelDeadlineLastSubmission()

ilExAssignment::getRelDeadlineLastSubmission ( )

Definition at line 277 of file class.ilExAssignment.php.

277 : int
278 {
280 }

◆ getRequestedDeadlines()

ilExAssignment::getRequestedDeadlines ( )

Definition at line 1676 of file class.ilExAssignment.php.

1676 : array
1677 {
1678 $ilDB = $this->db;
1679
1680 $res = array();
1681
1682 $set = $ilDB->query("SELECT * FROM exc_idl" .
1683 " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer") .
1684 " AND requested = " . $ilDB->quote(1, "integer"));
1685 while ($row = $ilDB->fetchAssoc($set)) {
1686 if ($row["is_team"]) {
1687 $row["member_id"] = "t" . $row["member_id"];
1688 }
1689
1690 $res[$row["member_id"]] = $row["requested"];
1691 }
1692
1693 return $res;
1694 }

References $ilDB, and $res.

◆ getStartTime()

ilExAssignment::getStartTime ( )

Definition at line 233 of file class.ilExAssignment.php.

233 : ?int
234 {
235 return $this->start_time;
236 }

◆ getTeamTutor()

ilExAssignment::getTeamTutor ( )

Definition at line 627 of file class.ilExAssignment.php.

627 : bool
628 {
629 return $this->team_tutor;
630 }

◆ getTitle()

ilExAssignment::getTitle ( )

Definition at line 361 of file class.ilExAssignment.php.

361 : string
362 {
363 return $this->title;
364 }

Referenced by ilExAssignmentPeerReviewOverviewTableGUI\__construct(), and ilAssignmentsPerParticipantTableGUI\parseData().

+ Here is the caller graph for this function:

◆ getType()

ilExAssignment::getType ( )

Get type this will most probably become an non public function in the future (or become obsolete)

Definition at line 414 of file class.ilExAssignment.php.

414 : int
415 {
416 return $this->type;
417 }

◆ handleCalendarEntries()

ilExAssignment::handleCalendarEntries ( string  $a_event,
ilObjExercise  $exc 
)
protected

Handle calendar entries for deadline(s)

Exceptions
ilDateTimeException

Definition at line 1373 of file class.ilExAssignment.php.

1376 : void {
1377 $ilAppEventHandler = $this->app_event_handler;
1378
1379 $dl_id = $this->getId() . "0";
1380 $fbdl_id = $this->getId() . "1";
1381
1382 $context_ids = array($dl_id, $fbdl_id);
1383 $apps = array();
1384
1385 if ($a_event != "delete") {
1386 // deadline or relative deadline given
1388 $app = new ilCalendarAppointmentTemplate($dl_id);
1389 $app->setTranslationType(ilCalendarEntry::TRANSLATION_SYSTEM);
1390 $app->setSubtitle("cal_exc_deadline");
1391 $app->setTitle($this->getTitle());
1392 $app->setFullday(false);
1393 // note: in the case of a relative deadline this will be set to 0 / 1970...)
1394 // see ilCalendarScheduleFilterExercise for appointment modification
1395 $app->setStart(new ilDateTime($this->getDeadline(), IL_CAL_UNIX));
1396
1397 $apps[] = $app;
1398 }
1399
1400 if ($this->getPeerReview() &&
1401 $this->getPeerReviewDeadline()) {
1402 $app = new ilCalendarAppointmentTemplate($fbdl_id);
1403 $app->setTranslationType(ilCalendarEntry::TRANSLATION_SYSTEM);
1404 $app->setSubtitle("cal_exc_peer_review_deadline");
1405 $app->setTitle($this->getTitle());
1406 $app->setFullday(false);
1407 $app->setStart(new ilDateTime($this->getPeerReviewDeadline(), IL_CAL_UNIX));
1408
1409 $apps[] = $app;
1410 }
1411 }
1412
1413 $ilAppEventHandler->raise(
1414 'components/ILIAS/Exercise',
1415 $a_event . 'Assignment',
1416 array(
1417 'object' => $exc,
1418 'obj_id' => $exc->getId(),
1419 'context_ids' => $context_ids,
1420 'appointments' => $apps)
1421 );
1422 }
const IL_CAL_UNIX
Apointment templates are used for automatic generated apointments.
@classDescription Date and time handling
ilAppEventHandler $app_event_handler

◆ handleGlobalFeedbackFileUpload()

ilExAssignment::handleGlobalFeedbackFileUpload ( int  $ass_id,
array  $a_file 
)
Exceptions
ilException

Definition at line 1617 of file class.ilExAssignment.php.

1617 : bool
1618 {
1619 $rcid = $this->domain->assignment()->sampleSolution($ass_id)->importFromLegacyUpload($a_file);
1620 $this->setFeedbackFile($a_file["name"]);
1621 return ($rcid !== "");
1622 }
setFeedbackFile(?string $a_value)

References $ass_id.

◆ hasActiveIDl()

ilExAssignment::hasActiveIDl ( )

Definition at line 1696 of file class.ilExAssignment.php.

1696 : bool
1697 {
1698 return (bool) ($this->getDeadline() || $this->getDeadlineMode() === self::DEADLINE_ABSOLUTE_INDIVIDUAL);
1699 }

◆ hasFeedbackCron()

ilExAssignment::hasFeedbackCron ( )

Definition at line 591 of file class.ilExAssignment.php.

591 : bool
592 {
594 }

◆ hasPeerReviewFileUpload()

ilExAssignment::hasPeerReviewFileUpload ( )

Definition at line 507 of file class.ilExAssignment.php.

507 : bool
508 {
509 return $this->peer_file;
510 }

◆ hasPeerReviewPersonalized()

ilExAssignment::hasPeerReviewPersonalized ( )

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

517 : bool
518 {
520 }

◆ hasPeerReviewRating()

ilExAssignment::hasPeerReviewRating ( )

Definition at line 487 of file class.ilExAssignment.php.

487 : bool
488 {
489 return $this->peer_rating;
490 }

◆ hasPeerReviewText()

ilExAssignment::hasPeerReviewText ( )

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

497 : bool
498 {
499 return $this->peer_text;
500 }

◆ hasReadOnlyIDl()

ilExAssignment::hasReadOnlyIDl ( )

Definition at line 1701 of file class.ilExAssignment.php.

1701 : bool
1702 {
1703 if (!$this->ass_type->usesTeams() &&
1704 $this->getPeerReview()) {
1705 // all deadlines are read-only if we have peer feedback
1706 $peer_review = new ilExPeerReview($this);
1707 if ($peer_review->hasPeerReviewGroups()) {
1708 return true;
1709 }
1710 }
1711
1712 return false;
1713 }

◆ hasTeam()

ilExAssignment::hasTeam ( )

Definition at line 203 of file class.ilExAssignment.php.

203 : bool
204 {
205 return $this->ass_type->usesTeams();
206 }

Referenced by ilExSubmission\__construct(), and ilAssignmentsPerParticipantTableGUI\parseData().

+ Here is the caller graph for this function:

◆ initFromDB()

ilExAssignment::initFromDB ( array  $a_set)
protected

Import DB record.

Parameters
array$a_set
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 678 of file class.ilExAssignment.php.

678 : void
679 {
680 $this->setId((int) $a_set["id"]);
681 $this->setExerciseId((int) $a_set["exc_id"]);
682 $this->setDeadline((int) $a_set["time_stamp"]);
683 $this->setExtendedDeadline((int) $a_set["deadline2"]);
684 $this->setInstruction((string) $a_set["instruction"]);
685 $this->setTitle((string) $a_set["title"]);
686 $this->setStartTime((int) $a_set["start_time"]);
687 $this->setOrderNr((int) $a_set["order_nr"]);
688 $this->setMandatory((bool) $a_set["mandatory"]);
689 $this->setType((int) $a_set["type"]);
690 $this->setPeerReview((bool) $a_set["peer"]);
691 $this->setPeerReviewMin((int) $a_set["peer_min"]);
692 $this->setPeerReviewSimpleUnlock((int) $a_set["peer_unlock"]);
693 $this->setPeerReviewDeadline((int) $a_set["peer_dl"]);
694 $this->setPeerReviewValid((int) $a_set["peer_valid"]);
695 $this->setPeerReviewFileUpload((bool) $a_set["peer_file"]);
696 $this->setPeerReviewPersonalized((bool) $a_set["peer_prsl"]);
697 $this->setPeerReviewChars((int) $a_set["peer_char"]);
698 $this->setPeerReviewText((bool) $a_set["peer_text"]);
699 $this->setPeerReviewRating((bool) $a_set["peer_rating"]);
700 $this->setPeerReviewCriteriaCatalogue((int) $a_set["peer_crit_cat"]);
701 $this->setFeedbackFile((string) $a_set["fb_file"]);
702 $this->setFeedbackDate((int) $a_set["fb_date"]);
703 $this->setFeedbackDateCustom((int) $a_set["fb_date_custom"]);
704 $this->setFeedbackCron((bool) $a_set["fb_cron"]);
705 $this->setTeamTutor((bool) $a_set["team_tutor"]);
706 $this->setMaxFile((int) $a_set["max_file"]);
707 $this->setPortfolioTemplateId((int) $a_set["portfolio_template"]);
708 $this->setMinCharLimit((int) $a_set["min_char_limit"]);
709 $this->setMaxCharLimit((int) $a_set["max_char_limit"]);
710 $this->setDeadlineMode((int) $a_set["deadline_mode"]);
711 $this->setRelativeDeadline((int) $a_set["relative_deadline"]);
712 $this->setRelDeadlineLastSubmission((int) $a_set["rel_deadline_last_subm"]);
713 }
setTeamTutor(bool $a_value)
setPeerReviewSimpleUnlock(int $a_value)
setRelativeDeadline(int $a_val)
setPeerReviewMin(int $a_value)
setDeadline(?int $a_val)
setExtendedDeadline(?int $a_val)
setPeerReviewText(bool $a_val)
setPeerReviewCriteriaCatalogue(?int $a_value)
setPeerReview(bool $a_value)
setStartTime(?int $a_val)
setDeadlineMode(int $a_val)
Set deadline mode.
setFeedbackCron(bool $a_value)
Toggle (global) feedback file cron.
setPeerReviewValid(int $a_value)
Set peer review validation.
setPeerReviewPersonalized(bool $a_val)
setInstruction(string $a_val)
setPortfolioTemplateId(int $a_val)
setTitle(string $a_val)
setRelDeadlineLastSubmission(int $a_val)
setPeerReviewChars(?int $a_value)
setPeerReviewRating(bool $a_val)
setPeerReviewDeadline(int $a_val)
setFeedbackDateCustom(int $a_value)
Set (global) feedback file availability using a custom date.
setMaxFile(?int $a_value)
setMandatory(bool $a_val)
setPeerReviewFileUpload(bool $a_val)

◆ insertFileOrderNr()

static ilExAssignment::insertFileOrderNr ( int  $a_ass_id,
string  $a_filename,
int  $a_order_nr 
)
static

Definition at line 1738 of file class.ilExAssignment.php.

1742 : void {
1743 global $DIC;
1744 $db = $DIC->database();
1745 $id = $db->nextId("exc_ass_file_order");
1746 $db->insert(
1747 "exc_ass_file_order",
1748 [
1749 "id" => ["integer", $id],
1750 "order_nr" => ["integer", $a_order_nr],
1751 "assignment_id" => ["integer", $a_ass_id],
1752 "filename" => ["text", $a_filename]
1753 ]
1754 );
1755 }
insert(string $table_name, array $values)
nextId(string $table_name)

◆ instructionFileDeleteOrder()

static ilExAssignment::instructionFileDeleteOrder ( int  $a_ass_id,
array  $a_file 
)
static
Parameters
list<string>$a_file

Definition at line 1794 of file class.ilExAssignment.php.

1797 : void {
1798 global $DIC;
1799
1800 $db = $DIC->database();
1801
1802 //now its done by filename. We need to figure how to get the order id in the confirmdelete method
1803 foreach ($a_file as $v) {
1804 $db->manipulate(
1805 "DELETE FROM exc_ass_file_order " .
1806 "WHERE filename = " . $db->quote($v, 'text') .
1807 " AND assignment_id = " . $db->quote($a_ass_id, 'integer')
1808 );
1809 }
1810 }

References ilDBInterface\manipulate(), and ilDBInterface\quote().

+ Here is the call graph for this function:

◆ instructionFileExistsInDb()

static ilExAssignment::instructionFileExistsInDb ( string  $a_filename,
int  $a_ass_id 
)
static

Definition at line 1837 of file class.ilExAssignment.php.

1840 : int {
1841 global $DIC;
1842
1843 $db = $DIC->database();
1844
1845 if ($a_ass_id) {
1846 $result = $db->query(
1847 "SELECT id FROM exc_ass_file_order" .
1848 " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1849 " AND filename = " . $db->quote($a_filename, 'text')
1850 );
1851
1852 return $db->numRows($result);
1853 }
1854
1855 return 0;
1856 }
numRows(ilDBStatement $statement)

References ilDBInterface\numRows(), ilDBInterface\query(), and ilDBInterface\quote().

+ Here is the call graph for this function:

◆ instructionFileGetFileOrderData()

static ilExAssignment::instructionFileGetFileOrderData ( array  $a_file_data,
int  $a_ass_id 
)
static
Parameters
array$a_file_data
int$a_ass_idassignment id
Returns
int[]

Definition at line 178 of file class.ilExAssignment.php.

181 : array {
182 global $DIC;
183
184 $db = $DIC->database();
185 $db->setLimit(1, 0);
186
187 $result_order_val = $db->query("
188 SELECT id, order_nr
189 FROM exc_ass_file_order
190 WHERE assignment_id = {$db->quote($a_ass_id, 'integer')}
191 AND filename = {$db->quote($a_file_data['entry'], 'text')}
192 ");
193
194 $order_val = 0;
195 $order_id = 0;
196 while ($row = $db->fetchAssoc($result_order_val)) {
197 $order_val = (int) $row['order_nr'];
198 $order_id = (int) $row['id'];
199 }
200 return array($order_val, $order_id);
201 }
setLimit(int $limit, int $offset=0)

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ instructionFileInsertOrder()

static ilExAssignment::instructionFileInsertOrder ( string  $a_filename,
int  $a_ass_id,
int  $a_order_nr = 0 
)
static

Definition at line 1758 of file class.ilExAssignment.php.

1762 : void {
1763 global $DIC;
1764
1765 $db = $DIC->database();
1766
1767 if ($a_ass_id) {
1768 //first of all check the suffix and change if necessary
1770
1771 if (self::instructionFileExistsInDb($filename, $a_ass_id) == 0) {
1772 if ($a_order_nr == 0) {
1773 $order_val = self::instructionFileOrderGetMax($a_ass_id);
1774 $order = $order_val + 10;
1775 } else {
1776 $order = $a_order_nr;
1777 }
1778
1779 $id = $db->nextID('exc_ass_file_order');
1780 $db->manipulate("INSERT INTO exc_ass_file_order " .
1781 "(id, assignment_id, filename, order_nr) VALUES (" .
1782 $db->quote($id, "integer") . "," .
1783 $db->quote($a_ass_id, "integer") . "," .
1784 $db->quote($filename, "text") . "," .
1785 $db->quote($order, "integer") .
1786 ")");
1787 }
1788 }
1789 }
$filename
Definition: buildRTE.php:78
static instructionFileOrderGetMax(int $a_ass_id)
static getSafeFilename(string $a_initial_filename)

References $filename, $id, ilFileUtils\getSafeFilename(), ilDBInterface\manipulate(), and ilDBInterface\quote().

+ Here is the call graph for this function:

◆ instructionFileOrderGetMax()

static ilExAssignment::instructionFileOrderGetMax ( int  $a_ass_id)
static

Definition at line 1911 of file class.ilExAssignment.php.

1911 : int
1912 {
1913 global $DIC;
1914
1915 $db = $DIC->database();
1916
1917 //get max order number
1918 $result = $db->queryF(
1919 "SELECT max(order_nr) as max_order FROM exc_ass_file_order WHERE assignment_id = %s",
1920 array('integer'),
1921 array($db->quote($a_ass_id, 'integer'))
1922 );
1923
1924 $order_val = 0;
1925 while ($row = $db->fetchAssoc($result)) {
1926 $order_val = (int) $row['max_order'];
1927 }
1928 return $order_val;
1929 }
queryF(string $query, array $types, array $values)

References $DIC, ilDBInterface\fetchAssoc(), ILIAS\Repository\int(), ilDBInterface\queryF(), and ilDBInterface\quote().

+ Here is the call graph for this function:

◆ isInExercise()

static ilExAssignment::isInExercise ( int  $a_ass_id,
int  $a_ex_id 
)
static

Definition at line 1198 of file class.ilExAssignment.php.

1198 : bool
1199 {
1200 global $DIC;
1201
1202 $ilDB = $DIC->database();
1203
1204 $set = $ilDB->query(
1205 "SELECT * FROM exc_assignment " .
1206 " WHERE exc_id = " . $ilDB->quote($a_ex_id, "integer") .
1207 " AND id = " . $ilDB->quote($a_ass_id, "integer")
1208 );
1209 if ($ilDB->fetchAssoc($set)) {
1210 return true;
1211 }
1212 return false;
1213 }

References $DIC, and $ilDB.

Referenced by ILIAS\Exercise\Assignment\Mandatory\RandomAssignmentsDBRepository\getAssignmentsOfUser(), and ILIAS\Exercise\Assignment\Mandatory\RandomAssignmentsDBRepository\saveAssignmentsOfUser().

+ Here is the caller graph for this function:

◆ isValidType()

ilExAssignment::isValidType ( int  $a_value)

Definition at line 419 of file class.ilExAssignment.php.

419 : bool
420 {
421 return $this->types->isValidId($a_value);
422 }

◆ lookup()

static ilExAssignment::lookup ( int  $a_id,
string  $a_field 
)
staticprivate

Definition at line 1097 of file class.ilExAssignment.php.

1097 : string
1098 {
1099 global $DIC;
1100
1101 $ilDB = $DIC->database();
1102
1103 $set = $ilDB->query(
1104 "SELECT " . $a_field . " FROM exc_assignment " .
1105 " WHERE id = " . $ilDB->quote($a_id, "integer")
1106 );
1107
1108 $rec = $ilDB->fetchAssoc($set);
1109
1110 return $rec[$a_field] ?? "";
1111 }

References $DIC, and $ilDB.

◆ lookupAssignmentOnline()

static ilExAssignment::lookupAssignmentOnline ( int  $a_ass_id)
static

Definition at line 1070 of file class.ilExAssignment.php.

1070 : bool
1071 {
1072 global $DIC;
1073
1074 $ilDB = $DIC->database();
1075
1076 $query = "SELECT id FROM exc_assignment " .
1077 "WHERE start_time <= " . $ilDB->quote(time(), 'integer') . ' ' .
1078 "AND time_stamp >= " . $ilDB->quote(time(), 'integer') . ' ' .
1079 "AND id = " . $ilDB->quote($a_ass_id, 'integer');
1080 $res = $ilDB->query($query);
1081
1082 return (bool) $res->numRows();
1083 }

References $DIC, $ilDB, and $res.

◆ lookupExerciseId()

static ilExAssignment::lookupExerciseId ( int  $a_ass_id)
static

Definition at line 1085 of file class.ilExAssignment.php.

1085 : int
1086 {
1087 global $DIC;
1088
1089 $ilDB = $DIC->database();
1090 $query = "SELECT exc_id FROM exc_assignment " .
1091 "WHERE id = " . $ilDB->quote($a_ass_id, 'integer');
1092 $res = $ilDB->fetchAssoc($ilDB->query($query));
1093
1094 return (int) ($res["exc_id"] ?? 0);
1095 }

References $DIC, $ilDB, and $res.

Referenced by ilObjExerciseGUI\__construct(), ilExerciseGSToolProvider\getAssignmentInfo(), and ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackFileManager\sendNotification().

+ Here is the caller graph for this function:

◆ lookupMaxOrderNrForEx()

static ilExAssignment::lookupMaxOrderNrForEx ( int  $a_exc_id)
static

Definition at line 1052 of file class.ilExAssignment.php.

1052 : int
1053 {
1054 // TODO IRSS: currently the ilResourceCollectionGUI does not support the order of files done by the component,
1055 // this should be implemented as well there and will follow.
1056 global $DIC;
1057
1058 $ilDB = $DIC->database();
1059
1060 $set = $ilDB->query(
1061 "SELECT MAX(order_nr) mnr FROM exc_assignment " .
1062 " WHERE exc_id = " . $ilDB->quote($a_exc_id, "integer")
1063 );
1064 if ($rec = $ilDB->fetchAssoc($set)) {
1065 return (int) $rec["mnr"];
1066 }
1067 return 0;
1068 }

References $DIC, and $ilDB.

◆ lookupTitle()

◆ lookupType()

static ilExAssignment::lookupType ( int  $a_id)
static

Definition at line 1118 of file class.ilExAssignment.php.

1118 : int
1119 {
1120 return (int) self::lookup($a_id, "type");
1121 }

Referenced by ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackFileManager\__construct(), ilParticipantsPerAssignmentTableGUI\__construct(), and ilExerciseMailNotification\send().

+ Here is the caller graph for this function:

◆ notStartedYet()

ilExAssignment::notStartedYet ( )

Definition at line 1604 of file class.ilExAssignment.php.

1604 : bool
1605 {
1606 return (time() - $this->start_time <= 0);
1607 }

◆ orderAssByDeadline()

static ilExAssignment::orderAssByDeadline ( int  $a_ex_id)
static

Definition at line 1145 of file class.ilExAssignment.php.

1145 : void
1146 {
1147 global $DIC;
1148 $ilDB = $DIC->database();
1149
1150 $set = $ilDB->query(
1151 "SELECT id FROM exc_assignment " .
1152 " WHERE exc_id = " . $ilDB->quote($a_ex_id, "integer") .
1153 " ORDER BY time_stamp"
1154 );
1155 $nr = 10;
1156 while ($rec = $ilDB->fetchAssoc($set)) {
1157 $ilDB->manipulate(
1158 "UPDATE exc_assignment SET " .
1159 " order_nr = " . $ilDB->quote($nr, "integer") .
1160 " WHERE id = " . $ilDB->quote($rec["id"], "integer")
1161 );
1162 $nr += 10;
1163 }
1164 }

References $DIC, and $ilDB.

Referenced by ilExAssignmentEditorGUI\orderAssignmentsByDeadlineObject().

+ Here is the caller graph for this function:

◆ read()

ilExAssignment::read ( )
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 657 of file class.ilExAssignment.php.

657 : void
658 {
660
661 $set = $ilDB->query(
662 "SELECT * FROM exc_assignment " .
663 " WHERE id = " . $ilDB->quote($this->getId(), "integer")
664 );
665 $rec = $ilDB->fetchAssoc($set);
666
667 // #16172 - might be deleted
668 if (is_array($rec)) {
669 $this->initFromDB($rec);
670 }
671 }
initFromDB(array $a_set)
Import DB record.

References $ilDB.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ renameInstructionFile()

static ilExAssignment::renameInstructionFile ( string  $a_old_name,
string  $a_new_name,
int  $a_ass_id 
)
static

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

1816 : void {
1817 global $DIC;
1818
1819 $db = $DIC->database();
1820
1821 if ($a_ass_id) {
1822 $db->manipulate(
1823 "DELETE FROM exc_ass_file_order" .
1824 " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1825 " AND filename = " . $db->quote($a_new_name, 'text')
1826 );
1827
1828 $db->manipulate(
1829 "UPDATE exc_ass_file_order SET" .
1830 " filename = " . $db->quote($a_new_name, 'text') .
1831 " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1832 " AND filename = " . $db->quote($a_old_name, 'text')
1833 );
1834 }
1835 }

References ilDBInterface\manipulate(), and ilDBInterface\quote().

+ Here is the call graph for this function:

◆ save()

ilExAssignment::save ( )
Exceptions
ilDateTimeException

Definition at line 718 of file class.ilExAssignment.php.

718 : void
719 {
721
722 if ($this->getOrderNr() == 0) {
723 $this->setOrderNr(
724 self::lookupMaxOrderNrForEx($this->getExerciseId())
725 + 10
726 );
727 }
728
729 $next_id = $ilDB->nextId("exc_assignment");
730 $ilDB->insert("exc_assignment", array(
731 "id" => array("integer", $next_id),
732 "exc_id" => array("integer", $this->getExerciseId()),
733 "time_stamp" => array("integer", $this->getDeadline()),
734 "deadline2" => array("integer", $this->getExtendedDeadline()),
735 "instruction" => array("clob", $this->getInstruction()),
736 "title" => array("text", $this->getTitle()),
737 "start_time" => array("integer", $this->getStartTime()),
738 "order_nr" => array("integer", $this->getOrderNr()),
739 "mandatory" => array("integer", $this->getMandatory()),
740 "type" => array("integer", $this->getType()),
741 "peer" => array("integer", $this->getPeerReview()),
742 "peer_min" => array("integer", $this->getPeerReviewMin()),
743 "peer_unlock" => array("integer", $this->getPeerReviewSimpleUnlock()),
744 "peer_dl" => array("integer", $this->getPeerReviewDeadline()),
745 "peer_valid" => array("integer", $this->getPeerReviewValid()),
746 "peer_file" => array("integer", $this->hasPeerReviewFileUpload()),
747 "peer_prsl" => array("integer", $this->hasPeerReviewPersonalized()),
748 "peer_char" => array("integer", $this->getPeerReviewChars()),
749 "peer_text" => array("integer", (int) $this->hasPeerReviewText()),
750 "peer_rating" => array("integer", (int) $this->hasPeerReviewRating()),
751 "peer_crit_cat" => array("integer", $this->getPeerReviewCriteriaCatalogue()),
752 "fb_file" => array("text", $this->getFeedbackFile()),
753 "fb_date" => array("integer", $this->getFeedbackDate()),
754 "fb_date_custom" => array("integer", $this->getFeedbackDateCustom()),
755 "fb_cron" => array("integer", $this->hasFeedbackCron()),
756 "team_tutor" => array("integer", $this->getTeamTutor()),
757 "max_file" => array("integer", $this->getMaxFile()),
758 "portfolio_template" => array("integer", $this->getPortfolioTemplateId()),
759 "min_char_limit" => array("integer", $this->getMinCharLimit()),
760 "max_char_limit" => array("integer", $this->getMaxCharLimit()),
761 "relative_deadline" => array("integer", $this->getRelativeDeadline()),
762 "rel_deadline_last_subm" => array("integer", $this->getRelDeadlineLastSubmission()),
763 "deadline_mode" => array("integer", $this->getDeadlineMode()),
764 "solution_rid" => array("text", ''),
765 ));
766 $this->setId($next_id);
767 $exc = new ilObjExercise($this->getExerciseId(), false);
768 $exc->updateAllUsersStatus();
769
770 $this->domain->assignment()->instructionFiles($next_id)->createCollection();
771
772 self::createNewAssignmentRecords($next_id, $exc);
774 $this->handleCalendarEntries("create", $exc);
775 }
getType()
Get type this will most probably become an non public function in the future (or become obsolete)
static createNewAssignmentRecords(int $a_ass_id, ilObjExercise $a_exc)
Class ilObjExercise.
static raiseContentChanged(int $obj_id)

References $ilDB, ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ilObjectSearch\raiseContentChanged().

+ Here is the call graph for this function:

◆ saveAssOrderOfExercise()

static ilExAssignment::saveAssOrderOfExercise ( int  $a_ex_id,
array  $a_order 
)
static

Definition at line 1124 of file class.ilExAssignment.php.

1124 : void
1125 {
1126 global $DIC;
1127
1128 $ilDB = $DIC->database();
1129
1130 asort($a_order);
1131 $nr = 10;
1132 foreach ($a_order as $k => $v) {
1133 // the check for exc_id is for security reasons. ass ids are unique.
1134 $ilDB->manipulate(
1135 "UPDATE exc_assignment SET " .
1136 " order_nr = " . $ilDB->quote($nr, "integer") .
1137 " WHERE id = " . $ilDB->quote((int) $k, "integer") .
1138 " AND exc_id = " . $ilDB->quote($a_ex_id, "integer")
1139 );
1140 $nr += 10;
1141 }
1142 }

References $DIC, and $ilDB.

Referenced by ilExAssignmentEditorGUI\saveAssignmentOrderObject().

+ Here is the caller graph for this function:

◆ saveInstructionFilesOrderOfAssignment()

static ilExAssignment::saveInstructionFilesOrderOfAssignment ( int  $a_ass_id,
array  $a_order 
)
static

Definition at line 1715 of file class.ilExAssignment.php.

1718 : void {
1719 global $DIC;
1720
1721 $db = $DIC->database();
1722
1723 asort($a_order, SORT_NUMERIC);
1724
1725 $nr = 10;
1726 foreach (array_keys($a_order) as $k) {
1727 // the check for exc_id is for security reasons. ass ids are unique.
1728 $db->manipulate(
1729 "UPDATE exc_ass_file_order SET " .
1730 " order_nr = " . $db->quote($nr, "integer") .
1731 " WHERE id = " . $db->quote((int) $k, "integer") .
1732 " AND assignment_id = " . $db->quote($a_ass_id, "integer")
1733 );
1734 $nr += 10;
1735 }
1736 }

◆ sendFeedbackNotifications()

static ilExAssignment::sendFeedbackNotifications ( int  $a_ass_id,
?int  $a_user_id = null 
)
static
Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 1472 of file class.ilExAssignment.php.

1475 : bool {
1476 global $DIC;
1477
1478 $ilDB = $DIC->database();
1479 $gui = $DIC->exercise()->internal()->gui();
1480 $domain = $DIC->exercise()->internal()->domain();
1482
1483 $ass = new self($a_ass_id);
1484
1485 // valid assignment?
1486 if (!$ass->hasFeedbackCron() || !$ass->getFeedbackFile()) {
1487 $log->debug("return(1)");
1488 return false;
1489 }
1490
1491 if (!$a_user_id) {
1492 // already done?
1493 $set = $ilDB->query("SELECT fb_cron_done" .
1494 " FROM exc_assignment" .
1495 " WHERE id = " . $ilDB->quote($a_ass_id, "integer"));
1496 $row = $ilDB->fetchAssoc($set);
1497 if ($row["fb_cron_done"]) {
1498 $log->debug("return(2)");
1499 return false;
1500 }
1501 }
1502
1503 $ntf = new ilSystemNotification();
1504 $ntf->setLangModules(array("exc"));
1505 $ntf->setObjId($ass->getExerciseId());
1506 $ntf->setSubjectLangId("exc_feedback_notification_subject");
1507 $ntf->setIntroductionLangId("exc_feedback_notification_body");
1508 $ntf->addAdditionalInfo("exc_assignment", $ass->getTitle());
1509 $ref_id = 0;
1510 if ($a_user_id) { // link to assignment
1511 $ref_id = $domain->permission()->getFirstRefIdWithPermission(
1512 "read",
1513 $ass->getExerciseId(),
1514 $a_user_id
1515 );
1516 } else {
1517 $ref_ids = ilObject::_getAllReferences($ass->getExerciseId());
1518 if (count($ref_ids) === 1) {
1519 $ref_id = current($ref_ids);
1520 }
1521 }
1522 if ($ref_id > 0) {
1523 $perm_link = $gui->permanentLink()->getPermanentLink($ref_id, $ass->getId());
1524 $ntf->addAdditionalInfo("exc_link_to_assignment", $perm_link);
1525 }
1526
1527 $ntf->setGotoLangId("exc_feedback_notification_link");
1528 $ntf->setReasonLangId("exc_feedback_notification_reason");
1529
1530 if (!$a_user_id) {
1531 $log->debug("send to members, cnt: " . count(ilExerciseMembers::_getMembers($ass->getExerciseId())));
1532 $ntf->sendMailAndReturnRecipients(ilExerciseMembers::_getMembers($ass->getExerciseId()));
1533
1534 $ilDB->manipulate("UPDATE exc_assignment" .
1535 " SET fb_cron_done = " . $ilDB->quote(1, "integer") .
1536 " WHERE id = " . $ilDB->quote($a_ass_id, "integer"));
1537 } else {
1538 $log->debug("send to user: " . $a_user_id);
1539 $ntf->sendMailAndReturnRecipients(array($a_user_id));
1540 }
1541
1542 return true;
1543 }
static count(int $a_ex_id)
ILIAS Exercise InternalDomainService $domain
ILIAS Exercise InternalGUIService $gui
static _getMembers(int $a_obj_id)
static _getAllReferences(int $id)
get all reference ids for object ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:66

Referenced by ilExAssignmentMemberStatus\postUpdateReturned(), and ilExcCronFeedbackNotification\run().

+ Here is the caller graph for this function:

◆ setDeadline()

ilExAssignment::setDeadline ( ?int  $a_val)

Definition at line 238 of file class.ilExAssignment.php.

238 : void
239 {
240 $this->deadline = $a_val;
241 }

◆ setDeadlineMode()

ilExAssignment::setDeadlineMode ( int  $a_val)

Set deadline mode.

Parameters
int$a_valdeadline mode (self::DEADLINE_ABSOLUTE | self::DEADLINE_ABSOLUTE_INDIVIDUAL | self::DEADLINE_RELATIVE)

Definition at line 252 of file class.ilExAssignment.php.

252 : void
253 {
254 $this->deadline_mode = $a_val;
255 }

◆ setExerciseId()

ilExAssignment::setExerciseId ( int  $a_val)

Definition at line 218 of file class.ilExAssignment.php.

218 : void
219 {
220 $this->exc_id = $a_val;
221 }

◆ setExtendedDeadline()

ilExAssignment::setExtendedDeadline ( ?int  $a_val)

Definition at line 321 of file class.ilExAssignment.php.

321 : void
322 {
323 $this->deadline2 = $a_val;
324 }

◆ setFeedbackCron()

ilExAssignment::setFeedbackCron ( bool  $a_value)

Toggle (global) feedback file cron.

Definition at line 586 of file class.ilExAssignment.php.

586 : void
587 {
588 $this->feedback_cron = $a_value;
589 }

◆ setFeedbackDate()

ilExAssignment::setFeedbackDate ( int  $a_value)

Definition at line 597 of file class.ilExAssignment.php.

597 : void
598 {
599 $this->feedback_date = $a_value;
600 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setFeedbackDateCustom()

ilExAssignment::setFeedbackDateCustom ( int  $a_value)

Set (global) feedback file availability using a custom date.

Parameters
int$a_valuetimestamp

Definition at line 611 of file class.ilExAssignment.php.

611 : void
612 {
613 $this->feedback_date_custom = $a_value;
614 }

◆ setFeedbackFile()

ilExAssignment::setFeedbackFile ( ?string  $a_value)

Definition at line 573 of file class.ilExAssignment.php.

573 : void
574 {
575 $this->feedback_file = $a_value;
576 }

◆ setId()

ilExAssignment::setId ( int  $a_val)

Definition at line 208 of file class.ilExAssignment.php.

208 : void
209 {
210 $this->id = $a_val;
211 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setIndividualDeadline()

ilExAssignment::setIndividualDeadline ( string  $id,
ilDateTime  $date 
)

Definition at line 1642 of file class.ilExAssignment.php.

1645 : void {
1646 $is_team = false;
1647 if (!is_numeric($id)) {
1648 $id = substr($id, 1);
1649 $is_team = true;
1650 }
1651
1652 $idl = ilExcIndividualDeadline::getInstance($this->getId(), (int) $id, $is_team);
1653 $idl->setIndividualDeadline($date->get(IL_CAL_UNIX));
1654 $idl->save();
1655 }
get(int $a_format, string $a_format_str='', string $a_tz='')
get formatted date
static getInstance(int $a_ass_id, int $a_participant_id, bool $a_is_team=false)

References $id.

◆ setInstruction()

ilExAssignment::setInstruction ( string  $a_val)

Definition at line 331 of file class.ilExAssignment.php.

331 : void
332 {
333 $this->instruction = $a_val;
334 }

◆ setMandatory()

ilExAssignment::setMandatory ( bool  $a_val)

Definition at line 366 of file class.ilExAssignment.php.

366 : void
367 {
368 $this->mandatory = $a_val;
369 }

Referenced by ilExAssignmentEditorGUI\importFormToAssignment().

+ Here is the caller graph for this function:

◆ setMaxCharLimit()

ilExAssignment::setMaxCharLimit ( int  $a_val)

Definition at line 1944 of file class.ilExAssignment.php.

1944 : void
1945 {
1946 $this->max_char_limit = $a_val;
1947 }

Referenced by ilExAssTypeTextGUI\importFormToAssignment().

+ Here is the caller graph for this function:

◆ setMaxFile()

ilExAssignment::setMaxFile ( ?int  $a_value)

Definition at line 633 of file class.ilExAssignment.php.

633 : void
634 {
635 $this->max_file = $a_value;
636 }

◆ setMinCharLimit()

ilExAssignment::setMinCharLimit ( int  $a_val)

Definition at line 1933 of file class.ilExAssignment.php.

1933 : void
1934 {
1935 $this->min_char_limit = $a_val;
1936 }

Referenced by ilExAssTypeTextGUI\importFormToAssignment().

+ Here is the caller graph for this function:

◆ setOrderNr()

ilExAssignment::setOrderNr ( int  $a_val)

Definition at line 376 of file class.ilExAssignment.php.

376 : void
377 {
378 $this->order_nr = $a_val;
379 }

◆ setPeerReview()

ilExAssignment::setPeerReview ( bool  $a_value)

Definition at line 424 of file class.ilExAssignment.php.

424 : void
425 {
426 $this->peer = $a_value;
427 }

◆ setPeerReviewChars()

ilExAssignment::setPeerReviewChars ( ?int  $a_value)

Definition at line 522 of file class.ilExAssignment.php.

522 : void
523 {
524 $a_value = (is_numeric($a_value) && (int) $a_value > 0)
525 ? (int) $a_value
526 : null;
527 $this->peer_char = $a_value;
528 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ setPeerReviewCriteriaCatalogue()

ilExAssignment::setPeerReviewCriteriaCatalogue ( ?int  $a_value)

Definition at line 535 of file class.ilExAssignment.php.

535 : void
536 {
537 $this->crit_cat = $a_value;
538 }

◆ setPeerReviewDeadline()

ilExAssignment::setPeerReviewDeadline ( int  $a_val)
Parameters
intdeadline (timestamp)

Definition at line 457 of file class.ilExAssignment.php.

457 : void
458 {
459 $this->peer_dl = $a_val;
460 }

◆ setPeerReviewFileUpload()

ilExAssignment::setPeerReviewFileUpload ( bool  $a_val)

Definition at line 502 of file class.ilExAssignment.php.

502 : void
503 {
504 $this->peer_file = $a_val;
505 }

◆ setPeerReviewMin()

ilExAssignment::setPeerReviewMin ( int  $a_value)

Definition at line 434 of file class.ilExAssignment.php.

434 : void
435 {
436 $this->peer_min = $a_value;
437 }

◆ setPeerReviewPersonalized()

ilExAssignment::setPeerReviewPersonalized ( bool  $a_val)

Definition at line 512 of file class.ilExAssignment.php.

512 : void
513 {
514 $this->peer_personal = $a_val;
515 }

◆ setPeerReviewRating()

ilExAssignment::setPeerReviewRating ( bool  $a_val)

Definition at line 482 of file class.ilExAssignment.php.

482 : void
483 {
484 $this->peer_rating = $a_val;
485 }

◆ setPeerReviewSimpleUnlock()

ilExAssignment::setPeerReviewSimpleUnlock ( int  $a_value)

Definition at line 444 of file class.ilExAssignment.php.

444 : void
445 {
446 $this->peer_unlock = $a_value;
447 }

◆ setPeerReviewText()

ilExAssignment::setPeerReviewText ( bool  $a_val)

Definition at line 492 of file class.ilExAssignment.php.

492 : void
493 {
494 $this->peer_text = $a_val;
495 }

◆ setPeerReviewValid()

ilExAssignment::setPeerReviewValid ( int  $a_value)

Set peer review validation.

Parameters
int$a_value(self::PEER_REVIEW_VALID_NONE, self::PEER_REVIEW_VALID_ONE, self::PEER_REVIEW_VALID_ALL)

Definition at line 472 of file class.ilExAssignment.php.

472 : void
473 {
474 $this->peer_valid = $a_value;
475 }

◆ setPortfolioTemplateId()

ilExAssignment::setPortfolioTemplateId ( int  $a_val)

Definition at line 644 of file class.ilExAssignment.php.

644 : void
645 {
646 $this->portfolio_template = $a_val;
647 }

Referenced by ilExAssTypePortfolioGUI\importFormToAssignment().

+ Here is the caller graph for this function:

◆ setRelativeDeadline()

ilExAssignment::setRelativeDeadline ( int  $a_val)

Definition at line 262 of file class.ilExAssignment.php.

262 : void
263 {
264 $this->relative_deadline = $a_val;
265 }

◆ setRelDeadlineLastSubmission()

ilExAssignment::setRelDeadlineLastSubmission ( int  $a_val)

Definition at line 272 of file class.ilExAssignment.php.

272 : void
273 {
274 $this->rel_deadline_last_subm = $a_val;
275 }

◆ setStartTime()

ilExAssignment::setStartTime ( ?int  $a_val)

Definition at line 228 of file class.ilExAssignment.php.

228 : void
229 {
230 $this->start_time = $a_val;
231 }

◆ setTeamTutor()

ilExAssignment::setTeamTutor ( bool  $a_value)

Definition at line 622 of file class.ilExAssignment.php.

622 : void
623 {
624 $this->team_tutor = $a_value;
625 }

◆ setTitle()

ilExAssignment::setTitle ( string  $a_val)

Definition at line 356 of file class.ilExAssignment.php.

356 : void
357 {
358 $this->title = $a_val;
359 }

◆ setType()

ilExAssignment::setType ( int  $a_value)

Set type this will most probably become an non public function in the future (or become obsolete)

Exceptions
ilExcUnknownAssignmentTypeException

Definition at line 391 of file class.ilExAssignment.php.

391 : void
392 {
393 if ($this->isValidType($a_value)) {
394 $this->type = $a_value;
395
396 $this->ass_type = $this->types->getById($a_value);
397
398 if ($this->ass_type->usesTeams()) {
399 $this->setPeerReview(false);
400 }
401 }
402 }
isValidType(int $a_value)

Referenced by __construct().

+ Here is the caller graph for this function:

◆ update()

ilExAssignment::update ( )
Exceptions
ilDateTimeException

Definition at line 780 of file class.ilExAssignment.php.

780 : void
781 {
783
784 $ilDB->update(
785 "exc_assignment",
786 array(
787 "exc_id" => array("integer", $this->getExerciseId()),
788 "time_stamp" => array("integer", $this->getDeadline()),
789 "deadline2" => array("integer", $this->getExtendedDeadline()),
790 "instruction" => array("clob", $this->getInstruction()),
791 "title" => array("text", $this->getTitle()),
792 "start_time" => array("integer", $this->getStartTime()),
793 "order_nr" => array("integer", $this->getOrderNr()),
794 "mandatory" => array("integer", $this->getMandatory()),
795 "type" => array("integer", $this->getType()),
796 "peer" => array("integer", $this->getPeerReview()),
797 "peer_min" => array("integer", $this->getPeerReviewMin()),
798 "peer_unlock" => array("integer", $this->getPeerReviewSimpleUnlock()),
799 "peer_dl" => array("integer", $this->getPeerReviewDeadline()),
800 "peer_valid" => array("integer", $this->getPeerReviewValid()),
801 "peer_file" => array("integer", $this->hasPeerReviewFileUpload()),
802 "peer_prsl" => array("integer", $this->hasPeerReviewPersonalized()),
803 "peer_char" => array("integer", $this->getPeerReviewChars()),
804 "peer_text" => array("integer", (int) $this->hasPeerReviewText()),
805 "peer_rating" => array("integer", (int) $this->hasPeerReviewRating()),
806 "peer_crit_cat" => array("integer", $this->getPeerReviewCriteriaCatalogue()),
807 "fb_file" => array("text", $this->getFeedbackFile()),
808 "fb_date" => array("integer", $this->getFeedbackDate()),
809 "fb_date_custom" => array("integer", $this->getFeedbackDateCustom()),
810 "fb_cron" => array("integer", $this->hasFeedbackCron()),
811 "team_tutor" => array("integer", $this->getTeamTutor()),
812 "max_file" => array("integer", $this->getMaxFile()),
813 "portfolio_template" => array("integer", $this->getPortfolioTemplateId()),
814 "min_char_limit" => array("integer", $this->getMinCharLimit()),
815 "max_char_limit" => array("integer", $this->getMaxCharLimit()),
816 "deadline_mode" => array("integer", $this->getDeadlineMode()),
817 "relative_deadline" => array("integer", $this->getRelativeDeadline()),
818 "rel_deadline_last_subm" => array("integer", $this->getRelDeadlineLastSubmission())
819 ),
820 array(
821 "id" => array("integer", $this->getId()),
822 )
823 );
824 $exc = new ilObjExercise($this->getExerciseId(), false);
825 $exc->updateAllUsersStatus();
827 $this->handleCalendarEntries("update", $exc);
828 }

References $ilDB, ILIAS\Survey\Mode\getId(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ilObjectSearch\raiseContentChanged().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilExAssignment::$access
protected

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

◆ $app_event_handler

ilAppEventHandler ilExAssignment::$app_event_handler
protected

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

◆ $ass_type

ilExAssignmentTypeInterface ilExAssignment::$ass_type
protected

Definition at line 103 of file class.ilExAssignment.php.

◆ $crit_cat

int ilExAssignment::$crit_cat = 0
protected

Definition at line 109 of file class.ilExAssignment.php.

◆ $db

ilDBInterface ilExAssignment::$db
protected

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

◆ $deadline

int ilExAssignment::$deadline = null
protected

Definition at line 76 of file class.ilExAssignment.php.

◆ $deadline2

int ilExAssignment::$deadline2 = null
protected

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

◆ $deadline_mode

int ilExAssignment::$deadline_mode = 0
protected

Definition at line 104 of file class.ilExAssignment.php.

◆ $domain

ILIAS Exercise InternalDomainService ilExAssignment::$domain
protected

Definition at line 63 of file class.ilExAssignment.php.

◆ $exc_id

int ilExAssignment::$exc_id = 0
protected

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

◆ $feedback_cron

bool ilExAssignment::$feedback_cron = false
protected

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

◆ $feedback_date

int ilExAssignment::$feedback_date = 0
protected

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

◆ $feedback_date_custom

int ilExAssignment::$feedback_date_custom = 0
protected

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

◆ $feedback_file

string ilExAssignment::$feedback_file = null
protected

Definition at line 93 of file class.ilExAssignment.php.

◆ $gui

ILIAS Exercise InternalGUIService ilExAssignment::$gui
protected

Definition at line 62 of file class.ilExAssignment.php.

◆ $id

int ilExAssignment::$id = 0
protected

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

◆ $instruction

string ilExAssignment::$instruction = ""
protected

Definition at line 78 of file class.ilExAssignment.php.

◆ $lng

ilLanguage ilExAssignment::$lng
protected

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

◆ $log

ilLogger ilExAssignment::$log
protected

Definition at line 108 of file class.ilExAssignment.php.

◆ $mandatory

bool ilExAssignment::$mandatory = false
protected

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

◆ $max_char_limit

int ilExAssignment::$max_char_limit = 0
protected

Definition at line 101 of file class.ilExAssignment.php.

◆ $max_file

int ilExAssignment::$max_file = null
protected

Definition at line 98 of file class.ilExAssignment.php.

◆ $member_status

array ilExAssignment::$member_status = []
protected

Definition at line 107 of file class.ilExAssignment.php.

◆ $min_char_limit

int ilExAssignment::$min_char_limit = 0
protected

Definition at line 100 of file class.ilExAssignment.php.

◆ $order_nr

int ilExAssignment::$order_nr = 0
protected

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

◆ $peer

bool ilExAssignment::$peer = false
protected

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

◆ $peer_char

int ilExAssignment::$peer_char = null
protected

Definition at line 89 of file class.ilExAssignment.php.

◆ $peer_crit_cat

int ilExAssignment::$peer_crit_cat = 0
protected

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

◆ $peer_dl

int ilExAssignment::$peer_dl = 0
protected

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

◆ $peer_file

bool ilExAssignment::$peer_file = false
protected

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

◆ $peer_min

int ilExAssignment::$peer_min = 0
protected

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

◆ $peer_personal

bool ilExAssignment::$peer_personal = false
protected

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

◆ $peer_rating

bool ilExAssignment::$peer_rating = false
protected

Definition at line 91 of file class.ilExAssignment.php.

◆ $peer_text

bool ilExAssignment::$peer_text = false
protected

Definition at line 90 of file class.ilExAssignment.php.

◆ $peer_unlock

int ilExAssignment::$peer_unlock = 0
protected

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

◆ $peer_valid

int ilExAssignment::$peer_valid
protected

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

◆ $portfolio_template

int ilExAssignment::$portfolio_template = 0
protected

Definition at line 99 of file class.ilExAssignment.php.

◆ $rel_deadline_last_subm

int ilExAssignment::$rel_deadline_last_subm = 0
protected

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

◆ $relative_deadline

int ilExAssignment::$relative_deadline = 0
protected

Definition at line 105 of file class.ilExAssignment.php.

◆ $start_time

int ilExAssignment::$start_time = null
protected

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

◆ $string_transform

ILIAS Refinery String Group ilExAssignment::$string_transform
protected

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

◆ $team_tutor

bool ilExAssignment::$team_tutor = false
protected

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

◆ $title

string ilExAssignment::$title = ""
protected

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

◆ $type

int ilExAssignment::$type = 0
protected

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

◆ $types

ilExAssignmentTypes ilExAssignment::$types
protected

Definition at line 102 of file class.ilExAssignment.php.

◆ $user

ilObjUser ilExAssignment::$user
protected

Definition at line 68 of file class.ilExAssignment.php.

◆ DEADLINE_ABSOLUTE

◆ DEADLINE_ABSOLUTE_INDIVIDUAL

◆ DEADLINE_RELATIVE

◆ FEEDBACK_DATE_CUSTOM

◆ FEEDBACK_DATE_DEADLINE

◆ FEEDBACK_DATE_SUBMISSION

const ilExAssignment::FEEDBACK_DATE_SUBMISSION = 2

◆ PEER_REVIEW_VALID_ALL

const ilExAssignment::PEER_REVIEW_VALID_ALL = 3

◆ PEER_REVIEW_VALID_NONE

const ilExAssignment::PEER_REVIEW_VALID_NONE = 1

◆ PEER_REVIEW_VALID_ONE

const ilExAssignment::PEER_REVIEW_VALID_ONE = 2

◆ TEAMS_FORMED_BY_ASSIGNMENT

const ilExAssignment::TEAMS_FORMED_BY_ASSIGNMENT = 3

◆ TEAMS_FORMED_BY_PARTICIPANTS

const ilExAssignment::TEAMS_FORMED_BY_PARTICIPANTS = 0

Definition at line 54 of file class.ilExAssignment.php.

◆ TEAMS_FORMED_BY_RANDOM

const ilExAssignment::TEAMS_FORMED_BY_RANDOM = 2

◆ TEAMS_FORMED_BY_TUTOR

const ilExAssignment::TEAMS_FORMED_BY_TUTOR = 1

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

Referenced by ilExAssignmentEditorGUI\processForm().

◆ TYPE_BLOG

◆ TYPE_PORTFOLIO

◆ TYPE_TEXT

◆ TYPE_UPLOAD

◆ TYPE_UPLOAD_TEAM

◆ TYPE_WIKI_TEAM


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