ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
4 include_once "Services/Object/classes/class.ilObjectLP.php";
5 
13 class ilSurveyLP extends ilObjectLP
14 {
15  public static function getDefaultModes($a_lp_active)
16  {
17  return array(
20  );
21  }
22 
23  public function getDefaultMode()
24  {
25  return ilLPObjSettings::LP_MODE_DEACTIVATED; // :TODO:
26  }
27 
28  public function getValidModes()
29  {
30  return array(
33  );
34  }
35 
36  public function isAnonymized()
37  {
38  include_once './Modules/Survey/classes/class.ilObjSurveyAccess.php';
39  return (bool) ilObjSurveyAccess::_lookupAnonymize($this->obj_id);
40  }
41 
42  protected static function isLPMember(array &$a_res, $a_usr_id, $a_obj_ids)
43  {
44  global $DIC;
45 
46  $ilDB = $DIC->database();
47 
48  // if active id
49  $set = $ilDB->query("SELECT ss.obj_fi" .
50  " FROM svy_finished sf" .
51  " JOIN svy_svy ss ON (ss.survey_id = sf.survey_fi)" .
52  " WHERE " . $ilDB->in("ss.obj_fi", $a_obj_ids, "", "integer") .
53  " AND sf.user_fi = " . $ilDB->quote($a_usr_id, "integer"));
54  while ($row = $ilDB->fetchAssoc($set)) {
55  $a_res[$row["obj_fi"]] = true;
56  }
57 
58  return true;
59  }
60 }
global $DIC
Definition: saml.php:7
static isLPMember(array &$a_res, $a_usr_id, $a_obj_ids)
static _lookupAnonymize($a_obj_id)
static getDefaultModes($a_lp_active)
Create styles array
The data for the language used.
global $ilDB