26include_once DOL_DOCUMENT_ROOT.
"/core/modules/DolibarrModules.class.php";
48 $this->numero = 55000;
50 $this->rights_class =
'opensurvey';
54 $this->family =
"portal";
55 $this->module_position =
'40';
57 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
59 $this->
description =
"Module to make online surveys (like Doodle, Studs, Rdvz, ...)";
61 $this->version =
'dolibarr';
63 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
67 $this->picto =
'poll';
70 $this->dirs = array();
75 $this->hidden =
false;
76 $this->depends = array();
77 $this->requiredby = array();
78 $this->conflictwith = array();
79 $this->phpmin = array(7, 0);
80 $this->need_dolibarr_version = array(3, 4, 0);
83 $this->
const = array();
86 $this->dictionaries = array();
89 $this->boxes = array();
100 $this->rights = array();
105 $this->rights[$r][0] = 55001;
106 $this->rights[$r][1] =
'Read surveys';
107 $this->rights[$r][2] =
'r';
108 $this->rights[$r][3] = 0;
109 $this->rights[$r][4] =
'read';
114 $this->rights[$r][0] = 55002;
115 $this->rights[$r][1] =
'Create/modify surveys';
116 $this->rights[$r][2] =
'w';
117 $this->rights[$r][3] = 0;
118 $this->rights[$r][4] =
'write';
125 $this->menu[$r] = array(
126 'fk_menu'=>
'fk_mainmenu=tools',
129 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
131 'leftmenu'=>
'opensurvey',
132 'url'=>
'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey',
133 'langs'=>
'opensurvey',
135 'enabled'=>
'$conf->opensurvey->enabled',
136 'perms'=>
'$user->rights->opensurvey->read',
142 $this->menu[$r] = array(
143 'fk_menu'=>
'fk_mainmenu=tools,fk_leftmenu=opensurvey',
145 'titre'=>
'NewSurvey',
147 'leftmenu'=>
'opensurvey_new',
148 'url'=>
'/opensurvey/wizard/index.php',
149 'langs'=>
'opensurvey',
151 'enabled'=>
'$conf->opensurvey->enabled',
152 'perms'=>
'$user->rights->opensurvey->write',
158 $this->menu[$r] = array(
159 'fk_menu'=>
'fk_mainmenu=tools,fk_leftmenu=opensurvey',
163 'leftmenu'=>
'opensurvey_list',
164 'url'=>
'/opensurvey/list.php',
165 'langs'=>
'opensurvey',
167 'enabled'=>
'$conf->opensurvey->enabled',
168 'perms'=>
'$user->rights->opensurvey->read',
183 public function init($options =
'')
185 global $conf, $langs;
187 $result = $this->
_load_tables(
'/install/mysql/',
'opensurvey');
193 $this->
remove($options);
197 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=false, $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.