27include_once DOL_DOCUMENT_ROOT.
"/core/modules/DolibarrModules.class.php";
46 $this->numero = 55000;
48 $this->rights_class =
'opensurvey';
52 $this->family =
"portal";
53 $this->module_position =
'40';
55 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
57 $this->
description =
"Module to make online surveys (like Doodle, Studs, Rdvz, ...)";
59 $this->version =
'dolibarr';
61 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
65 $this->picto =
'poll';
68 $this->dirs = array();
73 $this->hidden =
false;
74 $this->depends = array();
75 $this->requiredby = array();
76 $this->conflictwith = array();
77 $this->phpmin = array(7, 0);
78 $this->need_dolibarr_version = array(3, 4, 0);
81 $this->
const = array();
84 $this->dictionaries = array();
87 $this->boxes = array();
98 $this->rights = array();
103 $this->rights[$r][0] = 55001;
104 $this->rights[$r][1] =
'Read surveys';
105 $this->rights[$r][2] =
'r';
106 $this->rights[$r][3] = 0;
107 $this->rights[$r][4] =
'read';
112 $this->rights[$r][0] = 55002;
113 $this->rights[$r][1] =
'Create/modify surveys';
114 $this->rights[$r][2] =
'w';
115 $this->rights[$r][3] = 0;
116 $this->rights[$r][4] =
'write';
123 $this->menu[$r] = array(
124 'fk_menu' =>
'fk_mainmenu=tools',
127 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
128 'mainmenu' =>
'tools',
129 'leftmenu' =>
'opensurvey',
130 'url' =>
'/opensurvey/list.php?mainmenu=tools&leftmenu=opensurvey',
131 'langs' =>
'opensurvey',
133 'enabled' =>
'isModEnabled("opensurvey")',
134 'perms' =>
'$user->hasRight("opensurvey", "read")',
140 $this->menu[$r] = array(
141 'fk_menu' =>
'fk_mainmenu=tools,fk_leftmenu=opensurvey',
143 'titre' =>
'NewSurvey',
144 'mainmenu' =>
'tools',
145 'leftmenu' =>
'opensurvey_new',
146 'url' =>
'/opensurvey/wizard/index.php',
147 'langs' =>
'opensurvey',
149 'enabled' =>
'isModEnabled("opensurvey")',
150 'perms' =>
'$user->hasRight("opensurvey", "write")',
156 $this->menu[$r] = array(
157 'fk_menu' =>
'fk_mainmenu=tools,fk_leftmenu=opensurvey',
160 'mainmenu' =>
'tools',
161 'leftmenu' =>
'opensurvey_list',
162 'url' =>
'/opensurvey/list.php',
163 'langs' =>
'opensurvey',
165 'enabled' =>
'isModEnabled("opensurvey")',
166 'perms' =>
'$user->hasRight("opensurvey", "read")',
181 public function init($options =
'')
183 $result = $this->
_load_tables(
'/install/mysql/',
'opensurvey');
189 $this->
remove($options);
193 return $this->
_init($sql, $options);
_init($array_sql, $options='')
Enables a module.
_load_tables($reldir, $onlywithsuffix='')
Create tables and keys required by module:
Description and activation class for module opensurvey.
init($options='')
Function called when module is enabled.
__construct($db)
Constructor.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
$conf db name
Only used if Module[ID]Name translation string is not found.