26include_once DOL_DOCUMENT_ROOT.
"/core/modules/DolibarrModules.class.php";
47 $this->numero = 55000;
49 $this->rights_class =
'opensurvey';
53 $this->family =
"portal";
54 $this->module_position =
'40';
56 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
58 $this->
description =
"Module to make online surveys (like Doodle, Studs, Rdvz, ...)";
60 $this->version =
'dolibarr';
62 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
66 $this->picto =
'poll';
69 $this->dirs = array();
74 $this->hidden =
false;
75 $this->depends = array();
76 $this->requiredby = array();
77 $this->conflictwith = array();
78 $this->phpmin = array(7, 0);
79 $this->need_dolibarr_version = array(3, 4, 0);
82 $this->
const = array();
85 $this->dictionaries = array();
88 $this->boxes = array();
99 $this->rights = array();
104 $this->rights[$r][0] = 55001;
105 $this->rights[$r][1] =
'Read surveys';
106 $this->rights[$r][2] =
'r';
107 $this->rights[$r][3] = 0;
108 $this->rights[$r][4] =
'read';
113 $this->rights[$r][0] = 55002;
114 $this->rights[$r][1] =
'Create/modify surveys';
115 $this->rights[$r][2] =
'w';
116 $this->rights[$r][3] = 0;
117 $this->rights[$r][4] =
'write';
124 $this->menu[$r] = array(
125 'fk_menu'=>
'fk_mainmenu=tools',
128 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
130 'leftmenu'=>
'opensurvey',
131 'url'=>
'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey',
132 'langs'=>
'opensurvey',
134 'enabled'=>
'$conf->opensurvey->enabled',
135 'perms'=>
'$user->rights->opensurvey->read',
141 $this->menu[$r] = array(
142 'fk_menu'=>
'fk_mainmenu=tools,fk_leftmenu=opensurvey',
144 'titre'=>
'NewSurvey',
146 'leftmenu'=>
'opensurvey_new',
147 'url'=>
'/opensurvey/wizard/index.php',
148 'langs'=>
'opensurvey',
150 'enabled'=>
'$conf->opensurvey->enabled',
151 'perms'=>
'$user->rights->opensurvey->write',
157 $this->menu[$r] = array(
158 'fk_menu'=>
'fk_mainmenu=tools,fk_leftmenu=opensurvey',
162 'leftmenu'=>
'opensurvey_list',
163 'url'=>
'/opensurvey/list.php',
164 'langs'=>
'opensurvey',
166 'enabled'=>
'$conf->opensurvey->enabled',
167 'perms'=>
'$user->rights->opensurvey->read',
182 public function init($options =
'')
184 global $conf, $langs;
186 $result = $this->
_load_tables(
'/install/mysql/',
'opensurvey');
192 $this->
remove($options);
196 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.