ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilSurveyLP.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
12 public static function getDefaultModes($a_lp_active)
13 {
14 return array(
17 );
18 }
19
20 public function getDefaultMode()
21 {
23 }
24
25 public function getValidModes()
26 {
27 return array(
30 );
31 }
32
33 public function isAnonymized()
34 {
35 return (bool) ilObjSurveyAccess::_lookupAnonymize($this->obj_id);
36 }
37
38 protected static function isLPMember(array &$a_res, $a_usr_id, $a_obj_ids)
39 {
40 global $DIC;
41
42 $ilDB = $DIC->database();
43
44 // if active id
45 $set = $ilDB->query("SELECT ss.obj_fi" .
46 " FROM svy_finished sf" .
47 " JOIN svy_svy ss ON (ss.survey_id = sf.survey_fi)" .
48 " WHERE " . $ilDB->in("ss.obj_fi", $a_obj_ids, "", "integer") .
49 " AND sf.user_fi = " . $ilDB->quote($a_usr_id, "integer"));
50 while ($row = $ilDB->fetchAssoc($set)) {
51 $a_res[$row["obj_fi"]] = true;
52 }
53
54 return true;
55 }
56}
An exception for terminatinating execution or to throw for unit testing.
static _lookupAnonymize($a_obj_id)
Survey to lp connector.
static getDefaultModes($a_lp_active)
Get available type-specific default modes (no administration needed)
static isLPMember(array &$a_res, $a_usr_id, $a_obj_ids)
Find (lp-relevant) members for given object ids.
global $ilDB
$DIC
Definition: xapitoken.php:46