ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDclIliasReferenceRecordFieldModel.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5require_once './Modules/DataCollection/classes/Fields/Base/class.ilDclBaseRecordFieldModel.php';
6require_once './Services/Object/classes/class.ilObject2.php';
7
8
21
25 protected $dcl_obj_id;
26
28 parent::__construct($record, $field);
29
30 $dclTable = ilDclCache::getTableCache($this->getField()->getTableId());
31 $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
32 }
33
34 public function getStatus(){
35 global $DIC;
36 $ilDB = $DIC['ilDB'];
37 $ilUser = $DIC['ilUser'];
38 $usr_id = $ilUser->getId();
39 $obj_ref = $this->getValue();
40 $obj_id = ilObject2::_lookupObjectId($obj_ref);
41 $query = " SELECT status_changed, status
42 FROM ut_lp_marks
43 WHERE usr_id = ".$usr_id." AND obj_id = ".$obj_id;
44 $result = $ilDB->query($query);
45 return ($result->numRows() == 0)? false : $result->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
46 }
47
48
52 public function getValueForRepresentation() {
53 $ref_id = $this->getValue();
55 }
56
57
61 public function getExportValue(){
62 $link = ilLink::_getStaticLink($this->getValue());
63 return $link;
64 }
65
66}
$result
An exception for terminatinating execution or to throw for unit testing.
Class ilDclBaseFieldModel.
Class ilDclBaseRecordModel.
static getTableCache($table_id=0)
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
$ref_id
Definition: sahs_server.php:39
global $ilDB
global $DIC
$ilUser
Definition: imgupload.php:18