ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 getGlobalFeedbackFileStoragePath ()
 
 deleteGlobalFeedbackFile ()
 
 handleGlobalFeedbackFileUpload (int $ass_id, array $a_file)
 
 getGlobalFeedbackFilePath ()
 
 getMemberStatus (?int $a_user_id=null)
 
 recalculateLateSubmissions ()
 
 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 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 114 of file class.ilExAssignment.php.

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

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

References getFeedbackDateCustom().

Referenced by ilExAssignmentGUI\addSubmission().

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

◆ afterDeadline()

ilExAssignment::afterDeadline ( )

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

References $user, and getPersonalDeadline().

Referenced by afterDeadlineStrict().

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

◆ afterDeadlineStrict()

ilExAssignment::afterDeadlineStrict ( bool  $a_include_personal = true)

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

References afterDeadline(), and getLastPersonalDeadline().

Referenced by beforeDeadline(), ilObjWikiGUI\getAssignmentButtons(), and ilExerciseSubmissionTableGUI\parseColumns().

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

◆ beforeDeadline()

ilExAssignment::beforeDeadline ( )

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

References afterDeadlineStrict().

1577  : bool
1578  {
1579  // no deadline === true
1580  return !$this->afterDeadlineStrict();
1581  }
afterDeadlineStrict(bool $a_include_personal=true)
+ Here is the call graph for this function:

◆ canParticipantReceiveFeedback()

ilExAssignment::canParticipantReceiveFeedback ( int  $part_id)

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

References getId(), ilExAssignmentTeam\getTeamId(), and hasTeam().

Referenced by ilExerciseSubmissionTableGUI\parseColumns().

2036  : bool
2037  {
2038  if ($this->hasTeam()) {
2039  if (!ilExAssignmentTeam::getTeamId($this->getId(), $part_id)) {
2040  return false;
2041  }
2042  }
2043  return true;
2044  }
static getTeamId(int $a_assignment_id, int $a_user_id, bool $a_create_on_demand=false)
+ Here is the call graph for this function:
+ Here is the caller 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 943 of file class.ilExAssignment.php.

References Vendor\Package\$d, $DIC, ilExAssignmentTypeInterface\cloneSpecificProperties(), ilExAssignmentReminder\FEEDBACK_REMINDER, ilExAssignmentReminder\GRADE_REMINDER, ilExAssignmentReminder\setReminderStatus(), and ilExAssignmentReminder\SUBMIT_REMINDER.

Referenced by ilObjExercise\saveData().

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

◆ count()

static ilExAssignment::count ( int  $a_ex_id)
static

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

References $DIC, and $ilDB.

Referenced by ilObjExerciseGUI\listAssignmentsObject(), and sendFeedbackNotifications().

1181  : int
1182  {
1183  global $DIC;
1184 
1185  $ilDB = $DIC->database();
1186 
1187  $set = $ilDB->query(
1188  "SELECT count(*) cntm FROM exc_assignment " .
1189  " WHERE exc_id = " . $ilDB->quote($a_ex_id, "integer")
1190  );
1191  $rec = $ilDB->fetchAssoc($set);
1192  return $rec["cntm"];
1193  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ countMandatory()

static ilExAssignment::countMandatory ( int  $a_ex_id)
static

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

References $DIC, and $ilDB.

Referenced by ilObjExerciseGUI\listAssignmentsObject().

1165  : int
1166  {
1167  global $DIC;
1168 
1169  $ilDB = $DIC->database();
1170 
1171  $set = $ilDB->query(
1172  "SELECT count(*) cntm FROM exc_assignment " .
1173  " WHERE exc_id = " . $ilDB->quote($a_ex_id, "integer") .
1174  " AND mandatory = " . $ilDB->quote(1, "integer")
1175  );
1176  $rec = $ilDB->fetchAssoc($set);
1177  return (int) $rec["cntm"];
1178  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ createNewAssignmentRecords()

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

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

References $DIC, and $ilDB.

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

◆ createNewUserRecords()

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

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

References $DIC, and $ilDB.

Referenced by ilExerciseMembers\assignMember().

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

◆ delete()

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

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

References $db, $ilDB, ilExcIndividualDeadline\deleteForAssignment(), deleteGlobalFeedbackFile(), getId(), getPeerReview(), handleCalendarEntries(), and ilObjExercise\updateAllUsersStatus().

832  : void {
833  $ilDB = $this->db;
834 
835  // delete submissions
836  $exc_members = new ilExerciseMembers($exc);
837  foreach ($exc_members->getMembers() as $mem) {
838  $submission = new ilExSubmission($this, $mem);
839  $submission->deleteAllFiles();
840  }
841 
842  $ilDB->manipulateF(
843  "DELETE FROM exc_usr_tutor " .
844  "WHERE ass_id = %s",
845  array("integer"),
846  array($this->getId())
847  );
848 
849  $this->deleteGlobalFeedbackFile();
850 
851  // remove peer review data
852  if ($this->getPeerReview()) {
853  $peer_review = new ilExPeerReview($this);
854  $peer_review->resetPeerReviews();
855  }
856 
857  $ilDB->manipulate(
858  "DELETE FROM exc_ass_file_order" .
859  " WHERE assignment_id = " . $ilDB->quote($this->getId(), 'integer')
860  );
861 
862  $ilDB->manipulate(
863  "DELETE FROM exc_mem_ass_status" .
864  " WHERE ass_id = " . $ilDB->quote($this->getId(), 'integer')
865  );
866 
867  $ilDB->manipulate(
868  "DELETE FROM exc_assignment WHERE " .
869  " id = " . $ilDB->quote($this->getId(), "integer")
870  );
871 
872  if ($update_user_status) {
873  $exc->updateAllUsersStatus();
874  }
875 
876  $this->handleCalendarEntries("delete", $exc);
877 
879 
880  $reminder = new ilExAssignmentReminder();
881  $reminder->deleteReminders($this->getId());
882 
883  // delete teams
884  $this->domain->team()->deleteTeamsOfAssignment($this->getId());
885 
886  // delete resource collections and resources
887  $this->domain->assignment()->instructionFiles($this->getId())
888  ->deleteCollection();
889  }
Class ilExerciseMembers.
updateAllUsersStatus()
Update status of all users.
Exercise peer review.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
handleCalendarEntries(string $a_event, ilObjExercise $exc)
Handle calendar entries for deadline(s)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ deleteGlobalFeedbackFile()

ilExAssignment::deleteGlobalFeedbackFile ( )

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

References ilFileUtils\delDir(), and getGlobalFeedbackFileStoragePath().

Referenced by delete(), and ilExAssignmentEditorGUI\importFormToAssignment().

1599  : void
1600  {
1602  }
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileAddOrder()

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

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

References Vendor\Package\$e, fixInstructionFileOrdering(), and getInstructionFilesOrder().

1951  : array {
1952  $this->fixInstructionFileOrdering();
1953 
1954  $order = $this->getInstructionFilesOrder();
1955  foreach ($a_entries as $k => $e) {
1956  $a_entries[$k]["order_val"] = $order[$e["file"]]["order_nr"] ?? 0;
1957  $a_entries[$k]["order_id"] = $order[$e["file"]]["id"] ?? "";
1958  }
1959 
1960  return $a_entries;
1961  }
+ Here is the call graph for this function:

◆ fixInstructionFileOrdering()

ilExAssignment::fixInstructionFileOrdering ( )

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

References $db, Vendor\Package\$f, ilDBInterface\fetchAssoc(), getFiles(), getId(), ilDBInterface\manipulate(), ilDBInterface\query(), and ilDBInterface\quote().

Referenced by fileAddOrder().

1910  : void
1911  {
1912  $db = $this->db;
1913 
1914  $files = array_map(function ($v) {
1915  return $v["name"];
1916  }, $this->getFiles());
1917 
1918  $set = $db->query("SELECT * FROM exc_ass_file_order " .
1919  " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1920  " ORDER BY order_nr");
1921  $order_nr = 10;
1922  $numbered_files = array();
1923  while ($rec = $db->fetchAssoc($set)) {
1924  // file exists, set correct order nr
1925  if (in_array($rec["filename"], $files)) {
1926  $db->manipulate(
1927  "UPDATE exc_ass_file_order SET " .
1928  " order_nr = " . $db->quote($order_nr, "integer") .
1929  " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1930  " AND id = " . $db->quote($rec["id"], "integer")
1931  );
1932  $order_nr += 10;
1933  $numbered_files[] = $rec["filename"];
1934  } else { // file does not exist, delete entry
1935  $db->manipulate(
1936  "DELETE FROM exc_ass_file_order " .
1937  " WHERE assignment_id = " . $db->quote($this->getId(), "integer") .
1938  " AND id = " . $db->quote($rec["id"], "integer")
1939  );
1940  }
1941  }
1942  foreach ($files as $f) {
1943  if (!in_array($f, $numbered_files)) {
1944  self::instructionFileInsertOrder($f, $this->getId());
1945  }
1946  }
1947  }
fetchAssoc(ilDBStatement $statement)
quote($value, string $type)
query(string $query)
Run a (read-only) Query on the database.
manipulate(string $query)
Run a (write) Query on the database.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignmentDataOfExercise()

static ilExAssignment::getAssignmentDataOfExercise ( int  $a_exc_id)
static

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

References $data, $DIC, and $ilDB.

Referenced by ilExerciseXMLParser\__construct(), ilExAssignmentTeam\getAdoptableTeamAssignments(), ilObjExerciseGUI\getService(), and ilExerciseXMLWriter\start().

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

◆ getAssignmentType()

ilExAssignment::getAssignmentType ( )

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

References $ass_type.

Referenced by ilExSubmission\__construct(), ilExSubmission\downloadAllAssignmentFiles(), and ilExAssignmentEditorGUI\generateTeams().

402  {
403  return $this->ass_type;
404  }
ilExAssignmentTypeInterface $ass_type
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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 2014 of file class.ilExAssignment.php.

References $type, getDeadlineMode(), getId(), getRelativeDeadline(), and ilExcIndividualDeadline\getStartingTimestamps().

2014  : array
2015  {
2016  $calculated_deadlines = array(
2017  "user" => array(),
2018  "team" => array()
2019  );
2020 
2021  if ($this->getRelativeDeadline() && $this->getDeadlineMode() == self::DEADLINE_RELATIVE) {
2022  foreach (ilExcIndividualDeadline::getStartingTimestamps($this->getId()) as $ts) {
2023  $type = $ts["is_team"]
2024  ? "team"
2025  : "user";
2026 
2027  $calculated_deadlines[$type][$ts["member_id"]] = array(
2028  "calculated_deadline" => $ts["starting_ts"] + ($this->getRelativeDeadline() * 24 * 60 * 60)
2029  );
2030  }
2031  }
2032  return $calculated_deadlines;
2033  }
static getStartingTimestamps(int $a_ass_id)
Get starting timestamp data for an assignment.
+ Here is the call graph for this function:

◆ getDeadline()

ilExAssignment::getDeadline ( )

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

References $deadline.

Referenced by getPersonalDeadline(), handleCalendarEntries(), hasActiveIDl(), ilExerciseSubmissionTableGUI\parseColumns(), save(), ilObjExercise\update(), and update().

241  : ?int
242  {
243  return $this->deadline;
244  }
+ Here is the caller graph for this function:

◆ getDeadlineMode()

ilExAssignment::getDeadlineMode ( )

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

References $deadline_mode.

Referenced by getCalculatedDeadlines(), handleCalendarEntries(), hasActiveIDl(), ilExerciseSubmissionTableGUI\parseColumns(), save(), and update().

255  : int
256  {
257  return $this->deadline_mode;
258  }
+ Here is the caller graph for this function:

◆ getExerciseId()

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

References $data, $DIC, $ilDB, $q, and getId().

1283  : ?array {
1284  global $DIC;
1285  $ilDB = $DIC->database();
1286 
1287  $and_grade = "";
1288  if (in_array($a_grade, array("notgraded", "passed", "failed"))) {
1289  $and_grade = " AND status = " . $ilDB->quote($a_grade, "text");
1290  }
1291 
1292  $q = "SELECT * FROM exc_mem_ass_status " .
1293  "WHERE ass_id = " . $ilDB->quote($this->getId(), "integer") .
1294  " AND usr_id = " . $ilDB->quote($a_user_id, "integer") .
1295  $and_grade;
1296 
1297  $set = $ilDB->query($q);
1298 
1299  $data = null;
1300  while ($rec = $ilDB->fetchAssoc($set)) {
1301  $sub = new ilExSubmission($this, $a_user_id);
1302 
1303  $data["sent_time"] = $rec["sent_time"];
1304  $data["submission"] = $sub->getLastSubmission();
1305  $data["status_time"] = $rec["status_time"];
1306  $data["feedback_time"] = $rec["feedback_time"];
1307  $data["notice"] = $rec["notice"];
1308  $data["status"] = $rec["status"];
1309  $data["mark"] = $rec["mark"];
1310  $data["comment"] = $rec["u_comment"];
1311  }
1312 
1313  return $data;
1314  }
global $DIC
Definition: feed.php:28
$q
Definition: shib_logout.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getExtendedDeadline()

ilExAssignment::getExtendedDeadline ( )

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

References $deadline2.

Referenced by recalculateLateSubmissions(), save(), and update().

324  : ?int
325  {
326  return $this->deadline2;
327  }
+ Here is the caller graph for this function:

◆ getFeedbackDate()

ilExAssignment::getFeedbackDate ( )

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

References $feedback_date.

Referenced by ilExAssignmentGUI\addSubmission(), save(), and update().

599  : int
600  {
601  return $this->feedback_date;
602  }
+ Here is the caller graph for this function:

◆ getFeedbackDateCustom()

ilExAssignment::getFeedbackDateCustom ( )

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

References $feedback_date_custom.

Referenced by afterCustomDate(), save(), and update().

613  : int
614  {
616  }
+ Here is the caller graph for this function:

◆ getFeedbackFile()

ilExAssignment::getFeedbackFile ( )

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

References $feedback_file.

Referenced by ilExAssignmentGUI\addSubmission(), ilExAssignmentGUI\addSubmissionFeedback(), getGlobalFeedbackFilePath(), save(), and update().

575  : ?string
576  {
577  return $this->feedback_file;
578  }
+ Here is the caller graph for this function:

◆ getFiles()

ilExAssignment::getFiles ( )

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

References getId().

Referenced by ilExAssignmentGUI\addFiles(), ILIAS\Exercise\Assignment\PropertyAndActionBuilderUI\buildFiles(), and fixInstructionFileOrdering().

1025  : array
1026  {
1027  return $this->domain->assignment()->instructionFiles($this->getId())->getFiles();
1028  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGlobalFeedbackFilePath()

ilExAssignment::getGlobalFeedbackFilePath ( )

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

References $path, getFeedbackFile(), and getGlobalFeedbackFileStoragePath().

1622  : string
1623  {
1624  $file = $this->getFeedbackFile();
1625  if ($file) {
1627  return $path . "/" . $file;
1628  }
1629  return "";
1630  }
$path
Definition: ltiservices.php:32
+ Here is the call graph for this function:

◆ getGlobalFeedbackFileStoragePath()

ilExAssignment::getGlobalFeedbackFileStoragePath ( )

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

References getExerciseId(), and getId().

Referenced by deleteGlobalFeedbackFile(), and getGlobalFeedbackFilePath().

1593  : string
1594  {
1595  $storage = new ilFSStorageExercise($this->getExerciseId(), $this->getId());
1596  return $storage->getGlobalFeedbackPath();
1597  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

ilExAssignment::getId ( )

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

References $id.

Referenced by ilExPeerReview\__construct(), ilExSubmission\__construct(), ilExcAssMemberState\__construct(), ilExAssignmentGUI\addFiles(), ilExAssignmentGUI\addInstructions(), ilExAssignmentGUI\addPublicSubmissions(), ilExAssignmentGUI\addSchedule(), ilExAssignmentGUI\addSubmission(), ilExAssignmentGUI\addSubmissionFeedback(), ilExPeerReviewGUI\buildSubmissionPropertiesAndActions(), canParticipantReceiveFeedback(), ilExAssTypeWikiTeam\cloneSpecificProperties(), delete(), ilExSubmission\downloadAllAssignmentFiles(), fixInstructionFileOrdering(), ilExAssignmentEditorGUI\generateTeams(), getCalculatedDeadlines(), getExerciseMemberAssignmentData(), getFiles(), ilExAssTypeWikiTeamGUI\getFormValuesArray(), getGlobalFeedbackFileStoragePath(), getMemberListData(), getMemberStatus(), ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackZipManager\getMultiFeedbackStructureFile(), ilExAssignmentGUI\getOverviewBody(), ilExAssignmentGUI\getOverviewHeader(), ilExPeerReviewGUI\getPeerReviewReceiverPanel(), getPersonalDeadline(), handleCalendarEntries(), ilExAssTypeWikiTeam\handleNewUpload(), ilExAssTypeWikiTeamGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), ilExerciseSubmissionTableGUI\parseColumns(), recalculateLateSubmissions(), setIndividualDeadline(), ilObjExerciseGUI\showOverviewObject(), ilObjExercise\update(), and update().

211  : int
212  {
213  return $this->id;
214  }
+ Here is the caller graph for this function:

◆ getIndividualDeadlines()

ilExAssignment::getIndividualDeadlines ( )

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

References $db, $ilDB, and $res.

Referenced by getMemberListData().

1709  : array
1710  {
1711  $ilDB = $this->db;
1712 
1713  $res = array();
1714 
1715  $set = $ilDB->query("SELECT * FROM exc_idl" .
1716  " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer"));
1717  while ($row = $ilDB->fetchAssoc($set)) {
1718  if ($row["is_team"]) {
1719  $row["member_id"] = "t" . $row["member_id"];
1720  }
1721 
1722  $res[$row["member_id"]] = $row["tstamp"];
1723  }
1724 
1725  return $res;
1726  }
$res
Definition: ltiservices.php:69
+ 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 145 of file class.ilExAssignment.php.

References $data, $DIC, and $ilDB.

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

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

◆ getInstruction()

ilExAssignment::getInstruction ( )

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

References $instruction.

Referenced by getInstructionPresentation(), save(), ilObjExercise\update(), and update().

334  : string
335  {
336  return $this->instruction;
337  }
+ Here is the caller graph for this function:

◆ getInstructionFilesOrder()

ilExAssignment::getInstructionFilesOrder ( )

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

References $data, $db, and $ilDB.

Referenced by fileAddOrder().

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

◆ getInstructionPresentation()

ilExAssignment::getInstructionPresentation ( )

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

References getInstruction().

339  : string
340  {
341  $inst = $this->getInstruction();
342  if (trim($inst)) {
343  $is_html = (strlen($inst) != strlen(strip_tags($inst)));
344  if (!$is_html) {
345  $inst = nl2br(
346  $this->string_transform->makeClickable()->transform($inst)
347  );
348  }
349  }
350  return $inst;
351  }
+ Here is the call graph for this function:

◆ getLastPersonalDeadline()

ilExAssignment::getLastPersonalDeadline ( )

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

References $db, and $ilDB.

Referenced by afterDeadlineStrict().

308  : int
309  {
310  $ilDB = $this->db;
311 
312  $set = $ilDB->query("SELECT MAX(tstamp) FROM exc_idl" .
313  " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer"));
314  $row = $ilDB->fetchAssoc($set);
315  return $row["tstamp"] ?? 0;
316  }
+ Here is the caller graph for this function:

◆ getMandatory()

ilExAssignment::getMandatory ( )

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

References $mandatory.

Referenced by save(), and update().

368  : bool
369  {
370  return $this->mandatory;
371  }
+ Here is the caller graph for this function:

◆ getMaxCharLimit()

ilExAssignment::getMaxCharLimit ( )

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

References $max_char_limit.

Referenced by ilExAssTypeTextGUI\getFormValuesArray(), save(), and update().

2001  : int
2002  {
2003  return $this->max_char_limit;
2004  }
+ Here is the caller graph for this function:

◆ getMaxFile()

ilExAssignment::getMaxFile ( )

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

References $max_file.

Referenced by save(), and update().

635  : ?int
636  {
637  return $this->max_file;
638  }
+ Here is the caller graph for this function:

◆ getMemberListData()

ilExAssignment::getMemberListData ( )

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

References $db, $ilDB, $q, ilObject\_exists(), ilObjUser\_lookupName(), getId(), and getIndividualDeadlines().

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

◆ getMemberStatus()

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

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

References $user, getId(), and ilObject\getId().

Referenced by ilExAssignmentGUI\addSubmissionFeedback(), ilExAssignmentGUI\getOverviewHeader(), ilObjExercise\processExerciseStatus(), and ilObjExercise\update().

1633  {
1634  $ilUser = $this->user;
1635 
1636  if (!$a_user_id) {
1637  $a_user_id = $ilUser->getId();
1638  }
1639  if (!array_key_exists($a_user_id, $this->member_status)) {
1640  $this->member_status[$a_user_id] = new ilExAssignmentMemberStatus($this->getId(), $a_user_id);
1641  }
1642  return $this->member_status[$a_user_id];
1643  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMinCharLimit()

ilExAssignment::getMinCharLimit ( )

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

References $min_char_limit.

Referenced by ilExAssTypeTextGUI\getFormValuesArray(), save(), and update().

1990  : int
1991  {
1992  return $this->min_char_limit;
1993  }
+ Here is the caller graph for this function:

◆ getOrderNr()

ilExAssignment::getOrderNr ( )

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

References $order_nr.

Referenced by save(), and update().

378  : int
379  {
380  return $this->order_nr;
381  }
+ Here is the caller graph for this function:

◆ getPeerReview()

ilExAssignment::getPeerReview ( )

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

References $peer.

Referenced by ilExPeerReviewGUI\buildSubmissionPropertiesAndActions(), delete(), handleCalendarEntries(), hasReadOnlyIDl(), ILIAS\Exercise\InternalDomainService\peerReview(), save(), and update().

426  : bool
427  {
428  return $this->peer;
429  }
+ Here is the caller graph for this function:

◆ getPeerReviewChars()

ilExAssignment::getPeerReviewChars ( )

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

References $peer_char.

Referenced by save(), and update().

527  : ?int
528  {
529  return $this->peer_char;
530  }
+ Here is the caller graph for this function:

◆ getPeerReviewCriteriaCatalogue()

ilExAssignment::getPeerReviewCriteriaCatalogue ( )

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

References $crit_cat, $res, ilExcCriteria\getInstanceByType(), and ilExcCriteria\getInstancesByParentId().

Referenced by save(), and update().

537  : ?int
538  {
539  return $this->crit_cat;
540  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPeerReviewDeadline()

ilExAssignment::getPeerReviewDeadline ( )

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

References $peer_dl.

Referenced by ilExPeerReviewGUI\buildSubmissionPropertiesAndActions(), handleCalendarEntries(), save(), and update().

459  : int
460  {
461  return $this->peer_dl;
462  }
+ Here is the caller graph for this function:

◆ getPeerReviewMin()

ilExAssignment::getPeerReviewMin ( )

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

References $peer_min.

Referenced by save(), and update().

436  : int
437  {
438  return $this->peer_min;
439  }
+ Here is the caller graph for this function:

◆ getPeerReviewSimpleUnlock()

ilExAssignment::getPeerReviewSimpleUnlock ( )

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

References $peer_unlock.

Referenced by save(), and update().

446  : int
447  {
448  return $this->peer_unlock;
449  }
+ Here is the caller graph for this function:

◆ getPeerReviewValid()

ilExAssignment::getPeerReviewValid ( )

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

References $peer_valid.

Referenced by save(), and update().

474  : int
475  {
476  return $this->peer_valid;
477  }
+ Here is the caller graph for this function:

◆ getPendingFeedbackNotifications()

static ilExAssignment::getPendingFeedbackNotifications ( )
static

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

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

Referenced by ilExcCronFeedbackNotification\run().

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

References $db, $ilDB, getDeadline(), getId(), and ilExAssignmentTeam\getTeamId().

Referenced by afterDeadline(), and recalculateLateSubmissions().

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

◆ getPortfolioTemplateId()

ilExAssignment::getPortfolioTemplateId ( )

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

References $portfolio_template.

Referenced by ilExAssTypePortfolioGUI\getFormValuesArray(), save(), and update().

646  : int
647  {
649  }
+ Here is the caller graph for this function:

◆ getRelativeDeadline()

ilExAssignment::getRelativeDeadline ( )

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

References $relative_deadline.

Referenced by getCalculatedDeadlines(), save(), and update().

265  : int
266  {
268  }
+ Here is the caller graph for this function:

◆ getRelDeadlineLastSubmission()

ilExAssignment::getRelDeadlineLastSubmission ( )

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

References $rel_deadline_last_subm.

Referenced by save(), and update().

275  : int
276  {
278  }
+ Here is the caller graph for this function:

◆ getRequestedDeadlines()

ilExAssignment::getRequestedDeadlines ( )

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

References $db, $ilDB, and $res.

1728  : array
1729  {
1730  $ilDB = $this->db;
1731 
1732  $res = array();
1733 
1734  $set = $ilDB->query("SELECT * FROM exc_idl" .
1735  " WHERE ass_id = " . $ilDB->quote($this->getId(), "integer") .
1736  " AND requested = " . $ilDB->quote(1, "integer"));
1737  while ($row = $ilDB->fetchAssoc($set)) {
1738  if ($row["is_team"]) {
1739  $row["member_id"] = "t" . $row["member_id"];
1740  }
1741 
1742  $res[$row["member_id"]] = $row["requested"];
1743  }
1744 
1745  return $res;
1746  }
$res
Definition: ltiservices.php:69

◆ getStartTime()

ilExAssignment::getStartTime ( )

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

References $start_time.

Referenced by save(), and update().

231  : ?int
232  {
233  return $this->start_time;
234  }
+ Here is the caller graph for this function:

◆ getTeamTutor()

ilExAssignment::getTeamTutor ( )

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

References $team_tutor.

Referenced by save(), and update().

624  : bool
625  {
626  return $this->team_tutor;
627  }
+ Here is the caller graph for this function:

◆ getTitle()

◆ getType()

ilExAssignment::getType ( )

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

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

References $type.

Referenced by ilExSubmission\downloadAllAssignmentFiles(), ilExerciseSubmissionTableGUI\parseColumns(), save(), and update().

411  : int
412  {
413  return $this->type;
414  }
+ Here is the caller graph for this function:

◆ handleCalendarEntries()

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

Handle calendar entries for deadline(s)

Exceptions
ilDateTimeException

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

References $app, $app_event_handler, DEADLINE_RELATIVE, getDeadline(), getDeadlineMode(), getId(), ilObject\getId(), getPeerReview(), getPeerReviewDeadline(), getTitle(), IL_CAL_UNIX, and ilCalendarEntry\TRANSLATION_SYSTEM.

Referenced by delete(), save(), and update().

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

◆ handleGlobalFeedbackFileUpload()

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

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

References setFeedbackFile().

Referenced by ilExAssignmentEditorGUI\importFormToAssignment().

1607  : bool
1608  {
1609  $rcid = $this->domain->assignment()->sampleSolution($ass_id)->importFromLegacyUpload($a_file);
1610  $this->setFeedbackFile($a_file["name"]);
1611  return ($rcid !== "");
1612  /*
1613  $path = $this->getGlobalFeedbackFileStoragePath();
1614  ilFileUtils::delDir($path, true);
1615  if (ilFileUtils::moveUploadedFile($a_file["tmp_name"], $a_file["name"], $path . "/" . $a_file["name"])) {
1616  $this->setFeedbackFile($a_file["name"]);
1617  return true;
1618  }
1619  return false;*/
1620  }
setFeedbackFile(?string $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasActiveIDl()

ilExAssignment::hasActiveIDl ( )

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

References getDeadline(), and getDeadlineMode().

Referenced by ilExerciseSubmissionTableGUI\parseColumns().

1748  : bool
1749  {
1750  return (bool) ($this->getDeadline() || $this->getDeadlineMode() === self::DEADLINE_ABSOLUTE_INDIVIDUAL);
1751  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasFeedbackCron()

ilExAssignment::hasFeedbackCron ( )

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

References $feedback_cron.

Referenced by save(), and update().

588  : bool
589  {
590  return $this->feedback_cron;
591  }
+ Here is the caller graph for this function:

◆ hasPeerReviewFileUpload()

ilExAssignment::hasPeerReviewFileUpload ( )

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

References $peer_file.

Referenced by ilExPeerReviewGUI\getPeerReviewReceiverPanel(), save(), and update().

504  : bool
505  {
506  return $this->peer_file;
507  }
+ Here is the caller graph for this function:

◆ hasPeerReviewPersonalized()

ilExAssignment::hasPeerReviewPersonalized ( )

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

References $peer_personal.

Referenced by ilExPeerReviewGUI\getPeerReviewReceiverPanel(), save(), and update().

514  : bool
515  {
516  return $this->peer_personal;
517  }
+ Here is the caller graph for this function:

◆ hasPeerReviewRating()

ilExAssignment::hasPeerReviewRating ( )

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

References $peer_rating.

Referenced by save(), and update().

484  : bool
485  {
486  return $this->peer_rating;
487  }
+ Here is the caller graph for this function:

◆ hasPeerReviewText()

ilExAssignment::hasPeerReviewText ( )

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

References $peer_text.

Referenced by save(), and update().

494  : bool
495  {
496  return $this->peer_text;
497  }
+ Here is the caller graph for this function:

◆ hasReadOnlyIDl()

ilExAssignment::hasReadOnlyIDl ( )

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

References getPeerReview().

Referenced by ilExerciseSubmissionTableGUI\parseColumns().

1753  : bool
1754  {
1755  if (!$this->ass_type->usesTeams() &&
1756  $this->getPeerReview()) {
1757  // all deadlines are read-only if we have peer feedback
1758  $peer_review = new ilExPeerReview($this);
1759  if ($peer_review->hasPeerReviewGroups()) {
1760  return true;
1761  }
1762  }
1763 
1764  return false;
1765  }
Exercise peer review.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasTeam()

ilExAssignment::hasTeam ( )

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

Referenced by ilExSubmission\__construct(), canParticipantReceiveFeedback(), ilExSubmission\downloadAllAssignmentFiles(), and ilExerciseSubmissionTableGUI\parseColumns().

201  : bool
202  {
203  return $this->ass_type->usesTeams();
204  }
+ 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 675 of file class.ilExAssignment.php.

References setDeadline(), setDeadlineMode(), setExerciseId(), setExtendedDeadline(), setFeedbackCron(), setFeedbackDate(), setFeedbackDateCustom(), setFeedbackFile(), setId(), setInstruction(), setMandatory(), setMaxCharLimit(), setMaxFile(), setMinCharLimit(), setOrderNr(), setPeerReview(), setPeerReviewChars(), setPeerReviewCriteriaCatalogue(), setPeerReviewDeadline(), setPeerReviewFileUpload(), setPeerReviewMin(), setPeerReviewPersonalized(), setPeerReviewRating(), setPeerReviewSimpleUnlock(), setPeerReviewText(), setPeerReviewValid(), setPortfolioTemplateId(), setRelativeDeadline(), setRelDeadlineLastSubmission(), setStartTime(), setTeamTutor(), setTitle(), and setType().

Referenced by read().

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

◆ insertFileOrderNr()

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

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

References $DIC, ilDBInterface\insert(), and ilDBInterface\nextId().

1794  : void {
1795  global $DIC;
1796  $db = $DIC->database();
1797  $id = $db->nextId("exc_ass_file_order");
1798  $db->insert(
1799  "exc_ass_file_order",
1800  [
1801  "id" => ["integer", $id],
1802  "order_nr" => ["integer", $a_order_nr],
1803  "assignment_id" => ["integer", $a_ass_id],
1804  "filename" => ["text", $a_filename]
1805  ]
1806  );
1807  }
insert(string $table_name, array $values)
global $DIC
Definition: feed.php:28
nextId(string $table_name)
+ Here is the call graph for this function:

◆ instructionFileDeleteOrder()

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

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

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

Referenced by ilExAssignmentFileSystemGUI\deleteFile().

1849  : void {
1850  global $DIC;
1851 
1852  $db = $DIC->database();
1853 
1854  //now its done by filename. We need to figure how to get the order id in the confirmdelete method
1855  foreach ($a_file as $v) {
1856  $db->manipulate(
1857  "DELETE FROM exc_ass_file_order " .
1858  "WHERE filename = " . $db->quote($v, 'text') .
1859  " AND assignment_id = " . $db->quote($a_ass_id, 'integer')
1860  );
1861  }
1862  }
quote($value, string $type)
global $DIC
Definition: feed.php:28
manipulate(string $query)
Run a (write) Query on the database.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionFileExistsInDb()

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

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

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

1892  : int {
1893  global $DIC;
1894 
1895  $db = $DIC->database();
1896 
1897  if ($a_ass_id) {
1898  $result = $db->query(
1899  "SELECT id FROM exc_ass_file_order" .
1900  " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1901  " AND filename = " . $db->quote($a_filename, 'text')
1902  );
1903 
1904  return $db->numRows($result);
1905  }
1906 
1907  return 0;
1908  }
numRows(ilDBStatement $statement)
quote($value, string $type)
global $DIC
Definition: feed.php:28
query(string $query)
Run a (read-only) Query on the database.
+ 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 176 of file class.ilExAssignment.php.

References $DIC, ilDBInterface\fetchAssoc(), ILIAS\Repository\int(), ilDBInterface\query(), and ilDBInterface\setLimit().

179  : array {
180  global $DIC;
181 
182  $db = $DIC->database();
183  $db->setLimit(1, 0);
184 
185  $result_order_val = $db->query("
186  SELECT id, order_nr
187  FROM exc_ass_file_order
188  WHERE assignment_id = {$db->quote($a_ass_id, 'integer')}
189  AND filename = {$db->quote($a_file_data['entry'], 'text')}
190  ");
191 
192  $order_val = 0;
193  $order_id = 0;
194  while ($row = $db->fetchAssoc($result_order_val)) {
195  $order_val = (int) $row['order_nr'];
196  $order_id = (int) $row['id'];
197  }
198  return array($order_val, $order_id);
199  }
fetchAssoc(ilDBStatement $statement)
setLimit(int $limit, int $offset=0)
global $DIC
Definition: feed.php:28
query(string $query)
Run a (read-only) Query on the database.
+ 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 1810 of file class.ilExAssignment.php.

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

Referenced by ilExerciseDataSet\importRecord(), and ilExAssignmentFileSystemGUI\uploadFile().

1814  : void {
1815  global $DIC;
1816 
1817  $db = $DIC->database();
1818 
1819  if ($a_ass_id) {
1820  //first of all check the suffix and change if necessary
1821  $filename = ilFileUtils::getSafeFilename($a_filename);
1822 
1823  if (self::instructionFileExistsInDb($filename, $a_ass_id) == 0) {
1824  if ($a_order_nr == 0) {
1825  $order_val = self::instructionFileOrderGetMax($a_ass_id);
1826  $order = $order_val + 10;
1827  } else {
1828  $order = $a_order_nr;
1829  }
1830 
1831  $id = $db->nextID('exc_ass_file_order');
1832  $db->manipulate("INSERT INTO exc_ass_file_order " .
1833  "(id, assignment_id, filename, order_nr) VALUES (" .
1834  $db->quote($id, "integer") . "," .
1835  $db->quote($a_ass_id, "integer") . "," .
1836  $db->quote($filename, "text") . "," .
1837  $db->quote($order, "integer") .
1838  ")");
1839  }
1840  }
1841  }
quote($value, string $type)
static getSafeFilename(string $a_initial_filename)
global $DIC
Definition: feed.php:28
$filename
Definition: buildRTE.php:78
manipulate(string $query)
Run a (write) Query on the database.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionFileOrderGetMax()

static ilExAssignment::instructionFileOrderGetMax ( int  $a_ass_id)
static

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

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

1963  : int
1964  {
1965  global $DIC;
1966 
1967  $db = $DIC->database();
1968 
1969  //get max order number
1970  $result = $db->queryF(
1971  "SELECT max(order_nr) as max_order FROM exc_ass_file_order WHERE assignment_id = %s",
1972  array('integer'),
1973  array($db->quote($a_ass_id, 'integer'))
1974  );
1975 
1976  $order_val = 0;
1977  while ($row = $db->fetchAssoc($result)) {
1978  $order_val = (int) $row['max_order'];
1979  }
1980  return $order_val;
1981  }
fetchAssoc(ilDBStatement $statement)
quote($value, string $type)
global $DIC
Definition: feed.php:28
queryF(string $query, array $types, array $values)
+ Here is the call graph for this function:

◆ isInExercise()

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

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

References $DIC, and $ilDB.

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

1196  : bool
1197  {
1198  global $DIC;
1199 
1200  $ilDB = $DIC->database();
1201 
1202  $set = $ilDB->query(
1203  "SELECT * FROM exc_assignment " .
1204  " WHERE exc_id = " . $ilDB->quote($a_ex_id, "integer") .
1205  " AND id = " . $ilDB->quote($a_ass_id, "integer")
1206  );
1207  if ($ilDB->fetchAssoc($set)) {
1208  return true;
1209  }
1210  return false;
1211  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ isValidType()

ilExAssignment::isValidType ( int  $a_value)

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

Referenced by setType().

416  : bool
417  {
418  return $this->types->isValidId($a_value);
419  }
+ Here is the caller graph for this function:

◆ lookup()

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

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

References $DIC, and $ilDB.

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

◆ lookupAssignmentOnline()

static ilExAssignment::lookupAssignmentOnline ( int  $a_ass_id)
static

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

References $DIC, $ilDB, and $res.

Referenced by ilObjExerciseSubItemListGUI\isAssignmentVisible().

1068  : bool
1069  {
1070  global $DIC;
1071 
1072  $ilDB = $DIC->database();
1073 
1074  $query = "SELECT id FROM exc_assignment " .
1075  "WHERE start_time <= " . $ilDB->quote(time(), 'integer') . ' ' .
1076  "AND time_stamp >= " . $ilDB->quote(time(), 'integer') . ' ' .
1077  "AND id = " . $ilDB->quote($a_ass_id, 'integer');
1078  $res = $ilDB->query($query);
1079 
1080  return (bool) $res->numRows();
1081  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ lookupExerciseId()

static ilExAssignment::lookupExerciseId ( int  $a_ass_id)
static

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

References $DIC, $ilDB, and $res.

Referenced by ilObjExerciseGUI\__construct(), ILIAS\Exercise\SampleSolution\SampleSolutionManager\cloneTo(), ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackFileManager\count(), ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackFileManager\deliver(), ilExerciseGSToolProvider\getAssignmentInfo(), ILIAS\Exercise\InstructionFile\InstructionFileManager\getFiles(), ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackFileManager\getFiles(), and ILIAS\Exercise\TutorFeedbackFile\TutorFeedbackFileManager\sendNotification().

1083  : int
1084  {
1085  global $DIC;
1086 
1087  $ilDB = $DIC->database();
1088  $query = "SELECT exc_id FROM exc_assignment " .
1089  "WHERE id = " . $ilDB->quote($a_ass_id, 'integer');
1090  $res = $ilDB->fetchAssoc($ilDB->query($query));
1091 
1092  return (int) ($res["exc_id"] ?? 0);
1093  }
$res
Definition: ltiservices.php:69
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ lookupMaxOrderNrForEx()

static ilExAssignment::lookupMaxOrderNrForEx ( int  $a_exc_id)
static

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

References $DIC, and $ilDB.

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

◆ lookupTitle()

◆ lookupType()

static ilExAssignment::lookupType ( int  $a_id)
static

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

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

1116  : int
1117  {
1118  return (int) self::lookup($a_id, "type");
1119  }
+ Here is the caller graph for this function:

◆ notStartedYet()

ilExAssignment::notStartedYet ( )

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

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

◆ orderAssByDeadline()

static ilExAssignment::orderAssByDeadline ( int  $a_ex_id)
static

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

References $DIC, and $ilDB.

Referenced by ilExAssignmentEditorGUI\orderAssignmentsByDeadlineObject().

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

◆ read()

ilExAssignment::read ( )
Exceptions
ilExcUnknownAssignmentTypeException

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

References $db, $ilDB, and initFromDB().

Referenced by __construct().

654  : void
655  {
656  $ilDB = $this->db;
657 
658  $set = $ilDB->query(
659  "SELECT * FROM exc_assignment " .
660  " WHERE id = " . $ilDB->quote($this->getId(), "integer")
661  );
662  $rec = $ilDB->fetchAssoc($set);
663 
664  // #16172 - might be deleted
665  if (is_array($rec)) {
666  $this->initFromDB($rec);
667  }
668  }
initFromDB(array $a_set)
Import DB record.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recalculateLateSubmissions()

ilExAssignment::recalculateLateSubmissions ( )
Exceptions
ilDateTimeException

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

References $db, $ilDB, ilExSubmission\getAllAssignmentFiles(), getExtendedDeadline(), getId(), getPersonalDeadline(), IL_CAL_DATETIME, and IL_CAL_UNIX.

1648  : void
1649  {
1650  $ilDB = $this->db;
1651 
1652  // see JF, 2015-05-11
1653 
1654  $ext_deadline = $this->getExtendedDeadline();
1655 
1656  foreach (ilExSubmission::getAllAssignmentFiles($this->exc_id, $this->getId()) as $file) {
1657  $id = $file["returned_id"];
1658  $uploaded = new ilDateTime($file["ts"], IL_CAL_DATETIME);
1659  $uploaded = $uploaded->get(IL_CAL_UNIX);
1660 
1661  $deadline = $this->getPersonalDeadline($file["user_id"]);
1662  $last_deadline = max($deadline, $this->getExtendedDeadline());
1663 
1664  $late = null;
1665 
1666  // upload is not late anymore
1667  if ($file["late"] &&
1668  (!$last_deadline ||
1669  !$ext_deadline ||
1670  $uploaded < $deadline)) {
1671  $late = false;
1672  }
1673  // upload is now late
1674  elseif (!$file["late"] &&
1675  $ext_deadline &&
1676  $deadline &&
1677  $uploaded > $deadline) {
1678  $late = true;
1679  }
1680 
1681  if ($late !== null) {
1682  $ilDB->manipulate("UPDATE exc_returned" .
1683  " SET late = " . $ilDB->quote($late, "integer") .
1684  " WHERE returned_id = " . $ilDB->quote($id, "integer"));
1685  }
1686  }
1687  }
const IL_CAL_DATETIME
const IL_CAL_UNIX
getPersonalDeadline(int $a_user_id)
static getAllAssignmentFiles(int $a_exc_id, int $a_ass_id)
+ Here is the call graph for this function:

◆ renameInstructionFile()

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

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

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

Referenced by ilExAssignmentFileSystemGUI\renameFile().

1868  : void {
1869  global $DIC;
1870 
1871  $db = $DIC->database();
1872 
1873  if ($a_ass_id) {
1874  $db->manipulate(
1875  "DELETE FROM exc_ass_file_order" .
1876  " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1877  " AND filename = " . $db->quote($a_new_name, 'text')
1878  );
1879 
1880  $db->manipulate(
1881  "UPDATE exc_ass_file_order SET" .
1882  " filename = " . $db->quote($a_new_name, 'text') .
1883  " WHERE assignment_id = " . $db->quote($a_ass_id, 'integer') .
1884  " AND filename = " . $db->quote($a_old_name, 'text')
1885  );
1886  }
1887  }
quote($value, string $type)
global $DIC
Definition: feed.php:28
manipulate(string $query)
Run a (write) Query on the database.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilExAssignment::save ( )
Exceptions
ilDateTimeException

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

References $db, $ilDB, getDeadline(), getDeadlineMode(), getExerciseId(), getExtendedDeadline(), getFeedbackDate(), getFeedbackDateCustom(), getFeedbackFile(), getInstruction(), getMandatory(), getMaxCharLimit(), getMaxFile(), getMinCharLimit(), getOrderNr(), getPeerReview(), getPeerReviewChars(), getPeerReviewCriteriaCatalogue(), getPeerReviewDeadline(), getPeerReviewMin(), getPeerReviewSimpleUnlock(), getPeerReviewValid(), getPortfolioTemplateId(), getRelativeDeadline(), getRelDeadlineLastSubmission(), getStartTime(), getTeamTutor(), getTitle(), getType(), handleCalendarEntries(), hasFeedbackCron(), hasPeerReviewFileUpload(), hasPeerReviewPersonalized(), hasPeerReviewRating(), hasPeerReviewText(), ilObjectSearch\raiseContentChanged(), setId(), and setOrderNr().

Referenced by ilExAssignmentEditorGUI\importFormToAssignment().

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

◆ saveAssOrderOfExercise()

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

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

References $DIC, and $ilDB.

Referenced by ilExAssignmentEditorGUI\saveAssignmentOrderObject().

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

◆ saveInstructionFilesOrderOfAssignment()

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

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

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

Referenced by ilExAssignmentFileSystemGUI\saveFilesOrder().

1770  : void {
1771  global $DIC;
1772 
1773  $db = $DIC->database();
1774 
1775  asort($a_order, SORT_NUMERIC);
1776 
1777  $nr = 10;
1778  foreach (array_keys($a_order) as $k) {
1779  // the check for exc_id is for security reasons. ass ids are unique.
1780  $db->manipulate(
1781  "UPDATE exc_ass_file_order SET " .
1782  " order_nr = " . $db->quote($nr, "integer") .
1783  " WHERE id = " . $db->quote((int) $k, "integer") .
1784  " AND assignment_id = " . $db->quote($a_ass_id, "integer")
1785  );
1786  $nr += 10;
1787  }
1788  }
quote($value, string $type)
global $DIC
Definition: feed.php:28
manipulate(string $query)
Run a (write) Query on the database.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendFeedbackNotifications()

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

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

References $DIC, $ilDB, ilExerciseMembers\_getMembers(), count(), ilLogger\debug(), and ilLoggerFactory\getLogger().

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

1474  : bool {
1475  global $DIC;
1476 
1477  $ilDB = $DIC->database();
1479 
1480  $ass = new self($a_ass_id);
1481 
1482  // valid assignment?
1483  if (!$ass->hasFeedbackCron() || !$ass->getFeedbackFile()) {
1484  $log->debug("return(1)");
1485  return false;
1486  }
1487 
1488  if (!$a_user_id) {
1489  // already done?
1490  $set = $ilDB->query("SELECT fb_cron_done" .
1491  " FROM exc_assignment" .
1492  " WHERE id = " . $ilDB->quote($a_ass_id, "integer"));
1493  $row = $ilDB->fetchAssoc($set);
1494  if ($row["fb_cron_done"]) {
1495  $log->debug("return(2)");
1496  return false;
1497  }
1498  }
1499 
1500  $ntf = new ilSystemNotification();
1501  $ntf->setLangModules(array("exc"));
1502  $ntf->setObjId($ass->getExerciseId());
1503  $ntf->setSubjectLangId("exc_feedback_notification_subject");
1504  $ntf->setIntroductionLangId("exc_feedback_notification_body");
1505  $ntf->addAdditionalInfo("exc_assignment", $ass->getTitle());
1506  $ntf->setGotoLangId("exc_feedback_notification_link");
1507  $ntf->setReasonLangId("exc_feedback_notification_reason");
1508 
1509  if (!$a_user_id) {
1510  $log->debug("send to members, cnt: " . count(ilExerciseMembers::_getMembers($ass->getExerciseId())));
1511  $ntf->sendMailAndReturnRecipients(ilExerciseMembers::_getMembers($ass->getExerciseId()));
1512 
1513  $ilDB->manipulate("UPDATE exc_assignment" .
1514  " SET fb_cron_done = " . $ilDB->quote(1, "integer") .
1515  " WHERE id = " . $ilDB->quote($a_ass_id, "integer"));
1516  } else {
1517  $log->debug("send to user: " . $a_user_id);
1518  $ntf->sendMailAndReturnRecipients(array($a_user_id));
1519  }
1520 
1521  return true;
1522  }
static getLogger(string $a_component_id)
Get component logger.
static count(int $a_ex_id)
global $DIC
Definition: feed.php:28
static _getMembers(int $a_obj_id)
debug(string $message, array $context=[])
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDeadline()

ilExAssignment::setDeadline ( ?int  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

236  : void
237  {
238  $this->deadline = $a_val;
239  }
+ Here is the caller graph for this function:

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

250  : void
251  {
252  $this->deadline_mode = $a_val;
253  }
+ Here is the caller graph for this function:

◆ setExerciseId()

ilExAssignment::setExerciseId ( int  $a_val)

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

Referenced by initFromDB().

216  : void
217  {
218  $this->exc_id = $a_val;
219  }
+ Here is the caller graph for this function:

◆ setExtendedDeadline()

ilExAssignment::setExtendedDeadline ( ?int  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

319  : void
320  {
321  $this->deadline2 = $a_val;
322  }
+ Here is the caller graph for this function:

◆ setFeedbackCron()

ilExAssignment::setFeedbackCron ( bool  $a_value)

Toggle (global) feedback file cron.

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

583  : void
584  {
585  $this->feedback_cron = $a_value;
586  }
+ Here is the caller graph for this function:

◆ setFeedbackDate()

ilExAssignment::setFeedbackDate ( int  $a_value)

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

Referenced by __construct(), ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

594  : void
595  {
596  $this->feedback_date = $a_value;
597  }
+ 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 608 of file class.ilExAssignment.php.

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

608  : void
609  {
610  $this->feedback_date_custom = $a_value;
611  }
+ Here is the caller graph for this function:

◆ setFeedbackFile()

ilExAssignment::setFeedbackFile ( ?string  $a_value)

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

Referenced by handleGlobalFeedbackFileUpload(), ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

570  : void
571  {
572  $this->feedback_file = $a_value;
573  }
+ Here is the caller graph for this function:

◆ setId()

ilExAssignment::setId ( int  $a_val)

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

Referenced by __construct(), initFromDB(), and save().

206  : void
207  {
208  $this->id = $a_val;
209  }
+ Here is the caller graph for this function:

◆ setIndividualDeadline()

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

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

References ilDateTime\get(), getId(), ilExcIndividualDeadline\getInstance(), and IL_CAL_UNIX.

1697  : void {
1698  $is_team = false;
1699  if (!is_numeric($id)) {
1700  $id = substr($id, 1);
1701  $is_team = true;
1702  }
1703 
1704  $idl = ilExcIndividualDeadline::getInstance($this->getId(), (int) $id, $is_team);
1705  $idl->setIndividualDeadline($date->get(IL_CAL_UNIX));
1706  $idl->save();
1707  }
get(int $a_format, string $a_format_str='', string $a_tz='')
get formatted date
const IL_CAL_UNIX
static getInstance(int $a_ass_id, int $a_participant_id, bool $a_is_team=false)
+ Here is the call graph for this function:

◆ setInstruction()

ilExAssignment::setInstruction ( string  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

329  : void
330  {
331  $this->instruction = $a_val;
332  }
+ Here is the caller graph for this function:

◆ setMandatory()

ilExAssignment::setMandatory ( bool  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

363  : void
364  {
365  $this->mandatory = $a_val;
366  }
+ Here is the caller graph for this function:

◆ setMaxCharLimit()

ilExAssignment::setMaxCharLimit ( int  $a_val)

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

Referenced by ilExAssTypeTextGUI\importFormToAssignment(), and initFromDB().

1996  : void
1997  {
1998  $this->max_char_limit = $a_val;
1999  }
+ Here is the caller graph for this function:

◆ setMaxFile()

ilExAssignment::setMaxFile ( ?int  $a_value)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

630  : void
631  {
632  $this->max_file = $a_value;
633  }
+ Here is the caller graph for this function:

◆ setMinCharLimit()

ilExAssignment::setMinCharLimit ( int  $a_val)

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

Referenced by ilExAssTypeTextGUI\importFormToAssignment(), and initFromDB().

1985  : void
1986  {
1987  $this->min_char_limit = $a_val;
1988  }
+ Here is the caller graph for this function:

◆ setOrderNr()

ilExAssignment::setOrderNr ( int  $a_val)

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

Referenced by initFromDB(), and save().

373  : void
374  {
375  $this->order_nr = $a_val;
376  }
+ Here is the caller graph for this function:

◆ setPeerReview()

ilExAssignment::setPeerReview ( bool  $a_value)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), initFromDB(), and setType().

421  : void
422  {
423  $this->peer = $a_value;
424  }
+ Here is the caller graph for this function:

◆ setPeerReviewChars()

ilExAssignment::setPeerReviewChars ( ?int  $a_value)

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

References ILIAS\Repository\int().

Referenced by ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

519  : void
520  {
521  $a_value = (is_numeric($a_value) && (int) $a_value > 0)
522  ? (int) $a_value
523  : null;
524  $this->peer_char = $a_value;
525  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPeerReviewCriteriaCatalogue()

ilExAssignment::setPeerReviewCriteriaCatalogue ( ?int  $a_value)

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

Referenced by ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

532  : void
533  {
534  $this->crit_cat = $a_value;
535  }
+ Here is the caller graph for this function:

◆ setPeerReviewDeadline()

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

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

Referenced by ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

454  : void
455  {
456  $this->peer_dl = $a_val;
457  }
+ Here is the caller graph for this function:

◆ setPeerReviewFileUpload()

ilExAssignment::setPeerReviewFileUpload ( bool  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

499  : void
500  {
501  $this->peer_file = $a_val;
502  }
+ Here is the caller graph for this function:

◆ setPeerReviewMin()

ilExAssignment::setPeerReviewMin ( int  $a_value)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

431  : void
432  {
433  $this->peer_min = $a_value;
434  }
+ Here is the caller graph for this function:

◆ setPeerReviewPersonalized()

ilExAssignment::setPeerReviewPersonalized ( bool  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

509  : void
510  {
511  $this->peer_personal = $a_val;
512  }
+ Here is the caller graph for this function:

◆ setPeerReviewRating()

ilExAssignment::setPeerReviewRating ( bool  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

479  : void
480  {
481  $this->peer_rating = $a_val;
482  }
+ Here is the caller graph for this function:

◆ setPeerReviewSimpleUnlock()

ilExAssignment::setPeerReviewSimpleUnlock ( int  $a_value)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

442  {
443  $this->peer_unlock = $a_value;
444  }
+ Here is the caller graph for this function:

◆ setPeerReviewText()

ilExAssignment::setPeerReviewText ( bool  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

489  : void
490  {
491  $this->peer_text = $a_val;
492  }
+ Here is the caller graph for this function:

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), ilExAssignmentEditorGUI\importPeerReviewFormToAssignment(), and initFromDB().

469  : void
470  {
471  $this->peer_valid = $a_value;
472  }
+ Here is the caller graph for this function:

◆ setPortfolioTemplateId()

ilExAssignment::setPortfolioTemplateId ( int  $a_val)

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

Referenced by ilExAssTypePortfolioGUI\importFormToAssignment(), and initFromDB().

641  : void
642  {
643  $this->portfolio_template = $a_val;
644  }
+ Here is the caller graph for this function:

◆ setRelativeDeadline()

ilExAssignment::setRelativeDeadline ( int  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

260  : void
261  {
262  $this->relative_deadline = $a_val;
263  }
+ Here is the caller graph for this function:

◆ setRelDeadlineLastSubmission()

ilExAssignment::setRelDeadlineLastSubmission ( int  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

270  : void
271  {
272  $this->rel_deadline_last_subm = $a_val;
273  }
+ Here is the caller graph for this function:

◆ setStartTime()

ilExAssignment::setStartTime ( ?int  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

226  : void
227  {
228  $this->start_time = $a_val;
229  }
+ Here is the caller graph for this function:

◆ setTeamTutor()

ilExAssignment::setTeamTutor ( bool  $a_value)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

619  : void
620  {
621  $this->team_tutor = $a_value;
622  }
+ Here is the caller graph for this function:

◆ setTitle()

ilExAssignment::setTitle ( string  $a_val)

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

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and initFromDB().

353  : void
354  {
355  $this->title = $a_val;
356  }
+ Here is the caller graph for this function:

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

References isValidType(), and setPeerReview().

Referenced by __construct(), and initFromDB().

388  : void
389  {
390  if ($this->isValidType($a_value)) {
391  $this->type = $a_value;
392 
393  $this->ass_type = $this->types->getById($a_value);
394 
395  if ($this->ass_type->usesTeams()) {
396  $this->setPeerReview(false);
397  }
398  }
399  }
isValidType(int $a_value)
setPeerReview(bool $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilExAssignment::update ( )
Exceptions
ilDateTimeException

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

References $db, $ilDB, getDeadline(), getDeadlineMode(), getExerciseId(), getExtendedDeadline(), getFeedbackDate(), getFeedbackDateCustom(), getFeedbackFile(), getId(), getInstruction(), getMandatory(), getMaxCharLimit(), getMaxFile(), getMinCharLimit(), getOrderNr(), getPeerReview(), getPeerReviewChars(), getPeerReviewCriteriaCatalogue(), getPeerReviewDeadline(), getPeerReviewMin(), getPeerReviewSimpleUnlock(), getPeerReviewValid(), getPortfolioTemplateId(), getRelativeDeadline(), getRelDeadlineLastSubmission(), getStartTime(), getTeamTutor(), getTitle(), getType(), handleCalendarEntries(), hasFeedbackCron(), hasPeerReviewFileUpload(), hasPeerReviewPersonalized(), hasPeerReviewRating(), hasPeerReviewText(), and ilObjectSearch\raiseContentChanged().

Referenced by ilExAssignmentEditorGUI\importFormToAssignment(), and ilExAssignmentEditorGUI\importPeerReviewFormToAssignment().

776  : void
777  {
778  $ilDB = $this->db;
779 
780  $ilDB->update(
781  "exc_assignment",
782  array(
783  "exc_id" => array("integer", $this->getExerciseId()),
784  "time_stamp" => array("integer", $this->getDeadline()),
785  "deadline2" => array("integer", $this->getExtendedDeadline()),
786  "instruction" => array("clob", $this->getInstruction()),
787  "title" => array("text", $this->getTitle()),
788  "start_time" => array("integer", $this->getStartTime()),
789  "order_nr" => array("integer", $this->getOrderNr()),
790  "mandatory" => array("integer", $this->getMandatory()),
791  "type" => array("integer", $this->getType()),
792  "peer" => array("integer", $this->getPeerReview()),
793  "peer_min" => array("integer", $this->getPeerReviewMin()),
794  "peer_unlock" => array("integer", $this->getPeerReviewSimpleUnlock()),
795  "peer_dl" => array("integer", $this->getPeerReviewDeadline()),
796  "peer_valid" => array("integer", $this->getPeerReviewValid()),
797  "peer_file" => array("integer", $this->hasPeerReviewFileUpload()),
798  "peer_prsl" => array("integer", $this->hasPeerReviewPersonalized()),
799  "peer_char" => array("integer", $this->getPeerReviewChars()),
800  "peer_text" => array("integer", (int) $this->hasPeerReviewText()),
801  "peer_rating" => array("integer", (int) $this->hasPeerReviewRating()),
802  "peer_crit_cat" => array("integer", $this->getPeerReviewCriteriaCatalogue()),
803  "fb_file" => array("text", $this->getFeedbackFile()),
804  "fb_date" => array("integer", $this->getFeedbackDate()),
805  "fb_date_custom" => array("integer", $this->getFeedbackDateCustom()),
806  "fb_cron" => array("integer", $this->hasFeedbackCron()),
807  "team_tutor" => array("integer", $this->getTeamTutor()),
808  "max_file" => array("integer", $this->getMaxFile()),
809  "portfolio_template" => array("integer", $this->getPortfolioTemplateId()),
810  "min_char_limit" => array("integer", $this->getMinCharLimit()),
811  "max_char_limit" => array("integer", $this->getMaxCharLimit()),
812  "deadline_mode" => array("integer", $this->getDeadlineMode()),
813  "relative_deadline" => array("integer", $this->getRelativeDeadline()),
814  "rel_deadline_last_subm" => array("integer", $this->getRelDeadlineLastSubmission())
815  ),
816  array(
817  "id" => array("integer", $this->getId()),
818  )
819  );
820  $exc = new ilObjExercise($this->getExerciseId(), false);
821  $exc->updateAllUsersStatus();
823  $this->handleCalendarEntries("update", $exc);
824  }
getType()
Get type this will most probably become an non public function in the future (or become obsolete) ...
Class ilObjExercise.
static raiseContentChanged(int $obj_id)
handleCalendarEntries(string $a_event, ilObjExercise $exc)
Handle calendar entries for deadline(s)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilExAssignment::$access
protected

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

◆ $app_event_handler

ilAppEventHandler ilExAssignment::$app_event_handler
protected

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

Referenced by handleCalendarEntries().

◆ $ass_type

ilExAssignmentTypeInterface ilExAssignment::$ass_type
protected

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

Referenced by getAssignmentType().

◆ $crit_cat

int ilExAssignment::$crit_cat = 0
protected

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

Referenced by getPeerReviewCriteriaCatalogue().

◆ $db

◆ $deadline

int ilExAssignment::$deadline = null
protected

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

Referenced by getDeadline().

◆ $deadline2

int ilExAssignment::$deadline2 = null
protected

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

Referenced by getExtendedDeadline().

◆ $deadline_mode

int ilExAssignment::$deadline_mode = 0
protected

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

Referenced by getDeadlineMode().

◆ $domain

ILIAS Exercise InternalDomainService ilExAssignment::$domain
protected

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

◆ $exc_id

int ilExAssignment::$exc_id = 0
protected

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

Referenced by getExerciseId().

◆ $feedback_cron

bool ilExAssignment::$feedback_cron = false
protected

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

Referenced by hasFeedbackCron().

◆ $feedback_date

int ilExAssignment::$feedback_date = 0
protected

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

Referenced by getFeedbackDate().

◆ $feedback_date_custom

int ilExAssignment::$feedback_date_custom = 0
protected

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

Referenced by getFeedbackDateCustom().

◆ $feedback_file

string ilExAssignment::$feedback_file = null
protected

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

Referenced by getFeedbackFile().

◆ $id

int ilExAssignment::$id = 0
protected

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

Referenced by getId().

◆ $instruction

string ilExAssignment::$instruction = ""
protected

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

Referenced by getInstruction().

◆ $lng

ilLanguage ilExAssignment::$lng
protected

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

◆ $log

ilLogger ilExAssignment::$log
protected

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

◆ $mandatory

bool ilExAssignment::$mandatory = false
protected

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

Referenced by getMandatory().

◆ $max_char_limit

int ilExAssignment::$max_char_limit = 0
protected

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

Referenced by getMaxCharLimit().

◆ $max_file

int ilExAssignment::$max_file = null
protected

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

Referenced by getMaxFile().

◆ $member_status

array ilExAssignment::$member_status = []
protected

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

◆ $min_char_limit

int ilExAssignment::$min_char_limit = 0
protected

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

Referenced by getMinCharLimit().

◆ $order_nr

int ilExAssignment::$order_nr = 0
protected

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

Referenced by getOrderNr().

◆ $peer

bool ilExAssignment::$peer = false
protected

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

Referenced by getPeerReview().

◆ $peer_char

int ilExAssignment::$peer_char = null
protected

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

Referenced by getPeerReviewChars().

◆ $peer_crit_cat

int ilExAssignment::$peer_crit_cat = 0
protected

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

◆ $peer_dl

int ilExAssignment::$peer_dl = 0
protected

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

Referenced by getPeerReviewDeadline().

◆ $peer_file

bool ilExAssignment::$peer_file = false
protected

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

Referenced by hasPeerReviewFileUpload().

◆ $peer_min

int ilExAssignment::$peer_min = 0
protected

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

Referenced by getPeerReviewMin().

◆ $peer_personal

bool ilExAssignment::$peer_personal = false
protected

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

Referenced by hasPeerReviewPersonalized().

◆ $peer_rating

bool ilExAssignment::$peer_rating = false
protected

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

Referenced by hasPeerReviewRating().

◆ $peer_text

bool ilExAssignment::$peer_text = false
protected

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

Referenced by hasPeerReviewText().

◆ $peer_unlock

int ilExAssignment::$peer_unlock = 0
protected

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

Referenced by getPeerReviewSimpleUnlock().

◆ $peer_valid

int ilExAssignment::$peer_valid
protected

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

Referenced by getPeerReviewValid().

◆ $portfolio_template

int ilExAssignment::$portfolio_template = 0
protected

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

Referenced by getPortfolioTemplateId().

◆ $rel_deadline_last_subm

int ilExAssignment::$rel_deadline_last_subm = 0
protected

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

Referenced by getRelDeadlineLastSubmission().

◆ $relative_deadline

int ilExAssignment::$relative_deadline = 0
protected

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

Referenced by getRelativeDeadline().

◆ $start_time

int ilExAssignment::$start_time = null
protected

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

Referenced by getStartTime().

◆ $string_transform

ILIAS Refinery String Group ilExAssignment::$string_transform
protected

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

◆ $team_tutor

bool ilExAssignment::$team_tutor = false
protected

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

Referenced by getTeamTutor().

◆ $title

string ilExAssignment::$title = ""
protected

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

Referenced by getTitle().

◆ $type

int ilExAssignment::$type = 0
protected

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

Referenced by getCalculatedDeadlines(), and getType().

◆ $types

ilExAssignmentTypes ilExAssignment::$types
protected

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

◆ $user

ilObjUser ilExAssignment::$user
protected

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

Referenced by afterDeadline(), and getMemberStatus().

◆ 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

◆ 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.

Referenced by ilExAssignmentEditorGUI\initAssignmentForm().

◆ TEAMS_FORMED_BY_RANDOM

const ilExAssignment::TEAMS_FORMED_BY_RANDOM = 2

◆ TEAMS_FORMED_BY_TUTOR

const ilExAssignment::TEAMS_FORMED_BY_TUTOR = 1

◆ 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: