ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSurveyLP.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "Services/Object/classes/class.ilObjectLP.php";
5
14{
15 public function getDefaultMode()
16 {
18 }
19
20 public function getValidModes()
21 {
22 return array(
25 );
26 }
27
28 public function isAnonymized()
29 {
30 include_once './Modules/Survey/classes/class.ilObjSurveyAccess.php';
31 return (bool)ilObjSurveyAccess::_lookupAnonymize($this->obj_id);
32 }
33
34 protected static function isLPMember(array &$a_res, $a_usr_id, array $a_obj_ids)
35 {
36 global $ilDB;
37
38 // if active id
39 $set = $ilDB->query("SELECT ss.obj_fi".
40 " FROM svy_finished sf".
41 " JOIN svy_svy ss ON (ss.survey_id = sf.survey_fi)".
42 " WHERE ".$ilDB->in("ss.obj_fi", $a_obj_ids, "", "integer").
43 " AND sf.user_fi = ".$ilDB->quote($a_usr_id, "integer"));
44 while($row = $ilDB->fetchAssoc($set))
45 {
46 $a_res[$row["obj_fi"]] = true;
47 }
48
49 return true;
50 }
51}
52
53?>
static isLPMember(array &$a_res, $a_usr_id, array $a_obj_ids)
global $ilDB