diff --git a/tag/classes/tag.php b/tag/classes/tag.php index 0297522aa6d..c1d56bfc41e 100644 --- a/tag/classes/tag.php +++ b/tag/classes/tag.php @@ -74,6 +74,15 @@ class core_tag_tag { /** @var int option to hide standard tags when editing item tags */ const HIDE_STANDARD = 2; + /** @var int|null tag context ID. */ + public $taginstancecontextid; + + /** @var int|null time modification. */ + public $timemodified; + + /** @var int|null 0 if not flagged or positive integer if flagged. */ + public $flag; + /** * Constructor. Use functions get(), get_by_name(), etc. * @@ -83,6 +92,9 @@ class core_tag_tag { if (empty($record->id)) { throw new coding_exception("Record must contain at least field 'id'"); } + // The following three variables must be added because the database ($record) does not contain them. + $this->taginstancecontextid = $record->taginstancecontextid ?? null; + $this->flag = $record->flag ?? null; $this->record = $record; }