ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 1567 of file class.ilExAssignment.php.

1567 : bool
1568 {
1569 $date_custom = $this->getFeedbackDateCustom();
1570 //if the solution will be displayed only after reach all the deadlines.
1571 //$final_deadline = $this->afterDeadlineStrict();
1572 //$dl = max($final_deadline, time());
1573 //return ($date_custom - $dl <= 0);
1574 return ($date_custom - time() <= 0);
1575 }

◆ afterDeadline()

ilExAssignment::afterDeadline ( )

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

1529 : bool
1530 {
1531 $ilUser = $this->user;
1532
1533 // :TODO: always current user?
1534 $idl = $this->getPersonalDeadline($ilUser->getId()); // official deadline
1535
1536 // no deadline === true
1537 $deadline = max($this->deadline, $this->deadline2, $idl); // includes grace period
1538 return ($deadline - time() <= 0);
1539 }
getPersonalDeadline(int $a_user_id)

◆ afterDeadlineStrict()

ilExAssignment::afterDeadlineStrict ( bool  $a_include_personal = true)

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

1541 : bool
1542 {
1543 // :TODO: this means that peer feedback, global feedback is available
1544 // after LAST personal deadline
1545 // team management is currently ignoring personal deadlines
1546 $idl = $a_include_personal
1547 ? $this->getLastPersonalDeadline()
1548 : null;
1549
1550 // no deadline === false
1551 $deadline = max($this->deadline, $this->deadline2, $idl);
1552
1553 // #18271 - afterDeadline() does not handle last personal deadline
1554 // after effective deadline of all users
1555 if ($idl && $deadline == $idl) {
1556 return ($deadline - time() <= 0);
1557 }
1558
1559 // like: after effective deadline (for single user), except: no deadline false
1560 return ($deadline > 0 &&
1561 $this->afterDeadline());
1562 }

◆ beforeDeadline()

ilExAssignment::beforeDeadline ( )

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

1578 : bool
1579 {
1580 // no deadline === true
1581 return !$this->afterDeadlineStrict();
1582 }
afterDeadlineStrict(bool $a_include_personal=true)

◆ canParticipantReceiveFeedback()

ilExAssignment::canParticipantReceiveFeedback ( int  $part_id)

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

1964 : bool
1965 {
1966 if ($this->hasTeam()) {
1967 if (!ilExAssignmentTeam::getTeamId($this->getId(), $part_id)) {
1968 return false;
1969 }
1970 }
1971 return true;
1972 }
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 944 of file class.ilExAssignment.php.

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

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

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 1166 of file class.ilExAssignment.php.

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

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 832 of file class.ilExAssignment.php.

835 : void {
837
838 // delete submissions
839 $exc_members = new ilExerciseMembers($exc);
840 foreach ($exc_members->getMembers() as $mem) {
841 $submission = new ilExSubmission($this, $mem);
842 $submission->deleteAllFiles();
843 }
844
845 $ilDB->manipulateF(
846 "DELETE FROM exc_usr_tutor " .
847 "WHERE ass_id = %s",
848 array("integer"),
849 array($this->getId())
850 );
851
852 // remove peer review data
853 if ($this->getPeerReview()) {
854 $peer_review = new ilExPeerReview($this);
855 $peer_review->resetPeerReviews();
856 }
857
858 $ilDB->manipulate(
859 "DELETE FROM exc_ass_file_order" .
860 " WHERE assignment_id = " . $ilDB->quote($this->getId(), 'integer')
861 );
862
863 $ilDB->manipulate(
864 "DELETE FROM exc_mem_ass_status" .
865 " WHERE ass_id = " . $ilDB->quote($this->getId(), 'integer')
866 );
867
868 $ilDB->manipulate(
869 "DELETE FROM exc_assignment WHERE " .
870 " id = " . $ilDB->quote($this->getId(), "integer")
871 );
872
873 if ($update_user_status) {
874 $exc->updateAllUsersStatus();
875 }
876
877 $this->handleCalendarEntries("delete", $exc);
878
880
881 $reminder = new ilExAssignmentReminder();
882 $reminder->deleteReminders($this->getId());
883
884 // delete teams
885 $this->domain->team()->deleteTeamsOfAssignment($this->getId());
886
887 // delete resource collections and resources
888 $this->domain->assignment()->instructionFiles($this->getId())
889 ->deleteCollection();
890 }
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 1877 of file class.ilExAssignment.php.

1879 : array {
1881
1882 $order = $this->getInstructionFilesOrder();
1883 foreach ($a_entries as $k => $e) {
1884 $a_entries[$k]["order_val"] = $order[$e["file"]]["order_nr"] ?? 0;
1885 $a_entries[$k]["order_id"] = $order[$e["file"]]["id"] ?? "";
1886 }
1887
1888 return $a_entries;
1889 }

◆ fixInstructionFileOrdering()

ilExAssignment::fixInstructionFileOrdering ( )

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

1838 : void
1839 {
1840 $db = $this->db;
1841
1842 $files = array_map(function ($v) {
1843 return $v["name"];
1844 }, $this->getFiles());
1845
1846 $set = $db->query("SELECT * FROM exc_ass_file_order " .
1847 " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1848 " ORDER BY order_nr");
1849 $order_nr = 10;
1850 $numbered_files = array();
1851 while ($rec = $db->fetchAssoc($set)) {
1852 // file exists, set correct order nr
1853 if (in_array($rec["filename"], $files)) {
1854 $db->manipulate(
1855 "UPDATE exc_ass_file_order SET " .
1856 " order_nr = " . $db->quote($order_nr, "integer") .
1857 " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1858 " AND id = " . $db->quote($rec["id"], "integer")
1859 );
1860 $order_nr += 10;
1861 $numbered_files[] = $rec["filename"];
1862 } else { // file does not exist, delete entry
1863 $db->manipulate(
1864 "DELETE FROM exc_ass_file_order " .
1865 " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1866 " AND id = " . $db->quote($rec["id"], "integer")
1867 );
1868 }
1869 }
1870 foreach ($files as $f) {
1871 if (!in_array($f, $numbered_files)) {
1873 }
1874 }
1875 }
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 894 of file class.ilExAssignment.php.

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

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 1942 of file class.ilExAssignment.php.

1942 : array
1943 {
1944 $calculated_deadlines = array(
1945 "user" => array(),
1946 "team" => array()
1947 );
1948
1949 if ($this->getRelativeDeadline() && $this->getDeadlineMode() == self::DEADLINE_RELATIVE) {
1950 foreach (ilExcIndividualDeadline::getStartingTimestamps($this->getId()) as $ts) {
1951 $type = $ts["is_team"]
1952 ? "team"
1953 : "user";
1954
1955 $calculated_deadlines[$type][$ts["member_id"]] = array(
1956 "calculated_deadline" => $ts["starting_ts"] + ($this->getRelativeDeadline() * 24 * 60 * 60)
1957 );
1958 }
1959 }
1960 return $calculated_deadlines;
1961 }
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 1281 of file class.ilExAssignment.php.

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

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 1026 of file class.ilExAssignment.php.

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

References ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getId()

◆ getIndividualDeadlines()

ilExAssignment::getIndividualDeadlines ( )

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

1637 : array
1638 {
1639 $ilDB = $this->db;
1640
1641 $res = array();
1642
1643 $set = $ilDB->query("SELECT * FROM exc_idl" .
1644 " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer"));
1645 while ($row = $ilDB->fetchAssoc($set)) {
1646 if ($row["is_team"]) {
1647 $row["member_id"] = "t" . $row["member_id"];
1648 }
1649
1650 $res[$row["member_id"]] = $row["tstamp"];
1651 }
1652
1653 return $res;
1654 }
$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(), and ilObjExerciseGUI\showOverviewObject().

+ 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 1031 of file class.ilExAssignment.php.

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

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 1929 of file class.ilExAssignment.php.

1929 : int
1930 {
1931 return $this->max_char_limit;
1932 }

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 1214 of file class.ilExAssignment.php.

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

1606 {
1607 $ilUser = $this->user;
1608
1609 if (!$a_user_id) {
1610 $a_user_id = $ilUser->getId();
1611 }
1612 if (!array_key_exists($a_user_id, $this->member_status)) {
1613 $this->member_status[$a_user_id] = new ilExAssignmentMemberStatus($this->getId(), $a_user_id);
1614 }
1615 return $this->member_status[$a_user_id];
1616 }
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 1918 of file class.ilExAssignment.php.

1918 : int
1919 {
1920 return $this->min_char_limit;
1921 }

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($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 1656 of file class.ilExAssignment.php.

1656 : array
1657 {
1658 $ilDB = $this->db;
1659
1660 $res = array();
1661
1662 $set = $ilDB->query("SELECT * FROM exc_idl" .
1663 " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer") .
1664 " AND requested = " . $ilDB->quote(1, "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["requested"];
1671 }
1672
1673 return $res;
1674 }

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 1597 of file class.ilExAssignment.php.

1597 : bool
1598 {
1599 $rcid = $this->domain->assignment()->sampleSolution($ass_id)->importFromLegacyUpload($a_file);
1600 $this->setFeedbackFile($a_file["name"]);
1601 return ($rcid !== "");
1602 }
setFeedbackFile(?string $a_value)

References $ass_id.

◆ hasActiveIDl()

ilExAssignment::hasActiveIDl ( )

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

1676 : bool
1677 {
1678 return (bool) ($this->getDeadline() || $this->getDeadlineMode() === self::DEADLINE_ABSOLUTE_INDIVIDUAL);
1679 }

◆ 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 1681 of file class.ilExAssignment.php.

1681 : bool
1682 {
1683 if (!$this->ass_type->usesTeams() &&
1684 $this->getPeerReview()) {
1685 // all deadlines are read-only if we have peer feedback
1686 $peer_review = new ilExPeerReview($this);
1687 if ($peer_review->hasPeerReviewGroups()) {
1688 return true;
1689 }
1690 }
1691
1692 return false;
1693 }

◆ 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 1718 of file class.ilExAssignment.php.

1722 : void {
1723 global $DIC;
1724 $db = $DIC->database();
1725 $id = $db->nextId("exc_ass_file_order");
1726 $db->insert(
1727 "exc_ass_file_order",
1728 [
1729 "id" => ["integer", $id],
1730 "order_nr" => ["integer", $a_order_nr],
1731 "assignment_id" => ["integer", $a_ass_id],
1732 "filename" => ["text", $a_filename]
1733 ]
1734 );
1735 }
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 1774 of file class.ilExAssignment.php.

1777 : void {
1778 global $DIC;
1779
1780 $db = $DIC->database();
1781
1782 //now its done by filename. We need to figure how to get the order id in the confirmdelete method
1783 foreach ($a_file as $v) {
1784 $db->manipulate(
1785 "DELETE FROM exc_ass_file_order " .
1786 "WHERE filename = " . $db->quote($v, 'text') .
1787 " AND assignment_id = " . $db->quote($a_ass_id, 'integer')
1788 );
1789 }
1790 }

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 1817 of file class.ilExAssignment.php.

1820 : int {
1821 global $DIC;
1822
1823 $db = $DIC->database();
1824
1825 if ($a_ass_id) {
1826 $result = $db->query(
1827 "SELECT id FROM exc_ass_file_order" .
1828 " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1829 " AND filename = " . $db->quote($a_filename, 'text')
1830 );
1831
1832 return $db->numRows($result);
1833 }
1834
1835 return 0;
1836 }
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 1738 of file class.ilExAssignment.php.

1742 : void {
1743 global $DIC;
1744
1745 $db = $DIC->database();
1746
1747 if ($a_ass_id) {
1748 //first of all check the suffix and change if necessary
1750
1751 if (self::instructionFileExistsInDb($filename, $a_ass_id) == 0) {
1752 if ($a_order_nr == 0) {
1753 $order_val = self::instructionFileOrderGetMax($a_ass_id);
1754 $order = $order_val + 10;
1755 } else {
1756 $order = $a_order_nr;
1757 }
1758
1759 $id = $db->nextID('exc_ass_file_order');
1760 $db->manipulate("INSERT INTO exc_ass_file_order " .
1761 "(id, assignment_id, filename, order_nr) VALUES (" .
1762 $db->quote($id, "integer") . "," .
1763 $db->quote($a_ass_id, "integer") . "," .
1764 $db->quote($filename, "text") . "," .
1765 $db->quote($order, "integer") .
1766 ")");
1767 }
1768 }
1769 }
$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 1891 of file class.ilExAssignment.php.

1891 : int
1892 {
1893 global $DIC;
1894
1895 $db = $DIC->database();
1896
1897 //get max order number
1898 $result = $db->queryF(
1899 "SELECT max(order_nr) as max_order FROM exc_ass_file_order WHERE assignment_id = %s",
1900 array('integer'),
1901 array($db->quote($a_ass_id, 'integer'))
1902 );
1903
1904 $order_val = 0;
1905 while ($row = $db->fetchAssoc($result)) {
1906 $order_val = (int) $row['max_order'];
1907 }
1908 return $order_val;
1909 }
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 1197 of file class.ilExAssignment.php.

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

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 1096 of file class.ilExAssignment.php.

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

References $DIC, and $ilDB.

◆ lookupAssignmentOnline()

static ilExAssignment::lookupAssignmentOnline ( int  $a_ass_id)
static

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

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

References $DIC, $ilDB, and $res.

◆ lookupExerciseId()

static ilExAssignment::lookupExerciseId ( int  $a_ass_id)
static

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

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

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 1051 of file class.ilExAssignment.php.

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

References $DIC, and $ilDB.

◆ lookupTitle()

◆ lookupType()

static ilExAssignment::lookupType ( int  $a_id)
static

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

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

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 1584 of file class.ilExAssignment.php.

1584 : bool
1585 {
1586 return (time() - $this->start_time <= 0);
1587 }

◆ orderAssByDeadline()

static ilExAssignment::orderAssByDeadline ( int  $a_ex_id)
static

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

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

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 1792 of file class.ilExAssignment.php.

1796 : void {
1797 global $DIC;
1798
1799 $db = $DIC->database();
1800
1801 if ($a_ass_id) {
1802 $db->manipulate(
1803 "DELETE FROM exc_ass_file_order" .
1804 " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1805 " AND filename = " . $db->quote($a_new_name, 'text')
1806 );
1807
1808 $db->manipulate(
1809 "UPDATE exc_ass_file_order SET" .
1810 " filename = " . $db->quote($a_new_name, 'text') .
1811 " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1812 " AND filename = " . $db->quote($a_old_name, 'text')
1813 );
1814 }
1815 }

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 ));
765 $this->setId($next_id);
766 $exc = new ilObjExercise($this->getExerciseId(), false);
767 $exc->updateAllUsersStatus();
768
769 $this->domain->assignment()->instructionFiles($next_id)->createCollection();
770
771 self::createNewAssignmentRecords($next_id, $exc);
773 $this->handleCalendarEntries("create", $exc);
774 }
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 1123 of file class.ilExAssignment.php.

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

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 1695 of file class.ilExAssignment.php.

1698 : void {
1699 global $DIC;
1700
1701 $db = $DIC->database();
1702
1703 asort($a_order, SORT_NUMERIC);
1704
1705 $nr = 10;
1706 foreach (array_keys($a_order) as $k) {
1707 // the check for exc_id is for security reasons. ass ids are unique.
1708 $db->manipulate(
1709 "UPDATE exc_ass_file_order SET " .
1710 " order_nr = " . $db->quote($nr, "integer") .
1711 " WHERE id = " . $db->quote((int) $k, "integer") .
1712 " AND assignment_id = " . $db->quote($a_ass_id, "integer")
1713 );
1714 $nr += 10;
1715 }
1716 }

◆ 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();
1480
1481 $ass = new self($a_ass_id);
1482
1483 // valid assignment?
1484 if (!$ass->hasFeedbackCron() || !$ass->getFeedbackFile()) {
1485 $log->debug("return(1)");
1486 return false;
1487 }
1488
1489 if (!$a_user_id) {
1490 // already done?
1491 $set = $ilDB->query("SELECT fb_cron_done" .
1492 " FROM exc_assignment" .
1493 " WHERE id = " . $ilDB->quote($a_ass_id, "integer"));
1494 $row = $ilDB->fetchAssoc($set);
1495 if ($row["fb_cron_done"]) {
1496 $log->debug("return(2)");
1497 return false;
1498 }
1499 }
1500
1501 $ntf = new ilSystemNotification();
1502 $ntf->setLangModules(array("exc"));
1503 $ntf->setObjId($ass->getExerciseId());
1504 $ntf->setSubjectLangId("exc_feedback_notification_subject");
1505 $ntf->setIntroductionLangId("exc_feedback_notification_body");
1506 $ntf->addAdditionalInfo("exc_assignment", $ass->getTitle());
1507 $ntf->setGotoLangId("exc_feedback_notification_link");
1508 $ntf->setReasonLangId("exc_feedback_notification_reason");
1509
1510 if (!$a_user_id) {
1511 $log->debug("send to members, cnt: " . count(ilExerciseMembers::_getMembers($ass->getExerciseId())));
1512 $ntf->sendMailAndReturnRecipients(ilExerciseMembers::_getMembers($ass->getExerciseId()));
1513
1514 $ilDB->manipulate("UPDATE exc_assignment" .
1515 " SET fb_cron_done = " . $ilDB->quote(1, "integer") .
1516 " WHERE id = " . $ilDB->quote($a_ass_id, "integer"));
1517 } else {
1518 $log->debug("send to user: " . $a_user_id);
1519 $ntf->sendMailAndReturnRecipients(array($a_user_id));
1520 }
1521
1522 return true;
1523 }
static count(int $a_ex_id)
static _getMembers(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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 1622 of file class.ilExAssignment.php.

1625 : void {
1626 $is_team = false;
1627 if (!is_numeric($id)) {
1628 $id = substr($id, 1);
1629 $is_team = true;
1630 }
1631
1632 $idl = ilExcIndividualDeadline::getInstance($this->getId(), (int) $id, $is_team);
1633 $idl->setIndividualDeadline($date->get(IL_CAL_UNIX));
1634 $idl->save();
1635 }
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 1924 of file class.ilExAssignment.php.

1924 : void
1925 {
1926 $this->max_char_limit = $a_val;
1927 }

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 1913 of file class.ilExAssignment.php.

1913 : void
1914 {
1915 $this->min_char_limit = $a_val;
1916 }

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.

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 779 of file class.ilExAssignment.php.

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

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: