ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 $ilDB;
45 
46  // if active id
47  $set = $ilDB->query("SELECT ss.obj_fi".
48  " FROM svy_finished sf".
49  " JOIN svy_svy ss ON (ss.survey_id = sf.survey_fi)".
50  " WHERE ".$ilDB->in("ss.obj_fi", $a_obj_ids, "", "integer").
51  " AND sf.user_fi = ".$ilDB->quote($a_usr_id, "integer"));
52  while($row = $ilDB->fetchAssoc($set))
53  {
54  $a_res[$row["obj_fi"]] = true;
55  }
56 
57  return true;
58  }
59 }
60 
61 ?>
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