db_main.sql 144 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028
  1. -- MySQL dump 10.9
  2. --
  3. -- Host: localhost Database: chamilo_main
  4. -- ------------------------------------------------------
  5. -- Server version 4.1.14
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!40101 SET NAMES utf8 */;
  10. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  11. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  12. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  13. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  14. --
  15. -- Table structure for table user
  16. --
  17. DROP TABLE IF EXISTS user;
  18. CREATE TABLE IF NOT EXISTS user (
  19. user_id int unsigned NOT NULL auto_increment,
  20. lastname varchar(60) default NULL,
  21. firstname varchar(60) default NULL,
  22. username varchar(100) NOT NULL default '',
  23. password varchar(50) NOT NULL default '',
  24. auth_source varchar(50) default 'platform',
  25. email varchar(100) default NULL,
  26. status tinyint NOT NULL default '5',
  27. official_code varchar(40) default NULL,
  28. phone varchar(30) default NULL,
  29. picture_uri varchar(250) default NULL,
  30. creator_id int unsigned default NULL,
  31. competences text,
  32. diplomas text,
  33. openarea text,
  34. teach text,
  35. productions varchar(250) default NULL,
  36. chatcall_user_id int unsigned NOT NULL default '0',
  37. chatcall_date datetime NOT NULL default '0000-00-00 00:00:00',
  38. chatcall_text varchar(50) NOT NULL default '',
  39. language varchar(40) default NULL,
  40. registration_date datetime NOT NULL default '0000-00-00 00:00:00',
  41. expiration_date datetime NOT NULL default '0000-00-00 00:00:00',
  42. active tinyint unsigned NOT NULL default 1,
  43. openid varchar(255) DEFAULT NULL,
  44. theme varchar(255) DEFAULT NULL,
  45. hr_dept_id smallint unsigned NOT NULL default 0,
  46. PRIMARY KEY (user_id),
  47. UNIQUE KEY username (username)
  48. );
  49. ALTER TABLE user ADD INDEX (status);
  50. --
  51. -- Dumping data for table user
  52. --
  53. /*!40000 ALTER TABLE user DISABLE KEYS */;
  54. LOCK TABLES user WRITE;
  55. INSERT INTO user (lastname, firstname, username, password, auth_source, email, status, official_code,phone, creator_id, registration_date, expiration_date,active,openid,language) VALUES ('{ADMINLASTNAME}','{ADMINFIRSTNAME}','{ADMINLOGIN}','{ADMINPASSWORD}','{PLATFORM_AUTH_SOURCE}','{ADMINEMAIL}',1,'ADMIN','{ADMINPHONE}',1,NOW(),'0000-00-00 00:00:00','1',NULL,'{ADMINLANGUAGE}');
  56. -- Insert anonymous user
  57. INSERT INTO user (lastname, firstname, username, password, auth_source, email, status, official_code, creator_id, registration_date, expiration_date,active,openid,language) VALUES ('Anonymous', 'Joe', '', '', 'platform', 'anonymous@localhost', 6, 'anonymous', 1, NOW(), '0000-00-00 00:00:00', 1,NULL,'{ADMINLANGUAGE}');
  58. UNLOCK TABLES;
  59. /*!40000 ALTER TABLE user ENABLE KEYS */;
  60. --
  61. -- Table structure for table admin
  62. --
  63. DROP TABLE IF EXISTS admin;
  64. CREATE TABLE IF NOT EXISTS admin (
  65. id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  66. user_id int unsigned NOT NULL default '0',
  67. UNIQUE KEY user_id (user_id)
  68. );
  69. --
  70. -- Dumping data for table admin
  71. --
  72. /*!40000 ALTER TABLE admin DISABLE KEYS */;
  73. LOCK TABLES admin WRITE;
  74. INSERT INTO admin VALUES (1, 1);
  75. UNLOCK TABLES;
  76. /*!40000 ALTER TABLE admin ENABLE KEYS */;
  77. --
  78. -- Table structure for table class
  79. --
  80. DROP TABLE IF EXISTS class;
  81. CREATE TABLE IF NOT EXISTS class (
  82. id mediumint unsigned NOT NULL auto_increment,
  83. code varchar(40) default '',
  84. name text NOT NULL,
  85. PRIMARY KEY (id)
  86. );
  87. --
  88. -- Dumping data for table class
  89. --
  90. /*!40000 ALTER TABLE class DISABLE KEYS */;
  91. LOCK TABLES class WRITE;
  92. UNLOCK TABLES;
  93. /*!40000 ALTER TABLE class ENABLE KEYS */;
  94. --
  95. -- Table structure for table class_user
  96. --
  97. DROP TABLE IF EXISTS class_user;
  98. CREATE TABLE IF NOT EXISTS class_user (
  99. class_id mediumint unsigned NOT NULL default '0',
  100. user_id int unsigned NOT NULL default '0',
  101. PRIMARY KEY (class_id,user_id)
  102. );
  103. --
  104. -- Dumping data for table class_user
  105. --
  106. /*!40000 ALTER TABLE class_user DISABLE KEYS */;
  107. LOCK TABLES class_user WRITE;
  108. UNLOCK TABLES;
  109. /*!40000 ALTER TABLE class_user ENABLE KEYS */;
  110. --
  111. -- Table structure for table course
  112. --
  113. DROP TABLE IF EXISTS course;
  114. CREATE TABLE IF NOT EXISTS course (
  115. id int auto_increment,
  116. code varchar(40) NOT NULL,
  117. directory varchar(40) default NULL,
  118. db_name varchar(40) default NULL,
  119. course_language varchar(20) default NULL,
  120. title varchar(250) default NULL,
  121. description text,
  122. category_code varchar(40) default NULL,
  123. visibility tinyint default '0',
  124. show_score int NOT NULL default '1',
  125. tutor_name varchar(200) default NULL,
  126. visual_code varchar(40) default NULL,
  127. department_name varchar(30) default NULL,
  128. department_url varchar(180) default NULL,
  129. disk_quota bigint unsigned default NULL,
  130. last_visit datetime default NULL,
  131. last_edit datetime default NULL,
  132. creation_date datetime default NULL,
  133. expiration_date datetime default NULL,
  134. target_course_code varchar(40) default NULL,
  135. subscribe tinyint NOT NULL default '1',
  136. unsubscribe tinyint NOT NULL default '1',
  137. registration_code varchar(255) NOT NULL default '',
  138. legal TEXT NOT NULL,
  139. activate_legal INT NOT NULL DEFAULT 0,
  140. PRIMARY KEY (id),
  141. UNIQUE KEY code (code)
  142. );
  143. ALTER TABLE course ADD INDEX idx_course_category_code (category_code);
  144. ALTER TABLE course ADD INDEX idx_course_directory (directory(10));
  145. --
  146. -- Dumping data for table course
  147. --
  148. /*!40000 ALTER TABLE course DISABLE KEYS */;
  149. LOCK TABLES course WRITE;
  150. UNLOCK TABLES;
  151. /*!40000 ALTER TABLE course ENABLE KEYS */;
  152. --
  153. -- Table structure for table course_category
  154. --
  155. DROP TABLE IF EXISTS course_category;
  156. CREATE TABLE IF NOT EXISTS course_category (
  157. id int unsigned NOT NULL auto_increment,
  158. name varchar(100) NOT NULL default '',
  159. code varchar(40) NOT NULL default '',
  160. parent_id varchar(40) default NULL,
  161. tree_pos int unsigned default NULL,
  162. children_count smallint default NULL,
  163. auth_course_child enum('TRUE','FALSE') default 'TRUE',
  164. auth_cat_child enum('TRUE','FALSE') default 'TRUE',
  165. PRIMARY KEY (id),
  166. UNIQUE KEY code (code),
  167. KEY parent_id (parent_id),
  168. KEY tree_pos (tree_pos)
  169. );
  170. --
  171. -- Dumping data for table course_category
  172. --
  173. /*!40000 ALTER TABLE course_category DISABLE KEYS */;
  174. LOCK TABLES course_category WRITE;
  175. INSERT INTO course_category VALUES (1,'Language skills','LANG',NULL,1,0,'TRUE','TRUE'),(2,'PC Skills','PC',NULL,2,0,'TRUE','TRUE'),(3,'Projects','PROJ',NULL,3,0,'TRUE','TRUE');
  176. UNLOCK TABLES;
  177. /*!40000 ALTER TABLE course_category ENABLE KEYS */;
  178. --
  179. -- Table structure for table course_field
  180. --
  181. DROP TABLE IF EXISTS course_field;
  182. CREATE TABLE IF NOT EXISTS course_field (
  183. id int NOT NULL auto_increment,
  184. field_type int NOT NULL default 1,
  185. field_variable varchar(64) NOT NULL,
  186. field_display_text varchar(64),
  187. field_default_value text,
  188. field_order int,
  189. field_visible tinyint default 0,
  190. field_changeable tinyint default 0,
  191. field_filter tinyint default 0,
  192. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  193. PRIMARY KEY(id)
  194. );
  195. --
  196. -- Table structure for table course_field_values
  197. --
  198. DROP TABLE IF EXISTS course_field_values;
  199. CREATE TABLE IF NOT EXISTS course_field_values(
  200. id int NOT NULL auto_increment,
  201. course_code varchar(40) NOT NULL,
  202. field_id int NOT NULL,
  203. field_value text,
  204. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  205. PRIMARY KEY(id)
  206. );
  207. --
  208. -- Table structure for table course_module
  209. --
  210. DROP TABLE IF EXISTS course_module;
  211. CREATE TABLE IF NOT EXISTS course_module (
  212. id int unsigned NOT NULL auto_increment,
  213. name varchar(255) NOT NULL,
  214. link varchar(255) NOT NULL,
  215. image varchar(100) default NULL,
  216. `row` int unsigned NOT NULL default '0',
  217. `column` int unsigned NOT NULL default '0',
  218. position varchar(20) NOT NULL default 'basic',
  219. PRIMARY KEY (id)
  220. );
  221. --
  222. -- Dumping data for table course_module
  223. --
  224. /*!40000 ALTER TABLE course_module DISABLE KEYS */;
  225. LOCK TABLES course_module WRITE;
  226. INSERT INTO course_module VALUES
  227. (1,'calendar_event','calendar/agenda.php','agenda.gif',1,1,'basic'),
  228. (2,'link','link/link.php','links.gif',4,1,'basic'),
  229. (3,'document','document/document.php','documents.gif',3,1,'basic'),
  230. (4,'student_publication','work/work.php','works.gif',3,2,'basic'),
  231. (5,'announcement','announcements/announcements.php','valves.gif',2,1,'basic'),
  232. (6,'user','user/user.php','members.gif',2,3,'basic'),
  233. (7,'forum','forum/index.php','forum.gif',1,2,'basic'),
  234. (8,'quiz','exercice/exercice.php','quiz.gif',2,2,'basic'),
  235. (9,'group','group/group.php','group.gif',3,3,'basic'),
  236. (10,'course_description','course_description/','info.gif',1,3,'basic'),
  237. (11,'chat','chat/chat.php','chat.gif',0,0,'external'),
  238. (12,'dropbox','dropbox/index.php','dropbox.gif',4,2,'basic'),
  239. (13,'tracking','tracking/courseLog.php','statistics.gif',1,3,'courseadmin'),
  240. (14,'homepage_link','link/link.php?action=addlink','npage.gif',1,1,'courseadmin'),
  241. (15,'course_setting','course_info/infocours.php','reference.gif',1,1,'courseadmin'),
  242. (16,'External','','external.gif',0,0,'external'),
  243. (17,'AddedLearnpath','','scormbuilder.gif',0,0,'external'),
  244. (18,'conference','conference/index.php?type=conference','conf.gif',0,0,'external'),
  245. (19,'conference','conference/index.php?type=classroom','conf.gif',0,0,'external'),
  246. (20,'learnpath','newscorm/lp_controller.php','scorms.gif',5,1,'basic'),
  247. (21,'blog','blog/blog.php','blog.gif',1,2,'basic'),
  248. (22,'blog_management','blog/blog_admin.php','blog_admin.gif',1,2,'courseadmin'),
  249. (23,'course_maintenance','course_info/maintenance.php','backup.gif',2,3,'courseadmin'),
  250. (24,'survey','survey/survey_list.php','survey.gif',2,1,'basic'),
  251. (25,'wiki','wiki/index.php','wiki.gif',2,3,'basic'),
  252. (26,'gradebook','gradebook/index.php','gradebook.gif',2,2,'basic'),
  253. (27,'glossary','glossary/index.php','glossary.gif',2,1,'basic'),
  254. (28,'notebook','notebook/index.php','notebook.gif',2,1,'basic'),
  255. (29,'attendance','attendance/index.php','attendance.gif',2,1,'basic'),
  256. (30,'course_progress','course_progress/index.php','course_progress.gif',2,1,'basic');
  257. UNLOCK TABLES;
  258. /*!40000 ALTER TABLE course_module ENABLE KEYS */;
  259. --
  260. -- Table structure for table course_rel_class
  261. --
  262. DROP TABLE IF EXISTS course_rel_class;
  263. CREATE TABLE IF NOT EXISTS course_rel_class (
  264. course_code char(40) NOT NULL,
  265. class_id mediumint unsigned NOT NULL,
  266. PRIMARY KEY (course_code,class_id)
  267. );
  268. --
  269. -- Dumping data for table course_rel_class
  270. --
  271. /*!40000 ALTER TABLE course_rel_class DISABLE KEYS */;
  272. LOCK TABLES course_rel_class WRITE;
  273. UNLOCK TABLES;
  274. /*!40000 ALTER TABLE course_rel_class ENABLE KEYS */;
  275. --
  276. -- Table structure for table course_rel_user
  277. --
  278. DROP TABLE IF EXISTS course_rel_user;
  279. CREATE TABLE IF NOT EXISTS course_rel_user (
  280. course_code varchar(40) NOT NULL,
  281. user_id int unsigned NOT NULL default '0',
  282. status tinyint NOT NULL default '5',
  283. role varchar(60) default NULL,
  284. group_id int NOT NULL default '0',
  285. tutor_id int unsigned NOT NULL default '0',
  286. sort int default NULL,
  287. user_course_cat int default '0',
  288. relation_type int default 0,
  289. legal_agreement INTEGER DEFAULT 0,
  290. PRIMARY KEY (course_code,user_id,relation_type)
  291. );
  292. ALTER TABLE course_rel_user ADD INDEX (user_id);
  293. --
  294. -- Dumping data for table course_rel_user
  295. --
  296. /*!40000 ALTER TABLE course_rel_user DISABLE KEYS */;
  297. LOCK TABLES course_rel_user WRITE;
  298. UNLOCK TABLES;
  299. /*!40000 ALTER TABLE course_rel_user ENABLE KEYS */;
  300. --
  301. -- Table structure for table language
  302. --
  303. DROP TABLE IF EXISTS language;
  304. CREATE TABLE IF NOT EXISTS language (
  305. id tinyint unsigned NOT NULL auto_increment,
  306. original_name varchar(255) default NULL,
  307. english_name varchar(255) default NULL,
  308. isocode varchar(10) default NULL,
  309. dokeos_folder varchar(250) default NULL,
  310. available tinyint NOT NULL default 1,
  311. parent_id tinyint unsigned,
  312. PRIMARY KEY (id)
  313. );
  314. ALTER TABLE language ADD INDEX idx_language_dokeos_folder(dokeos_folder);
  315. --
  316. -- Dumping data for table language
  317. --
  318. /*!40000 ALTER TABLE language DISABLE KEYS */;
  319. LOCK TABLES language WRITE;
  320. INSERT INTO language (original_name, english_name, isocode, dokeos_folder, available) VALUES
  321. ('العربية','arabic','ar','arabic',0),
  322. ('Asturianu','asturian','ast','asturian',0),
  323. ('বাংলা','bengali','bn','bengali',0),
  324. ('Български','bulgarian','bg','bulgarian',1),
  325. ('Bosanski','bosnian','bs','bosnian',1),
  326. ('Català','catalan','ca','catalan',0),
  327. ('中文(简体)','simpl_chinese','zh','simpl_chinese',0),
  328. ('繁體中文','trad_chinese','zh-TW','trad_chinese',0),
  329. ('Česky','czech','cs','czech',0),
  330. ('Dansk','danish','da','danish',0),
  331. ('دری','dari','prs','dari',0),
  332. ('Deutsch','german','de','german',1),
  333. ('Ελληνικά','greek','el','greek',0),
  334. ('English','english','en','english',1),
  335. ('Español','spanish','es','spanish',1),
  336. ('Esperanto','esperanto','eo','esperanto',0),
  337. ('Euskara','basque','eu','basque',0),
  338. ('فارسی','persian','fa','persian',0),
  339. ('Français','french','fr','french',1),
  340. ('Furlan','friulian','fur','friulian',0),
  341. ('Galego','galician','gl','galician',0),
  342. ('ქართული','georgian','ka','georgian',0),
  343. ('Hrvatski','croatian','hr','croatian',0),
  344. ('עברית','hebrew','he','hebrew',0),
  345. ('हिन्दी','hindi','hi','hindi',0),
  346. ('Bahasa Indonesia','indonesian','id','indonesian',1),
  347. ('Italiano','italian','it','italian',1),
  348. ('한국어','korean','ko','korean',0),
  349. ('Latviešu','latvian','lv','latvian',0),
  350. ('Lietuvių','lithuanian','lt','lithuanian',0),
  351. ('Македонски','macedonian','mk','macedonian',0),
  352. ('Magyar','hungarian','hu','hungarian',1),
  353. ('Bahasa Melayu','malay','ms','malay',0),
  354. ('Nederlands','dutch','nl','dutch',1),
  355. ('日本語','japanese','ja','japanese',0),
  356. ('Norsk','norwegian','no','norwegian',0),
  357. ('Occitan','occitan','oc','occitan',0),
  358. ('پښتو','pashto','ps','pashto',0),
  359. ('Polski','polish','pl','polish',0),
  360. ('Português europeu','portuguese','pt','portuguese',1),
  361. ('Português do Brasil','brazilian','pt-BR','brazilian',1),
  362. ('Română','romanian','ro','romanian',0),
  363. ('Runasimi','quechua_cusco','qu','quechua_cusco',0),
  364. ('Русский','russian','ru','russian',0),
  365. ('Slovenčina','slovak','sk','slovak',0),
  366. ('Slovenščina','slovenian','sl','slovenian',1),
  367. ('الصومالية','somali','so','somali',0),
  368. ('Srpski','serbian','sr','serbian',0),
  369. ('Suomi','finnish','fi','finnish',0),
  370. ('Svenska','swedish','sv','swedish',0),
  371. ('ไทย','thai','th','thai',0),
  372. ('Türkçe','turkish','tr','turkish',0),
  373. ('Українська','ukrainian','uk','ukrainian',0),
  374. ('Tiếng Việt','vietnamese','vi','vietnamese',0),
  375. ('Kiswahili','swahili','sw','swahili',0),
  376. ('Yorùbá','yoruba','yo','yoruba',0);
  377. -- The chosen during the installation platform language should be enabled.
  378. UPDATE language SET available=1 WHERE dokeos_folder = '{PLATFORMLANGUAGE}';
  379. UNLOCK TABLES;
  380. /*!40000 ALTER TABLE language ENABLE KEYS */;
  381. --
  382. -- Table structure for table php_session
  383. --
  384. DROP TABLE IF EXISTS php_session;
  385. CREATE TABLE IF NOT EXISTS php_session (
  386. session_id varchar(32) NOT NULL default '',
  387. session_name varchar(10) NOT NULL default '',
  388. session_time int NOT NULL default '0',
  389. session_start int NOT NULL default '0',
  390. session_value mediumtext NOT NULL,
  391. PRIMARY KEY (session_id)
  392. );
  393. --
  394. -- Table structure for table session
  395. --
  396. DROP TABLE IF EXISTS session;
  397. CREATE TABLE IF NOT EXISTS session (
  398. id smallint unsigned NOT NULL auto_increment,
  399. id_coach int unsigned NOT NULL default '0',
  400. name char(50) NOT NULL default '',
  401. nbr_courses smallint unsigned NOT NULL default '0',
  402. nbr_users mediumint unsigned NOT NULL default '0',
  403. nbr_classes mediumint unsigned NOT NULL default '0',
  404. date_start date NOT NULL default '0000-00-00',
  405. date_end date NOT NULL default '0000-00-00',
  406. nb_days_access_before_beginning TINYINT UNSIGNED NULL default '0',
  407. nb_days_access_after_end TINYINT UNSIGNED NULL default '0',
  408. session_admin_id INT UNSIGNED NOT NULL,
  409. visibility int NOT NULL default 1,
  410. session_category_id int NOT NULL,
  411. promotion_id INT NOT NULL,
  412. PRIMARY KEY (id),
  413. INDEX (session_admin_id),
  414. UNIQUE KEY name (name)
  415. );
  416. -- --------------------------------------------------------
  417. --
  418. -- Table structure for table session_rel_course
  419. --
  420. DROP TABLE IF EXISTS session_rel_course;
  421. CREATE TABLE IF NOT EXISTS session_rel_course (
  422. id_session smallint unsigned NOT NULL default '0',
  423. course_code char(40) NOT NULL default '',
  424. nbr_users smallint unsigned NOT NULL default '0',
  425. PRIMARY KEY (id_session,course_code),
  426. KEY course_code (course_code)
  427. );
  428. -- --------------------------------------------------------
  429. --
  430. -- Table structure for table session_rel_course_rel_user
  431. --
  432. DROP TABLE IF EXISTS session_rel_course_rel_user;
  433. CREATE TABLE IF NOT EXISTS session_rel_course_rel_user (
  434. id_session smallint unsigned NOT NULL default '0',
  435. course_code char(40) NOT NULL default '',
  436. id_user int unsigned NOT NULL default '0',
  437. visibility int NOT NULL default 1,
  438. status int NOT NULL default 0,
  439. legal_agreement INTEGER DEFAULT 0,
  440. PRIMARY KEY (id_session,course_code,id_user),
  441. KEY id_user (id_user),
  442. KEY course_code (course_code)
  443. );
  444. -- --------------------------------------------------------
  445. --
  446. -- Table structure for table session_rel_user
  447. --
  448. DROP TABLE IF EXISTS session_rel_user;
  449. CREATE TABLE IF NOT EXISTS session_rel_user (
  450. id_session mediumint unsigned NOT NULL default '0',
  451. id_user mediumint unsigned NOT NULL default '0',
  452. relation_type int default 0,
  453. PRIMARY KEY (id_session, id_user, relation_type)
  454. );
  455. DROP TABLE IF EXISTS session_field;
  456. CREATE TABLE IF NOT EXISTS session_field (
  457. id int NOT NULL auto_increment,
  458. field_type int NOT NULL default 1,
  459. field_variable varchar(64) NOT NULL,
  460. field_display_text varchar(64),
  461. field_default_value text,
  462. field_order int,
  463. field_visible tinyint default 0,
  464. field_changeable tinyint default 0,
  465. field_filter tinyint default 0,
  466. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  467. PRIMARY KEY(id)
  468. );
  469. DROP TABLE IF EXISTS session_field_values;
  470. CREATE TABLE IF NOT EXISTS session_field_values(
  471. id int NOT NULL auto_increment,
  472. session_id int NOT NULL,
  473. field_id int NOT NULL,
  474. field_value text,
  475. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  476. PRIMARY KEY(id)
  477. );
  478. --
  479. -- Table structure for table settings_current
  480. --
  481. DROP TABLE IF EXISTS settings_current;
  482. CREATE TABLE IF NOT EXISTS settings_current (
  483. id int unsigned NOT NULL auto_increment,
  484. variable varchar(255) default NULL,
  485. subkey varchar(255) default NULL,
  486. type varchar(255) default NULL,
  487. category varchar(255) default NULL,
  488. selected_value varchar(255) default NULL,
  489. title varchar(255) NOT NULL default '',
  490. comment varchar(255) default NULL,
  491. scope varchar(50) default NULL,
  492. subkeytext varchar(255) default NULL,
  493. access_url int unsigned not null default 1,
  494. access_url_changeable int unsigned not null default 0,
  495. access_url_locked int not null default 0,
  496. PRIMARY KEY id (id),
  497. INDEX (access_url)
  498. );
  499. ALTER TABLE settings_current ADD UNIQUE unique_setting (variable(110), subkey(110), category(110), access_url);
  500. --
  501. -- Dumping data for table settings_current
  502. --
  503. /*!40000 ALTER TABLE settings_current DISABLE KEYS */;
  504. LOCK TABLES settings_current WRITE;
  505. INSERT INTO settings_current
  506. (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
  507. VALUES
  508. ('Institution',NULL,'textfield','Platform','{ORGANISATIONNAME}','InstitutionTitle','InstitutionComment','platform',NULL, 1),
  509. ('InstitutionUrl',NULL,'textfield','Platform','{ORGANISATIONURL}','InstitutionUrlTitle','InstitutionUrlComment',NULL,NULL, 1),
  510. ('siteName',NULL,'textfield','Platform','{CAMPUSNAME}','SiteNameTitle','SiteNameComment',NULL,NULL, 1),
  511. ('emailAdministrator',NULL,'textfield','Platform','{ADMINEMAIL}','emailAdministratorTitle','emailAdministratorComment',NULL,NULL, 1),
  512. ('administratorSurname',NULL,'textfield','Platform','{ADMINLASTNAME}','administratorSurnameTitle','administratorSurnameComment',NULL,NULL, 1),
  513. ('administratorName',NULL,'textfield','Platform','{ADMINFIRSTNAME}','administratorNameTitle','administratorNameComment',NULL,NULL, 1),
  514. ('show_administrator_data',NULL,'radio','Platform','true','ShowAdministratorDataTitle','ShowAdministratorDataComment',NULL,NULL, 1),
  515. ('show_tutor_data',NULL,'radio','Session','true','ShowTutorDataTitle','ShowTutorDataComment',NULL,NULL, 1),
  516. ('show_teacher_data',NULL,'radio','Platform','true','ShowTeacherDataTitle','ShowTeacherDataComment',NULL,NULL, 1),
  517. ('homepage_view',NULL,'radio','Course','activity_big','HomepageViewTitle','HomepageViewComment',NULL,NULL, 1),
  518. ('show_toolshortcuts',NULL,'radio','Course','false','ShowToolShortcutsTitle','ShowToolShortcutsComment',NULL,NULL, 0),
  519. ('allow_group_categories',NULL,'radio','Course','false','AllowGroupCategories','AllowGroupCategoriesComment',NULL,NULL, 0),
  520. ('server_type',NULL,'radio','Platform','production','ServerStatusTitle','ServerStatusComment',NULL,NULL, 0),
  521. ('platformLanguage',NULL,'link','Languages','{PLATFORMLANGUAGE}','PlatformLanguageTitle','PlatformLanguageComment',NULL,NULL, 0),
  522. ('showonline','world','checkbox','Platform','true','ShowOnlineTitle','ShowOnlineComment',NULL,'ShowOnlineWorld', 0),
  523. ('showonline','users','checkbox','Platform','true','ShowOnlineTitle','ShowOnlineComment',NULL,'ShowOnlineUsers', 0),
  524. ('showonline','course','checkbox','Platform','true','ShowOnlineTitle','ShowOnlineComment',NULL,'ShowOnlineCourse', 0),
  525. ('profile','name','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'name', 0),
  526. ('profile','officialcode','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'officialcode', 0),
  527. ('profile','email','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'Email', 0),
  528. ('profile','picture','checkbox','User','true','ProfileChangesTitle','ProfileChangesComment',NULL,'UserPicture', 0),
  529. ('profile','login','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'Login', 0),
  530. ('profile','password','checkbox','User','true','ProfileChangesTitle','ProfileChangesComment',NULL,'UserPassword', 0),
  531. ('profile','language','checkbox','User','true','ProfileChangesTitle','ProfileChangesComment',NULL,'Language', 0),
  532. ('default_document_quotum',NULL,'textfield','Course','100000000','DefaultDocumentQuotumTitle','DefaultDocumentQuotumComment',NULL,NULL, 0),
  533. ('registration','officialcode','checkbox','User','false','RegistrationRequiredFormsTitle','RegistrationRequiredFormsComment',NULL,'OfficialCode', 0),
  534. ('registration','email','checkbox','User','true','RegistrationRequiredFormsTitle','RegistrationRequiredFormsComment',NULL,'Email', 0),
  535. ('registration','language','checkbox','User','true','RegistrationRequiredFormsTitle','RegistrationRequiredFormsComment',NULL,'Language', 0),
  536. ('default_group_quotum',NULL,'textfield','Course','5000000','DefaultGroupQuotumTitle','DefaultGroupQuotumComment',NULL,NULL, 0),
  537. ('allow_registration',NULL,'radio','Platform','{ALLOWSELFREGISTRATION}','AllowRegistrationTitle','AllowRegistrationComment',NULL,NULL, 0),
  538. ('allow_registration_as_teacher',NULL,'radio','Platform','{ALLOWTEACHERSELFREGISTRATION}','AllowRegistrationAsTeacherTitle','AllowRegistrationAsTeacherComment',NULL,NULL, 0),
  539. ('allow_lostpassword',NULL,'radio','Platform','true','AllowLostPasswordTitle','AllowLostPasswordComment',NULL,NULL, 0),
  540. ('allow_user_headings',NULL,'radio','Course','false','AllowUserHeadings','AllowUserHeadingsComment',NULL,NULL, 0),
  541. ('course_create_active_tools','course_description','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'CourseDescription', 0),
  542. ('course_create_active_tools','agenda','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Agenda', 0),
  543. ('course_create_active_tools','documents','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Documents', 0),
  544. ('course_create_active_tools','learning_path','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'LearningPath', 0),
  545. ('course_create_active_tools','links','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Links', 0),
  546. ('course_create_active_tools','announcements','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Announcements', 0),
  547. ('course_create_active_tools','forums','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Forums', 0),
  548. ('course_create_active_tools','dropbox','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Dropbox', 0),
  549. ('course_create_active_tools','quiz','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Quiz', 0),
  550. ('course_create_active_tools','users','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Users', 0),
  551. ('course_create_active_tools','groups','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Groups', 0),
  552. ('course_create_active_tools','chat','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Chat', 0),
  553. ('course_create_active_tools','online_conference','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'OnlineConference', 0),
  554. ('course_create_active_tools','student_publications','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'StudentPublications', 0),
  555. ('allow_personal_agenda',NULL,'radio','User','true','AllowPersonalAgendaTitle','AllowPersonalAgendaComment',NULL,NULL, 0),
  556. ('display_coursecode_in_courselist',NULL,'radio','Platform','false','DisplayCourseCodeInCourselistTitle','DisplayCourseCodeInCourselistComment',NULL,NULL, 0),
  557. ('display_teacher_in_courselist',NULL,'radio','Platform','true','DisplayTeacherInCourselistTitle','DisplayTeacherInCourselistComment',NULL,NULL, 0),
  558. ('permanently_remove_deleted_files',NULL,'radio','Tools','false','PermanentlyRemoveFilesTitle','PermanentlyRemoveFilesComment',NULL,NULL, 0),
  559. ('dropbox_allow_overwrite',NULL,'radio','Tools','true','DropboxAllowOverwriteTitle','DropboxAllowOverwriteComment',NULL,NULL, 0),
  560. ('dropbox_max_filesize',NULL,'textfield','Tools','100000000','DropboxMaxFilesizeTitle','DropboxMaxFilesizeComment',NULL,NULL, 0),
  561. ('dropbox_allow_just_upload',NULL,'radio','Tools','true','DropboxAllowJustUploadTitle','DropboxAllowJustUploadComment',NULL,NULL, 0),
  562. ('dropbox_allow_student_to_student',NULL,'radio','Tools','true','DropboxAllowStudentToStudentTitle','DropboxAllowStudentToStudentComment',NULL,NULL, 0),
  563. ('dropbox_allow_group',NULL,'radio','Tools','true','DropboxAllowGroupTitle','DropboxAllowGroupComment',NULL,NULL, 0),
  564. ('dropbox_allow_mailing',NULL,'radio','Tools','false','DropboxAllowMailingTitle','DropboxAllowMailingComment',NULL,NULL, 0),
  565. ('administratorTelephone',NULL,'textfield','Platform','(000) 001 02 03','administratorTelephoneTitle','administratorTelephoneComment',NULL,NULL, 1),
  566. ('extended_profile',NULL,'radio','User','false','ExtendedProfileTitle','ExtendedProfileComment',NULL,NULL, 0),
  567. ('student_view_enabled',NULL,'radio','Platform','true','StudentViewEnabledTitle','StudentViewEnabledComment',NULL,NULL, 0),
  568. ('show_navigation_menu',NULL,'radio','Course','false','ShowNavigationMenuTitle','ShowNavigationMenuComment',NULL,NULL, 0),
  569. ('enable_tool_introduction',NULL,'radio','course','false','EnableToolIntroductionTitle','EnableToolIntroductionComment',NULL,NULL, 0),
  570. ('page_after_login', NULL, 'radio','Platform','user_portal.php', 'PageAfterLoginTitle','PageAfterLoginComment', NULL, NULL, 0),
  571. ('time_limit_whosonline', NULL, 'textfield','Platform','30', 'TimeLimitWhosonlineTitle','TimeLimitWhosonlineComment', NULL, NULL, 0),
  572. ('breadcrumbs_course_homepage', NULL, 'radio','Course','course_title', 'BreadCrumbsCourseHomepageTitle','BreadCrumbsCourseHomepageComment', NULL, NULL, 0),
  573. ('example_material_course_creation', NULL, 'radio','Platform','true', 'ExampleMaterialCourseCreationTitle','ExampleMaterialCourseCreationComment', NULL, NULL, 0),
  574. ('account_valid_duration',NULL, 'textfield','Platform','3660', 'AccountValidDurationTitle','AccountValidDurationComment', NULL, NULL, 0),
  575. ('use_session_mode', NULL, 'radio','Session','true', 'UseSessionModeTitle','UseSessionModeComment', NULL, NULL, 0),
  576. ('allow_email_editor', NULL, 'radio', 'Tools', 'false', 'AllowEmailEditorTitle', 'AllowEmailEditorComment', NULL, NULL, 0),
  577. ('registered', NULL, 'textfield', NULL, 'false', NULL, NULL, NULL, NULL, 0),
  578. ('donotlistcampus', NULL, 'textfield', NULL, 'false', NULL, NULL, NULL, NULL,0 ),
  579. ('show_email_addresses', NULL,'radio','Platform','false','ShowEmailAddresses','ShowEmailAddressesComment',NULL,NULL, 1),
  580. ('profile','phone','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'phone', 0),
  581. ('service_visio', 'active', 'radio',NULL,'false', 'VisioEnable','', NULL, NULL, 0),
  582. ('service_visio', 'visio_host', 'textfield',NULL,'', 'VisioHost','', NULL, NULL, 0),
  583. ('service_visio', 'visio_port', 'textfield',NULL,'1935', 'VisioPort','', NULL, NULL, 0),
  584. ('service_visio', 'visio_pass', 'textfield',NULL,'', 'VisioPassword','', NULL, NULL, 0),
  585. ('service_ppt2lp', 'active', 'radio',NULL,'false', 'ppt2lp_actived','', NULL, NULL, 0),
  586. ('service_ppt2lp', 'host', 'textfield', NULL, NULL, 'Host', NULL, NULL, NULL, 0),
  587. ('service_ppt2lp', 'port', 'textfield', NULL, 2002, 'Port', NULL, NULL, NULL, 0),
  588. ('service_ppt2lp', 'user', 'textfield', NULL, NULL, 'UserOnHost', NULL, NULL, NULL, 0),
  589. ('service_ppt2lp', 'ftp_password', 'textfield', NULL, NULL, 'FtpPassword', NULL, NULL, NULL, 0),
  590. ('service_ppt2lp', 'path_to_lzx', 'textfield', NULL, NULL, '', NULL, NULL, NULL, 0),
  591. ('service_ppt2lp', 'size', 'radio', NULL, '720x540', '', NULL, NULL, NULL, 0),
  592. ('wcag_anysurfer_public_pages', NULL, 'radio','Editor','false','PublicPagesComplyToWAITitle','PublicPagesComplyToWAIComment', NULL, NULL, 0),
  593. ('stylesheets', NULL, 'textfield','stylesheets','chamilo','',NULL, NULL, NULL, 1),
  594. ('upload_extensions_list_type', NULL, 'radio', 'Security', 'blacklist', 'UploadExtensionsListType', 'UploadExtensionsListTypeComment', NULL, NULL, 0),
  595. ('upload_extensions_blacklist', NULL, 'textfield', 'Security', '', 'UploadExtensionsBlacklist', 'UploadExtensionsBlacklistComment', NULL, NULL, 0),
  596. ('upload_extensions_whitelist', NULL, 'textfield', 'Security', 'htm;html;jpg;jpeg;gif;png;swf;avi;mpg;mpeg;mov;flv;doc;docx;xls;xlsx;ppt;pptx;odt;odp;ods;pdf', 'UploadExtensionsWhitelist', 'UploadExtensionsWhitelistComment', NULL, NULL, 0),
  597. ('upload_extensions_skip', NULL, 'radio', 'Security', 'true', 'UploadExtensionsSkip', 'UploadExtensionsSkipComment', NULL, NULL, 0),
  598. ('upload_extensions_replace_by', NULL, 'textfield', 'Security', 'dangerous', 'UploadExtensionsReplaceBy', 'UploadExtensionsReplaceByComment', NULL, NULL, 0),
  599. ('show_number_of_courses', NULL, 'radio','Platform','false', 'ShowNumberOfCourses','ShowNumberOfCoursesComment', NULL, NULL, 0),
  600. ('show_empty_course_categories', NULL, 'radio','Platform','true', 'ShowEmptyCourseCategories','ShowEmptyCourseCategoriesComment', NULL, NULL, 0),
  601. ('show_back_link_on_top_of_tree', NULL, 'radio','Platform','false', 'ShowBackLinkOnTopOfCourseTree','ShowBackLinkOnTopOfCourseTreeComment', NULL, NULL, 0),
  602. ('show_different_course_language', NULL, 'radio','Platform','true', 'ShowDifferentCourseLanguage','ShowDifferentCourseLanguageComment', NULL, NULL, 1),
  603. ('split_users_upload_directory', NULL, 'radio','Tuning','true', 'SplitUsersUploadDirectory','SplitUsersUploadDirectoryComment', NULL, NULL, 0),
  604. ('hide_dltt_markup', NULL, 'radio','Languages','true', 'HideDLTTMarkup','HideDLTTMarkupComment', NULL, NULL, 0),
  605. ('display_categories_on_homepage',NULL,'radio','Platform','false','DisplayCategoriesOnHomepageTitle','DisplayCategoriesOnHomepageComment',NULL,NULL, 1),
  606. ('permissions_for_new_directories', NULL, 'textfield', 'Security', '0777', 'PermissionsForNewDirs', 'PermissionsForNewDirsComment', NULL, NULL, 0),
  607. ('permissions_for_new_files', NULL, 'textfield', 'Security', '0666', 'PermissionsForNewFiles', 'PermissionsForNewFilesComment', NULL, NULL, 0),
  608. ('show_tabs', 'campus_homepage', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsCampusHomepage', 1),
  609. ('show_tabs', 'my_courses', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsMyCourses', 1),
  610. ('show_tabs', 'reporting', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsReporting', 1),
  611. ('show_tabs', 'platform_administration', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsPlatformAdministration', 1),
  612. ('show_tabs', 'my_agenda', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsMyAgenda', 1),
  613. ('show_tabs', 'my_profile', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsMyProfile', 1),
  614. ('default_forum_view', NULL, 'radio', 'Course', 'flat', 'DefaultForumViewTitle','DefaultForumViewComment',NULL,NULL, 0),
  615. ('platform_charset',NULL,'textfield','Languages','UTF-8','PlatformCharsetTitle','PlatformCharsetComment','platform',NULL, 0),
  616. ('noreply_email_address', '', 'textfield', 'Platform', '', 'NoReplyEmailAddress', 'NoReplyEmailAddressComment', NULL, NULL, 0),
  617. ('survey_email_sender_noreply', '', 'radio', 'Course', 'coach', 'SurveyEmailSenderNoReply', 'SurveyEmailSenderNoReplyComment', NULL, NULL, 0),
  618. ('openid_authentication',NULL,'radio','Security','false','OpenIdAuthentication','OpenIdAuthenticationComment',NULL,NULL, 0),
  619. ('profile','openid','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'OpenIDURL', 0),
  620. ('gradebook_enable',NULL,'radio','Gradebook','false','GradebookActivation','GradebookActivationComment',NULL,NULL, 0),
  621. ('show_tabs','my_gradebook','checkbox','Platform','true','ShowTabsTitle','ShowTabsComment',NULL,'TabsMyGradebook', 1),
  622. ('gradebook_score_display_coloring','my_display_coloring','checkbox','Gradebook','false','GradebookScoreDisplayColoring','GradebookScoreDisplayColoringComment',NULL,'TabsGradebookEnableColoring', 0),
  623. ('gradebook_score_display_custom','my_display_custom','checkbox','Gradebook','false','GradebookScoreDisplayCustom','GradebookScoreDisplayCustomComment',NULL,'TabsGradebookEnableCustom', 0),
  624. ('gradebook_score_display_colorsplit',NULL,'textfield','Gradebook','50','GradebookScoreDisplayColorSplit','GradebookScoreDisplayColorSplitComment',NULL,NULL, 0),
  625. ('gradebook_score_display_upperlimit','my_display_upperlimit','checkbox','Gradebook','false','GradebookScoreDisplayUpperLimit','GradebookScoreDisplayUpperLimitComment',NULL,'TabsGradebookEnableUpperLimit', 0),
  626. ('gradebook_number_decimals', NULL, 'select', 'Gradebook', '0', 'GradebookNumberDecimals', 'GradebookNumberDecimalsComment', NULL, NULL, 0),
  627. ('user_selected_theme',NULL,'radio','Platform','false','UserThemeSelection','UserThemeSelectionComment',NULL,NULL, 0),
  628. ('profile','theme','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'UserTheme', 0),
  629. ('allow_course_theme',NULL,'radio','Course','true','AllowCourseThemeTitle','AllowCourseThemeComment',NULL,NULL, 0),
  630. ('display_mini_month_calendar',NULL,'radio','Tools', 'true', 'DisplayMiniMonthCalendarTitle', 'DisplayMiniMonthCalendarComment', NULL, NULL, 0),
  631. ('display_upcoming_events',NULL,'radio','Tools','true','DisplayUpcomingEventsTitle','DisplayUpcomingEventsComment',NULL,NULL, 0),
  632. ('number_of_upcoming_events',NULL,'textfield','Tools','1','NumberOfUpcomingEventsTitle','NumberOfUpcomingEventsComment',NULL,NULL, 0),
  633. ('show_closed_courses',NULL,'radio','Platform','false','ShowClosedCoursesTitle','ShowClosedCoursesComment',NULL,NULL, 0),
  634. ('service_visio', 'visio_use_rtmpt', 'radio',null,'false', 'VisioUseRtmptTitle','VisioUseRtmptComment', NULL, NULL, 0),
  635. ('extendedprofile_registration', 'mycomptetences', 'checkbox','User','false', 'ExtendedProfileRegistrationTitle','ExtendedProfileRegistrationComment', NULL, 'MyCompetences', 0),
  636. ('extendedprofile_registration', 'mydiplomas', 'checkbox','User','false', 'ExtendedProfileRegistrationTitle','ExtendedProfileRegistrationComment', NULL, 'MyDiplomas', 0),
  637. ('extendedprofile_registration', 'myteach', 'checkbox','User','false', 'ExtendedProfileRegistrationTitle','ExtendedProfileRegistrationComment', NULL, 'MyTeach', 0),
  638. ('extendedprofile_registration', 'mypersonalopenarea', 'checkbox','User','false', 'ExtendedProfileRegistrationTitle','ExtendedProfileRegistrationComment', NULL, 'MyPersonalOpenArea', 0),
  639. ('extendedprofile_registrationrequired', 'mycomptetences', 'checkbox','User','false', 'ExtendedProfileRegistrationRequiredTitle','ExtendedProfileRegistrationRequiredComment', NULL, 'MyCompetences', 0),
  640. ('extendedprofile_registrationrequired', 'mydiplomas', 'checkbox','User','false', 'ExtendedProfileRegistrationRequiredTitle','ExtendedProfileRegistrationRequiredComment', NULL, 'MyDiplomas', 0),
  641. ('extendedprofile_registrationrequired', 'myteach', 'checkbox','User','false', 'ExtendedProfileRegistrationRequiredTitle','ExtendedProfileRegistrationRequiredComment', NULL, 'MyTeach', 0),
  642. ('extendedprofile_registrationrequired', 'mypersonalopenarea', 'checkbox','User','false', 'ExtendedProfileRegistrationRequiredTitle','ExtendedProfileRegistrationRequiredComment', NULL, 'MyPersonalOpenArea', 0),
  643. ('registration','phone','textfield','User','false','RegistrationRequiredFormsTitle','RegistrationRequiredFormsComment',NULL,'Phone', 0),
  644. ('add_users_by_coach',NULL,'radio','Session','false','AddUsersByCoachTitle','AddUsersByCoachComment',NULL,NULL, 0),
  645. ('extend_rights_for_coach',NULL,'radio','Security','false','ExtendRightsForCoachTitle','ExtendRightsForCoachComment',NULL,NULL, 0),
  646. ('extend_rights_for_coach_on_survey',NULL,'radio','Security','true','ExtendRightsForCoachOnSurveyTitle','ExtendRightsForCoachOnSurveyComment',NULL,NULL, 0),
  647. ('course_create_active_tools','wiki','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Wiki', 0),
  648. ('show_session_coach', NULL, 'radio','Session','false', 'ShowSessionCoachTitle','ShowSessionCoachComment', NULL, NULL, 0),
  649. ('course_create_active_tools','gradebook','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Gradebook', 0),
  650. ('allow_users_to_create_courses',NULL,'radio','Platform','true','AllowUsersToCreateCoursesTitle','AllowUsersToCreateCoursesComment',NULL,NULL, 0),
  651. ('course_create_active_tools','survey','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Survey', 0),
  652. ('course_create_active_tools','glossary','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Glossary', 0),
  653. ('course_create_active_tools','notebook','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Notebook', 0),
  654. ('course_create_active_tools','attendances','checkbox','Tools','false','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Attendances', 0),
  655. ('course_create_active_tools','course_progress','checkbox','Tools','false','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'CourseProgress', 0),
  656. ('advanced_filemanager',NULL,'radio','Editor','true','AdvancedFileManagerTitle','AdvancedFileManagerComment',NULL,NULL, 1),
  657. ('allow_reservation', NULL, 'radio', 'Tools', 'false', 'AllowReservationTitle', 'AllowReservationComment', NULL, NULL, 0),
  658. ('profile','apikeys','checkbox','User','false','ProfileChangesTitle','ProfileChangesComment',NULL,'ApiKeys', 0),
  659. ('allow_message_tool', NULL, 'radio', 'Tools', 'true', 'AllowMessageToolTitle', 'AllowMessageToolComment', NULL, NULL,1),
  660. ('allow_social_tool', NULL, 'radio', 'Tools', 'true', 'AllowSocialToolTitle', 'AllowSocialToolComment', NULL, NULL,1),
  661. ('allow_students_to_browse_courses',NULL,'radio','Platform','true','AllowStudentsToBrowseCoursesTitle','AllowStudentsToBrowseCoursesComment',NULL,NULL, 1),
  662. ('show_session_data', NULL, 'radio', 'Session', 'false', 'ShowSessionDataTitle', 'ShowSessionDataComment', NULL, NULL, 1),
  663. ('allow_use_sub_language', NULL, 'radio', 'Languages', 'false', 'AllowUseSubLanguageTitle', 'AllowUseSubLanguageComment', NULL, NULL,0),
  664. ('show_glossary_in_documents', NULL, 'radio', 'Course', 'none', 'ShowGlossaryInDocumentsTitle', 'ShowGlossaryInDocumentsComment', NULL, NULL,1),
  665. ('allow_terms_conditions', NULL, 'radio', 'Platform', 'false', 'AllowTermsAndConditionsTitle', 'AllowTermsAndConditionsComment', NULL, NULL,0),
  666. ('course_create_active_tools','enable_search','checkbox','Tools','false','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Search',0),
  667. ('search_enabled',NULL,'radio','Search','false','EnableSearchTitle','EnableSearchComment',NULL,NULL,1),
  668. ('search_prefilter_prefix',NULL, NULL,'Search','','SearchPrefilterPrefix','SearchPrefilterPrefixComment',NULL,NULL,0),
  669. ('search_show_unlinked_results',NULL,'radio','Search','true','SearchShowUnlinkedResultsTitle','SearchShowUnlinkedResultsComment',NULL,NULL,1),
  670. ('show_courses_descriptions_in_catalog', NULL, 'radio', 'Course', 'true', 'ShowCoursesDescriptionsInCatalogTitle', 'ShowCoursesDescriptionsInCatalogComment', NULL, NULL, 1),
  671. ('allow_coach_to_edit_course_session',NULL,'radio','Session','true','AllowCoachsToEditInsideTrainingSessions','AllowCoachsToEditInsideTrainingSessionsComment',NULL,NULL, 0),
  672. ('show_glossary_in_extra_tools', NULL, 'radio', 'Course', 'false', 'ShowGlossaryInExtraToolsTitle', 'ShowGlossaryInExtraToolsComment', NULL, NULL,1),
  673. ('send_email_to_admin_when_create_course',NULL,'radio','Platform','false','SendEmailToAdminTitle','SendEmailToAdminComment',NULL,NULL, 1),
  674. ('go_to_course_after_login',NULL,'radio','Course','false','GoToCourseAfterLoginTitle','GoToCourseAfterLoginComment',NULL,NULL, 0),
  675. ('math_mimetex',NULL,'radio','Editor','false','MathMimetexTitle','MathMimetexComment',NULL,NULL, 0),
  676. ('math_asciimathML',NULL,'radio','Editor','false','MathASCIImathMLTitle','MathASCIImathMLComment',NULL,NULL, 0),
  677. ('enabled_asciisvg',NULL,'radio','Editor','false','AsciiSvgTitle','AsciiSvgComment',NULL,NULL, 0),
  678. ('include_asciimathml_script',NULL,'radio','Editor','false','IncludeAsciiMathMlTitle','IncludeAsciiMathMlComment',NULL,NULL, 0),
  679. ('youtube_for_students',NULL,'radio','Editor','true','YoutubeForStudentsTitle','YoutubeForStudentsComment',NULL,NULL, 0),
  680. ('block_copy_paste_for_students',NULL,'radio','Editor','false','BlockCopyPasteForStudentsTitle','BlockCopyPasteForStudentsComment',NULL,NULL, 0),
  681. ('more_buttons_maximized_mode',NULL,'radio','Editor','true','MoreButtonsForMaximizedModeTitle','MoreButtonsForMaximizedModeComment',NULL,NULL, 0),
  682. ('students_download_folders',NULL,'radio','Tools','true','AllowStudentsDownloadFoldersTitle','AllowStudentsDownloadFoldersComment',NULL,NULL, 0),
  683. ('users_copy_files',NULL,'radio','Tools','true','AllowUsersCopyFilesTitle','AllowUsersCopyFilesComment',NULL,NULL, 1),
  684. ('show_tabs', 'social', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsSocial', 0),
  685. ('allow_students_to_create_groups_in_social',NULL,'radio','Tools','false','AllowStudentsToCreateGroupsInSocialTitle','AllowStudentsToCreateGroupsInSocialComment',NULL,NULL, 0),
  686. ('allow_send_message_to_all_platform_users',NULL,'radio','Tools','true','AllowSendMessageToAllPlatformUsersTitle','AllowSendMessageToAllPlatformUsersComment',NULL,NULL, 0),
  687. ('message_max_upload_filesize',NULL,'textfield','Tools','20971520','MessageMaxUploadFilesizeTitle','MessageMaxUploadFilesizeComment',NULL,NULL, 0),
  688. ('show_tabs', 'dashboard', 'checkbox', 'Platform', 'true', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsDashboard', 1),
  689. ('use_users_timezone', 'timezones', 'radio', 'Timezones', 'true', 'UseUsersTimezoneTitle','UseUsersTimezoneComment',NULL,'Timezones', 1),
  690. ('timezone_value', 'timezones', 'select', 'Timezones', '', 'TimezoneValueTitle','TimezoneValueComment',NULL,'Timezones', 1),
  691. ('allow_user_course_subscription_by_course_admin', NULL, 'radio', 'Security', 'true', 'AllowUserCourseSubscriptionByCourseAdminTitle', 'AllowUserCourseSubscriptionByCourseAdminComment', NULL, NULL, 1),
  692. ('show_link_bug_notification', NULL, 'radio', 'Platform', 'true', 'ShowLinkBugNotificationTitle', 'ShowLinkBugNotificationComment', NULL, NULL, 0),
  693. ('course_validation', NULL, 'radio', 'Platform', 'false', 'EnableCourseValidation', 'EnableCourseValidationComment', NULL, NULL, 1),
  694. ('course_validation_terms_and_conditions_url', NULL, 'textfield', 'Platform', '', 'CourseValidationTermsAndConditionsLink', 'CourseValidationTermsAndConditionsLinkComment', NULL, NULL, 1),
  695. ('sso_authentication',NULL,'radio','Security','false','EnableSSOTitle','EnableSSOComment',NULL,NULL,1),
  696. ('sso_authentication_domain',NULL,'textfield','Security','','SSOServerDomainTitle','SSOServerDomainComment',NULL,NULL,1),
  697. ('sso_authentication_auth_uri',NULL,'textfield','Security','/?q=user','SSOServerAuthURITitle','SSOServerAuthURIComment',NULL,NULL,1),
  698. ('sso_authentication_unauth_uri',NULL,'textfield','Security','/?q=logout','SSOServerUnAuthURITitle','SSOServerUnAuthURIComment',NULL,NULL,1),
  699. ('sso_authentication_protocol',NULL,'radio','Security','http://','SSOServerProtocolTitle','SSOServerProtocolComment',NULL,NULL,1),
  700. ('enabled_wiris',NULL,'radio','Editor','false','EnabledWirisTitle','EnabledWirisComment',NULL,NULL, 0),
  701. ('allow_spellcheck',NULL,'radio','Editor','false','AllowSpellCheckTitle','AllowSpellCheckComment',NULL,NULL, 0),
  702. ('force_wiki_paste_as_plain_text',NULL,'radio','Editor','false','ForceWikiPasteAsPlainTextTitle','ForceWikiPasteAsPlainTextComment',NULL,NULL, 0),
  703. ('enabled_googlemaps',NULL,'radio','Editor','false','EnabledGooglemapsTitle','EnabledGooglemapsComment',NULL,NULL, 0),
  704. ('enabled_imgmap',NULL,'radio','Editor','true','EnabledImageMapsTitle','EnabledImageMapsComment',NULL,NULL, 0),
  705. ('enabled_support_svg', NULL,'radio', 'Tools', 'true', 'EnabledSVGTitle','EnabledSVGComment',NULL,NULL, 0),
  706. ('pdf_export_watermark_enable', NULL,'radio', 'Platform', 'false','PDFExportWatermarkEnableTitle', 'PDFExportWatermarkEnableComment', 'platform',NULL, 1),
  707. ('pdf_export_watermark_by_course', NULL,'radio', 'Platform', 'false','PDFExportWatermarkByCourseTitle', 'PDFExportWatermarkByCourseComment','platform',NULL, 1),
  708. ('pdf_export_watermark_text', NULL,'textfield', 'Platform', '', 'PDFExportWatermarkTextTitle', 'PDFExportWatermarkTextComment', 'platform',NULL, 1),
  709. ('enabled_insertHtml', NULL,'radio', 'Editor', 'true','EnabledInsertHtmlTitle', 'EnabledInsertHtmlComment',NULL,NULL, 0),
  710. ('students_export2pdf', NULL,'radio', 'Tools', 'true', 'EnabledStudentExport2PDFTitle', 'EnabledStudentExport2PDFComment',NULL,NULL, 0),
  711. ('exercise_min_score', NULL,'textfield', 'Course', '', 'ExerciseMinScoreTitle', 'ExerciseMinScoreComment','platform',NULL, 1),
  712. ('exercise_max_score', NULL,'textfield', 'Course', '', 'ExerciseMaxScoreTitle', 'ExerciseMaxScoreComment','platform',NULL, 1),
  713. ('show_users_folders', NULL,'radio', 'Tools', 'true', 'ShowUsersFoldersTitle','ShowUsersFoldersComment',NULL,NULL, 0),
  714. ('show_default_folders', NULL,'radio', 'Tools', 'true', 'ShowDefaultFoldersTitle','ShowDefaultFoldersComment',NULL,NULL, 0),
  715. ('show_chat_folder', NULL,'radio', 'Tools', 'true', 'ShowChatFolderTitle','ShowChatFolderComment',NULL,NULL, 0),
  716. ('enabled_text2audio', NULL,'radio', 'Tools', 'false', 'Text2AudioTitle','Text2AudioComment',NULL,NULL, 0),
  717. ('course_hide_tools','course_description','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseDescription', 1),
  718. ('course_hide_tools','calendar_event','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Agenda', 1),
  719. ('course_hide_tools','document','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Documents', 1),
  720. ('course_hide_tools','learnpath','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'LearningPath', 1),
  721. ('course_hide_tools','link','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Links', 1),
  722. ('course_hide_tools','announcement','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Announcements', 1),
  723. ('course_hide_tools','forum','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Forums', 1),
  724. ('course_hide_tools','dropbox','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Dropbox', 1),
  725. ('course_hide_tools','quiz','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Quiz', 1),
  726. ('course_hide_tools','user','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Users', 1),
  727. ('course_hide_tools','group','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Groups', 1),
  728. ('course_hide_tools','chat','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Chat', 1),
  729. ('course_hide_tools','student_publication','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'StudentPublications', 1),
  730. ('course_hide_tools','wiki','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Wiki', 1),
  731. ('course_hide_tools','gradebook','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Gradebook', 1),
  732. ('course_hide_tools','survey','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Survey', 1),
  733. ('course_hide_tools','glossary','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Glossary', 1),
  734. ('course_hide_tools','notebook','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Notebook', 1),
  735. ('course_hide_tools','attendance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Attendances', 1),
  736. ('course_hide_tools','course_progress','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseProgress', 1),
  737. ('course_hide_tools','blog_management','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Blog',1),
  738. ('course_hide_tools','tracking','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Stats',1),
  739. ('course_hide_tools','course_maintenance','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'Maintenance',1),
  740. ('course_hide_tools','course_setting','checkbox','Tools','false','CourseHideToolsTitle','CourseHideToolsComment',NULL,'CourseSettings',1),
  741. ('enabled_support_pixlr',NULL,'radio','Tools','false','EnabledPixlrTitle','EnabledPixlrComment',NULL,NULL, 0),
  742. ('show_groups_to_users',NULL,'radio','Session','false','ShowGroupsToUsersTitle','ShowGroupsToUsersComment',NULL,NULL, 0),
  743. ('accessibility_font_resize',NULL,'radio','Platform','false','EnableAccessibilityFontResizeTitle','EnableAccessibilityFontResizeComment',NULL,NULL, 1),
  744. ('hide_courses_in_sessions',NULL,'radio', 'Session','false','HideCoursesInSessionsTitle', 'HideCoursesInSessionsComment','platform',NULL, 1),
  745. ('enable_quiz_scenario', NULL,'radio','Course','false','EnableQuizScenarioTitle','EnableQuizScenarioComment',NULL,NULL, 1),
  746. ('enable_nanogong',NULL,'radio','Tools','false','EnableNanogongTitle','EnableNanogongComment',NULL,NULL, 0),
  747. ('filter_terms',NULL,'textarea','Security','','FilterTermsTitle','FilterTermsComment',NULL,NULL, 0),
  748. ('header_extra_content', NULL, 'textarea', 'Tracking', '', 'HeaderExtraContentTitle', 'HeaderExtraContentComment', NULL, NULL, 1),
  749. ('footer_extra_content', NULL, 'textarea', 'Tracking', '', 'FooterExtraContentTitle', 'FooterExtraContentComment', NULL, NULL, 1),
  750. ('show_documents_preview', NULL, 'radio', 'Tools', 'false', 'ShowDocumentPreviewTitle', 'ShowDocumentPreviewComment', NULL, NULL, 1),
  751. ('htmlpurifier_wiki', NULL, 'radio', 'Editor', 'false', 'HtmlPurifierWikiTitle', 'HtmlPurifierWikiComment', NULL, NULL, 0),
  752. ('cas_activate', NULL, 'radio', 'CAS', 'false', 'CasMainActivateTitle', 'CasMainActivateComment', NULL, NULL, 0),
  753. ('cas_server', NULL, 'textfield', 'CAS', '', 'CasMainServerTitle', 'CasMainServerComment', NULL, NULL, 0),
  754. ('cas_server_uri', NULL, 'textfield', 'CAS', '', 'CasMainServerURITitle', 'CasMainServerURIComment', NULL, NULL, 0),
  755. ('cas_port', NULL, 'textfield', 'CAS', '', 'CasMainPortTitle', 'CasMainPortComment', NULL, NULL, 0),
  756. ('cas_protocol', NULL, 'radio', 'CAS', '', 'CasMainProtocolTitle', 'CasMainProtocolComment', NULL, NULL, 0),
  757. ('cas_add_user_activate', NULL, 'radio', 'CAS', 'false', 'CasUserAddActivateTitle', 'CasUserAddActivateComment', NULL, NULL, 0),
  758. ('update_user_info_cas_with_ldap', NULL, 'radio', 'CAS', 'true', 'UpdateUserInfoCasWithLdapTitle', 'UpdateUserInfoCasWithLdapComment', NULL, NULL, 0),
  759. ('student_page_after_login', NULL, 'textfield', 'Platform', '', 'StudentPageAfterLoginTitle', 'StudentPageAfterLoginComment', NULL, NULL, 0),
  760. ('teacher_page_after_login', NULL, 'textfield', 'Platform', '', 'TeacherPageAfterLoginTitle', 'TeacherPageAfterLoginComment', NULL, NULL, 0),
  761. ('drh_page_after_login', NULL, 'textfield', 'Platform', '', 'DRHPageAfterLoginTitle', 'DRHPageAfterLoginComment', NULL, NULL, 0),
  762. ('sessionadmin_page_after_login', NULL, 'textfield', 'Session', '', 'SessionAdminPageAfterLoginTitle', 'SessionAdminPageAfterLoginComment', NULL, NULL, 0),
  763. ('student_autosubscribe', NULL, 'textfield', 'Platform', '', 'StudentAutosubscribeTitle', 'StudentAutosubscribeComment', NULL, NULL, 0),
  764. ('teacher_autosubscribe', NULL, 'textfield', 'Platform', '', 'TeacherAutosubscribeTitle', 'TeacherAutosubscribeComment', NULL, NULL, 0),
  765. ('drh_autosubscribe', NULL, 'textfield', 'Platform', '', 'DRHAutosubscribeTitle', 'DRHAutosubscribeComment', NULL, NULL, 0),
  766. ('sessionadmin_autosubscribe', NULL, 'textfield', 'Session', '', 'SessionadminAutosubscribeTitle', 'SessionadminAutosubscribeComment', NULL, NULL, 0),
  767. ('scorm_cumulative_session_time', NULL, 'radio', 'Course', 'true', 'ScormCumulativeSessionTimeTitle', 'ScormCumulativeSessionTimeComment', NULL, NULL, 0),
  768. ('allow_hr_skills_management', NULL, 'radio', 'Gradebook', 'true', 'AllowHRSkillsManagementTitle', 'AllowHRSkillsManagementComment', NULL, NULL, 1),
  769. ('enable_help_link', NULL, 'radio', 'Platform', 'true', 'EnableHelpLinkTitle', 'EnableHelpLinkComment', NULL, NULL, 0),
  770. ('teachers_can_change_score_settings', NULL, 'radio', 'Gradebook', 'true', 'TeachersCanChangeScoreSettingsTitle', 'TeachersCanChangeScoreSettingsComment', NULL, NULL, 1),
  771. ('allow_users_to_change_email_with_no_password', NULL, 'radio', 'User', 'false', 'AllowUsersToChangeEmailWithNoPasswordTitle', 'AllowUsersToChangeEmailWithNoPasswordComment', NULL, NULL, 0),
  772. ('show_admin_toolbar', NULL, 'radio', 'Platform', 'show_to_admin', 'ShowAdminToolbarTitle', 'ShowAdminToolbarComment', NULL, NULL, 1),
  773. ('allow_global_chat', NULL, 'radio', 'Platform', 'true', 'AllowGlobalChatTitle', 'AllowGlobalChatComment', NULL, NULL, 1),
  774. ('languagePriority1', NULL, 'radio', 'Languages', 'course_lang', 'LanguagePriority1Title', 'LanguagePriority1Comment', NULL, NULL, 0),
  775. ('languagePriority2', NULL, 'radio', 'Languages','user_profil_lang', 'LanguagePriority2Title', 'LanguagePriority2Comment', NULL, NULL, 0),
  776. ('languagePriority3', NULL, 'radio', 'Languages','user_selected_lang', 'LanguagePriority3Title', 'LanguagePriority3Comment', NULL, NULL, 0),
  777. ('languagePriority4', NULL, 'radio', 'Languages', 'platform_lang','LanguagePriority4Title', 'LanguagePriority4Comment', NULL, NULL, 0),
  778. ('login_is_email', NULL, 'radio', 'Platform', 'false', 'LoginIsEmailTitle', 'LoginIsEmailComment', NULL, NULL, 0),
  779. ('courses_default_creation_visibility', NULL, 'radio', 'Course', '2', 'CoursesDefaultCreationVisibilityTitle', 'CoursesDefaultCreationVisibilityComment', NULL, NULL, 1),
  780. ('allow_browser_sniffer', NULL, 'radio', 'Tuning', 'false', 'AllowBrowserSnifferTitle', 'AllowBrowserSnifferComment', NULL, NULL, 0),
  781. ('enable_wami_record',NULL,'radio','Tools','false','EnableWamiRecordTitle','EnableWamiRecordComment',NULL,NULL, 0),
  782. ('gradebook_enable_grade_model', NULL, 'radio', 'Gradebook', 'false', 'GradebookEnableGradeModelTitle', 'GradebookEnableGradeModelComment', NULL, NULL, 1),
  783. ('teachers_can_change_grade_model_settings', NULL, 'radio', 'Gradebook', 'true', 'TeachersCanChangeGradeModelSettingsTitle', 'TeachersCanChangeGradeModelSettingsComment', NULL, NULL, 1),
  784. ('gradebook_default_weight', NULL, 'textfield', 'Gradebook', '100', 'GradebookDefaultWeightTitle', 'GradebookDefaultWeightComment', NULL, NULL, 0),
  785. ('ldap_description', NULL, 'radio', 'LDAP', NULL, 'LdapDescriptionTitle', 'LdapDescriptionComment', NULL, NULL, 0),
  786. ('shibboleth_description', NULL, 'radio', 'Shibboleth', 'false', 'ShibbolethMainActivateTitle', 'ShibbolethMainActivateComment', NULL, NULL, 0),
  787. ('facebook_description', NULL, 'radio', 'Facebook', 'false', 'FacebookMainActivateTitle', 'FacebookMainActivateComment', NULL, NULL, 0),
  788. ('gradebook_locking_enabled', NULL, 'radio', 'Gradebook', 'false', 'GradebookEnableLockingTitle', 'GradebookEnableLockingComment', NULL, NULL, 0),
  789. ('gradebook_default_grade_model_id', NULL, 'select', 'Gradebook', '', 'GradebookDefaultGradeModelTitle', 'GradebookDefaultGradeModelComment', NULL, NULL, 1),
  790. ('allow_session_admins_to_manage_all_sessions', NULL, 'radio', 'Session', 'false', 'AllowSessionAdminsToSeeAllSessionsTitle', 'AllowSessionAdminsToSeeAllSessionsComment', NULL, NULL, 1),
  791. ('allow_skills_tool', NULL, 'radio', 'Platform', 'false', 'AllowSkillsToolTitle', 'AllowSkillsToolComment', NULL, NULL, 1),
  792. ('allow_public_certificates', NULL, 'radio', 'Course', 'false', 'AllowPublicCertificatesTitle', 'AllowPublicCertificatesComment', NULL, NULL, 1),
  793. ('platform_unsubscribe_allowed', NULL, 'radio', 'Platform', 'false', 'PlatformUnsubscribeTitle', 'PlatformUnsubscribeComment', NULL, NULL, 1),
  794. ('activate_email_template', NULL, 'radio', 'Platform', 'false', 'ActivateEmailTemplateTitle', 'ActivateEmailTemplateComment', NULL, NULL, 0),
  795. ('enable_iframe_inclusion', NULL, 'radio', 'Editor', 'false', 'EnableIframeInclusionTitle', 'EnableIframeInclusionComment', NULL, NULL, 1),
  796. ('show_hot_courses', NULL, 'radio', 'Platform', 'true', 'ShowHotCoursesTitle', 'ShowHotCoursesComment', NULL, NULL, 1),
  797. ('enable_webcam_clip',NULL,'radio','Tools','false','EnableWebCamClipTitle','EnableWebCamClipComment',NULL,NULL, 0),
  798. ('use_custom_pages', NULL, 'radio','Platform','false','UseCustomPagesTitle','UseCustomPagesComment', NULL, NULL, 1),
  799. ('tool_visible_by_default_at_creation','documents','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Documents', 1),
  800. ('tool_visible_by_default_at_creation','learning_path','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'LearningPath', 1),
  801. ('tool_visible_by_default_at_creation','links','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Links', 1),
  802. ('tool_visible_by_default_at_creation','announcements','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Announcements', 1),
  803. ('tool_visible_by_default_at_creation','forums','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Forums', 1),
  804. ('tool_visible_by_default_at_creation','quiz','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Quiz', 1),
  805. ('tool_visible_by_default_at_creation','gradebook','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Gradebook', 1),
  806. ('chamilo_database_version', NULL, 'textfield',NULL, '1.9.0.18715','DatabaseVersion','', NULL, NULL, 0);
  807. UNLOCK TABLES;
  808. /*!40000 ALTER TABLE settings_current ENABLE KEYS */;
  809. --
  810. -- Table structure for table settings_options
  811. --
  812. DROP TABLE IF EXISTS settings_options;
  813. CREATE TABLE IF NOT EXISTS settings_options (
  814. id int unsigned NOT NULL auto_increment,
  815. variable varchar(255) default NULL,
  816. value varchar(255) default NULL,
  817. display_text varchar(255) NOT NULL default '',
  818. PRIMARY KEY (id),
  819. UNIQUE KEY id (id)
  820. );
  821. ALTER TABLE settings_options ADD UNIQUE unique_setting_option (variable(165), value(165));
  822. --
  823. -- Dumping data for table settings_options
  824. --
  825. /*!40000 ALTER TABLE settings_options DISABLE KEYS */;
  826. LOCK TABLES settings_options WRITE;
  827. INSERT INTO settings_options (variable, value, display_text)
  828. VALUES
  829. ('show_administrator_data','true','Yes'),
  830. ('show_administrator_data','false','No'),
  831. ('show_tutor_data','true','Yes'),
  832. ('show_tutor_data','false','No'),
  833. ('show_teacher_data','true','Yes'),
  834. ('show_teacher_data','false','No'),
  835. ('homepage_view','activity','HomepageViewActivity'),
  836. ('homepage_view','2column','HomepageView2column'),
  837. ('homepage_view','3column','HomepageView3column'),
  838. ('homepage_view','vertical_activity','HomepageViewVerticalActivity'),
  839. ('homepage_view','activity_big','HomepageViewActivityBig'),
  840. ('show_toolshortcuts','true','Yes'),
  841. ('show_toolshortcuts','false','No'),
  842. ('allow_group_categories','true','Yes'),
  843. ('allow_group_categories','false','No'),
  844. ('server_type','production','ProductionServer'),
  845. ('server_type','test','TestServer'),
  846. ('allow_name_change','true','Yes'),
  847. ('allow_name_change','false','No'),
  848. ('allow_officialcode_change','true','Yes'),
  849. ('allow_officialcode_change','false','No'),
  850. ('allow_registration','true','Yes'),
  851. ('allow_registration','false','No'),
  852. ('allow_registration','approval','AfterApproval'),
  853. ('allow_registration_as_teacher','true','Yes'),
  854. ('allow_registration_as_teacher','false','No'),
  855. ('allow_lostpassword','true','Yes'),
  856. ('allow_lostpassword','false','No'),
  857. ('allow_user_headings','true','Yes'),
  858. ('allow_user_headings','false','No'),
  859. ('allow_personal_agenda','true','Yes'),
  860. ('allow_personal_agenda','false','No'),
  861. ('display_coursecode_in_courselist','true','Yes'),
  862. ('display_coursecode_in_courselist','false','No'),
  863. ('display_teacher_in_courselist','true','Yes'),
  864. ('display_teacher_in_courselist','false','No'),
  865. ('permanently_remove_deleted_files','true','YesWillDeletePermanently'),
  866. ('permanently_remove_deleted_files','false','NoWillDeletePermanently'),
  867. ('dropbox_allow_overwrite','true','Yes'),
  868. ('dropbox_allow_overwrite','false','No'),
  869. ('dropbox_allow_just_upload','true','Yes'),
  870. ('dropbox_allow_just_upload','false','No'),
  871. ('dropbox_allow_student_to_student','true','Yes'),
  872. ('dropbox_allow_student_to_student','false','No'),
  873. ('dropbox_allow_group','true','Yes'),
  874. ('dropbox_allow_group','false','No'),
  875. ('dropbox_allow_mailing','true','Yes'),
  876. ('dropbox_allow_mailing','false','No'),
  877. ('extended_profile','true','Yes'),
  878. ('extended_profile','false','No'),
  879. ('student_view_enabled','true','Yes'),
  880. ('student_view_enabled','false','No'),
  881. ('show_navigation_menu','false','No'),
  882. ('show_navigation_menu','icons','IconsOnly'),
  883. ('show_navigation_menu','text','TextOnly'),
  884. ('show_navigation_menu','iconstext','IconsText'),
  885. ('enable_tool_introduction','true','Yes'),
  886. ('enable_tool_introduction','false','No'),
  887. ('page_after_login', 'index.php', 'CampusHomepage'),
  888. ('page_after_login', 'user_portal.php', 'MyCourses'),
  889. ('page_after_login', 'main/auth/courses.php', 'CourseCatalog'),
  890. ('breadcrumbs_course_homepage', 'get_lang', 'CourseHomepage'),
  891. ('breadcrumbs_course_homepage', 'course_code', 'CourseCode'),
  892. ('breadcrumbs_course_homepage', 'course_title', 'CourseTitle'),
  893. ('example_material_course_creation', 'true', 'Yes'),
  894. ('example_material_course_creation', 'false', 'No'),
  895. ('use_session_mode', 'true', 'Yes'),
  896. ('use_session_mode', 'false', 'No'),
  897. ('allow_email_editor', 'true' ,'Yes'),
  898. ('allow_email_editor', 'false', 'No'),
  899. ('show_email_addresses','true','Yes'),
  900. ('show_email_addresses','false','No'),
  901. ('wcag_anysurfer_public_pages', 'true', 'Yes'),
  902. ('wcag_anysurfer_public_pages', 'false', 'No'),
  903. ('upload_extensions_list_type', 'blacklist', 'Blacklist'),
  904. ('upload_extensions_list_type', 'whitelist', 'Whitelist'),
  905. ('upload_extensions_skip', 'true', 'Remove'),
  906. ('upload_extensions_skip', 'false', 'Rename'),
  907. ('show_number_of_courses', 'true', 'Yes'),
  908. ('show_number_of_courses', 'false', 'No'),
  909. ('show_empty_course_categories', 'true', 'Yes'),
  910. ('show_empty_course_categories', 'false', 'No'),
  911. ('show_back_link_on_top_of_tree', 'true', 'Yes'),
  912. ('show_back_link_on_top_of_tree', 'false', 'No'),
  913. ('show_different_course_language', 'true', 'Yes'),
  914. ('show_different_course_language', 'false', 'No'),
  915. ('split_users_upload_directory', 'true', 'Yes'),
  916. ('split_users_upload_directory', 'false', 'No'),
  917. ('hide_dltt_markup', 'false', 'No'),
  918. ('hide_dltt_markup', 'true', 'Yes'),
  919. ('display_categories_on_homepage','true','Yes'),
  920. ('display_categories_on_homepage','false','No'),
  921. ('default_forum_view', 'flat', 'Flat'),
  922. ('default_forum_view', 'threaded', 'Threaded'),
  923. ('default_forum_view', 'nested', 'Nested'),
  924. ('survey_email_sender_noreply', 'coach', 'CourseCoachEmailSender'),
  925. ('survey_email_sender_noreply', 'noreply', 'NoReplyEmailSender'),
  926. ('openid_authentication','true','Yes'),
  927. ('openid_authentication','false','No'),
  928. ('gradebook_enable','true','Yes'),
  929. ('gradebook_enable','false','No'),
  930. ('user_selected_theme','true','Yes'),
  931. ('user_selected_theme','false','No'),
  932. ('allow_course_theme','true','Yes'),
  933. ('allow_course_theme','false','No'),
  934. ('display_mini_month_calendar', 'true', 'Yes'),
  935. ('display_mini_month_calendar', 'false', 'No'),
  936. ('display_upcoming_events', 'true', 'Yes'),
  937. ('display_upcoming_events', 'false', 'No'),
  938. ('show_closed_courses', 'true', 'Yes'),
  939. ('show_closed_courses', 'false', 'No'),
  940. ('ldap_version', '2', 'LDAPVersion2'),
  941. ('ldap_version', '3', 'LDAPVersion3'),
  942. ('visio_use_rtmpt','true','Yes'),
  943. ('visio_use_rtmpt','false','No'),
  944. ('add_users_by_coach', 'true', 'Yes'),
  945. ('add_users_by_coach', 'false', 'No'),
  946. ('extend_rights_for_coach', 'true', 'Yes'),
  947. ('extend_rights_for_coach', 'false', 'No'),
  948. ('extend_rights_for_coach_on_survey', 'true', 'Yes'),
  949. ('extend_rights_for_coach_on_survey', 'false', 'No'),
  950. ('show_session_coach', 'true', 'Yes'),
  951. ('show_session_coach', 'false', 'No'),
  952. ('allow_users_to_create_courses','true','Yes'),
  953. ('allow_users_to_create_courses','false','No'),
  954. ('breadcrumbs_course_homepage', 'session_name_and_course_title', 'SessionNameAndCourseTitle'),
  955. ('advanced_filemanager','true','Yes'),
  956. ('advanced_filemanager','false','No'),
  957. ('allow_reservation', 'true', 'Yes'),
  958. ('allow_reservation', 'false', 'No'),
  959. ('allow_message_tool', 'true', 'Yes'),
  960. ('allow_message_tool', 'false', 'No'),
  961. ('allow_social_tool', 'true', 'Yes'),
  962. ('allow_social_tool', 'false', 'No'),
  963. ('allow_students_to_browse_courses','true','Yes'),
  964. ('allow_students_to_browse_courses','false','No'),
  965. ('show_email_of_teacher_or_tutor ', 'true', 'Yes'),
  966. ('show_email_of_teacher_or_tutor ', 'false', 'No'),
  967. ('show_session_data ', 'true', 'Yes'),
  968. ('show_session_data ', 'false', 'No'),
  969. ('allow_use_sub_language', 'true', 'Yes'),
  970. ('allow_use_sub_language', 'false', 'No'),
  971. ('show_glossary_in_documents', 'none', 'ShowGlossaryInDocumentsIsNone'),
  972. ('show_glossary_in_documents', 'ismanual', 'ShowGlossaryInDocumentsIsManual'),
  973. ('show_glossary_in_documents', 'isautomatic', 'ShowGlossaryInDocumentsIsAutomatic'),
  974. ('allow_terms_conditions', 'true', 'Yes'),
  975. ('allow_terms_conditions', 'false', 'No'),
  976. ('search_enabled', 'true', 'Yes'),
  977. ('search_enabled', 'false', 'No'),
  978. ('search_show_unlinked_results', 'true', 'SearchShowUnlinkedResults'),
  979. ('search_show_unlinked_results', 'false', 'SearchHideUnlinkedResults'),
  980. ('show_courses_descriptions_in_catalog', 'true', 'Yes'),
  981. ('show_courses_descriptions_in_catalog', 'false', 'No'),
  982. ('allow_coach_to_edit_course_session','true','Yes'),
  983. ('allow_coach_to_edit_course_session','false','No'),
  984. ('show_glossary_in_extra_tools', 'true', 'Yes'),
  985. ('show_glossary_in_extra_tools', 'false', 'No'),
  986. ('send_email_to_admin_when_create_course','true','Yes'),
  987. ('send_email_to_admin_when_create_course','false','No'),
  988. ('go_to_course_after_login','true','Yes'),
  989. ('go_to_course_after_login','false','No'),
  990. ('math_mimetex','true','Yes'),
  991. ('math_mimetex','false','No'),
  992. ('math_asciimathML','true','Yes'),
  993. ('math_asciimathML','false','No'),
  994. ('enabled_asciisvg','true','Yes'),
  995. ('enabled_asciisvg','false','No'),
  996. ('include_asciimathml_script','true','Yes'),
  997. ('include_asciimathml_script','false','No'),
  998. ('youtube_for_students','true','Yes'),
  999. ('youtube_for_students','false','No'),
  1000. ('block_copy_paste_for_students','true','Yes'),
  1001. ('block_copy_paste_for_students','false','No'),
  1002. ('more_buttons_maximized_mode','true','Yes'),
  1003. ('more_buttons_maximized_mode','false','No'),
  1004. ('students_download_folders','true','Yes'),
  1005. ('students_download_folders','false','No'),
  1006. ('users_copy_files','true','Yes'),
  1007. ('users_copy_files','false','No'),
  1008. ('allow_students_to_create_groups_in_social','true','Yes'),
  1009. ('allow_students_to_create_groups_in_social','false','No'),
  1010. ('allow_send_message_to_all_platform_users','true','Yes'),
  1011. ('allow_send_message_to_all_platform_users','false','No'),
  1012. ('use_users_timezone', 'true', 'Yes'),
  1013. ('use_users_timezone', 'false', 'No'),
  1014. ('allow_user_course_subscription_by_course_admin', 'true', 'Yes'),
  1015. ('allow_user_course_subscription_by_course_admin', 'false', 'No'),
  1016. ('show_link_bug_notification', 'true', 'Yes'),
  1017. ('show_link_bug_notification', 'false', 'No'),
  1018. ('course_validation', 'true', 'Yes'),
  1019. ('course_validation', 'false', 'No'),
  1020. ('sso_authentication', 'true', 'Yes'),
  1021. ('sso_authentication', 'false', 'No'),
  1022. ('sso_authentication_protocol', 'http://', 'http://'),
  1023. ('sso_authentication_protocol', 'https://', 'https://'),
  1024. ('enabled_wiris','true','Yes'),
  1025. ('enabled_wiris','false','No'),
  1026. ('allow_spellcheck','true','Yes'),
  1027. ('allow_spellcheck','false','No'),
  1028. ('force_wiki_paste_as_plain_text','true','Yes'),
  1029. ('force_wiki_paste_as_plain_text','false','No'),
  1030. ('enabled_googlemaps','true','Yes'),
  1031. ('enabled_googlemaps','false','No'),
  1032. ('enabled_imgmap','true','Yes'),
  1033. ('enabled_imgmap','false','No'),
  1034. ('enabled_support_svg','true','Yes'),
  1035. ('enabled_support_svg','false','No'),
  1036. ('pdf_export_watermark_enable','true','Yes'),
  1037. ('pdf_export_watermark_enable','false','No'),
  1038. ('pdf_export_watermark_by_course','true','Yes'),
  1039. ('pdf_export_watermark_by_course','false','No'),
  1040. ('enabled_insertHtml','true','Yes'),
  1041. ('enabled_insertHtml','false','No'),
  1042. ('students_export2pdf','true','Yes'),
  1043. ('students_export2pdf','false','No'),
  1044. ('show_users_folders','true','Yes'),
  1045. ('show_users_folders','false','No'),
  1046. ('show_default_folders','true','Yes'),
  1047. ('show_default_folders','false','No'),
  1048. ('show_chat_folder','true','Yes'),
  1049. ('show_chat_folder','false','No'),
  1050. ('enabled_text2audio','true','Yes'),
  1051. ('enabled_text2audio','false','No'),
  1052. ('enabled_support_pixlr','true','Yes'),
  1053. ('enabled_support_pixlr','false','No'),
  1054. ('show_groups_to_users','true','Yes'),
  1055. ('show_groups_to_users','false','No'),
  1056. ('accessibility_font_resize', 'true', 'Yes'),
  1057. ('accessibility_font_resize', 'false', 'No'),
  1058. ('hide_courses_in_sessions','true','Yes'),
  1059. ('hide_courses_in_sessions','false','No'),
  1060. ('enable_quiz_scenario', 'true', 'Yes'),
  1061. ('enable_quiz_scenario', 'false', 'No'),
  1062. ('enable_nanogong','true','Yes'),
  1063. ('enable_nanogong','false','No'),
  1064. ('show_documents_preview', 'true', 'Yes'),
  1065. ('show_documents_preview', 'false', 'No'),
  1066. ('htmlpurifier_wiki', 'true', 'Yes'),
  1067. ('htmlpurifier_wiki', 'false', 'No'),
  1068. ('cas_activate', 'true', 'Yes'),
  1069. ('cas_activate', 'false', 'No'),
  1070. ('cas_protocol', 'CAS1', 'CAS1Text'),
  1071. ('cas_protocol', 'CAS2', 'CAS2Text'),
  1072. ('cas_protocol', 'SAML', 'SAMLText'),
  1073. ('cas_add_user_activate', 'false', 'No'),
  1074. ('cas_add_user_activate', 'platform', 'casAddUserActivatePlatform'),
  1075. ('cas_add_user_activate', 'extldap', 'casAddUserActivateLDAP'),
  1076. ('update_user_info_cas_with_ldap', 'true', 'Yes'),
  1077. ('update_user_info_cas_with_ldap', 'false', 'No'),
  1078. ('scorm_cumulative_session_time','true','Yes'),
  1079. ('scorm_cumulative_session_time','false','No'),
  1080. ('allow_hr_skills_management', 'true', 'Yes'),
  1081. ('allow_hr_skills_management', 'false', 'No'),
  1082. ('enable_help_link', 'true', 'Yes'),
  1083. ('enable_help_link', 'false', 'No'),
  1084. ('allow_users_to_change_email_with_no_password', 'true', 'Yes'),
  1085. ('allow_users_to_change_email_with_no_password', 'false', 'No'),
  1086. ('show_admin_toolbar', 'do_not_show', 'DoNotShow'),
  1087. ('show_admin_toolbar', 'show_to_admin', 'ShowToAdminsOnly'),
  1088. ('show_admin_toolbar', 'show_to_admin_and_teachers', 'ShowToAdminsAndTeachers'),
  1089. ('show_admin_toolbar', 'show_to_all', 'ShowToAllUsers'),
  1090. ('use_custom_pages','true','Yes'),
  1091. ('use_custom_pages','false','No'),
  1092. ('languagePriority1','platform_lang','PlatformLanguage'),
  1093. ('languagePriority1','user_profil_lang','UserLanguage'),
  1094. ('languagePriority1','user_selected_lang','UserSelectedLanguage'),
  1095. ('languagePriority1','course_lang','CourseLanguage'),
  1096. ('languagePriority2','platform_lang','PlatformLanguage'),
  1097. ('languagePriority2','user_profil_lang','UserLanguage'),
  1098. ('languagePriority2','user_selected_lang','UserSelectedLanguage'),
  1099. ('languagePriority2','course_lang','CourseLanguage'),
  1100. ('languagePriority3','platform_lang','PlatformLanguage'),
  1101. ('languagePriority3','user_profil_lang','UserLanguage'),
  1102. ('languagePriority3','user_selected_lang','UserSelectedLanguage'),
  1103. ('languagePriority3','course_lang','CourseLanguage'),
  1104. ('languagePriority4','platform_lang','PlatformLanguage'),
  1105. ('languagePriority4','user_profil_lang','UserLanguage'),
  1106. ('languagePriority4','user_selected_lang','UserSelectedLanguage'),
  1107. ('languagePriority4','course_lang','CourseLanguage'),
  1108. ('allow_global_chat', 'true', 'Yes'),
  1109. ('allow_global_chat', 'false', 'No'),
  1110. ('login_is_email','true','Yes'),
  1111. ('login_is_email','false','No'),
  1112. ('courses_default_creation_visibility', '3', 'OpenToTheWorld'),
  1113. ('courses_default_creation_visibility', '2', 'OpenToThePlatform'),
  1114. ('courses_default_creation_visibility', '1', 'Private'),
  1115. ('courses_default_creation_visibility', '0', 'CourseVisibilityClosed'),
  1116. ('allow_browser_sniffer', 'true', 'Yes'),
  1117. ('allow_browser_sniffer', 'false', 'No'),
  1118. ('enable_wami_record', 'true', 'Yes'),
  1119. ('enable_wami_record', 'false', 'No'),
  1120. ('teachers_can_change_score_settings', 'true', 'Yes'),
  1121. ('teachers_can_change_score_settings', 'false', 'No'),
  1122. ('teachers_can_change_grade_model_settings', 'true', 'Yes'),
  1123. ('teachers_can_change_grade_model_settings', 'false', 'No'),
  1124. ('gradebook_locking_enabled', 'true', 'Yes'),
  1125. ('gradebook_locking_enabled', 'false', 'No'),
  1126. ('gradebook_enable_grade_model', 'true', 'Yes'),
  1127. ('gradebook_enable_grade_model', 'false', 'No'),
  1128. ('allow_session_admins_to_manage_all_sessions', 'true', 'Yes'),
  1129. ('allow_session_admins_to_manage_all_sessions', 'false', 'No'),
  1130. ('allow_skills_tool', 'true', 'Yes'),
  1131. ('allow_skills_tool', 'false', 'No'),
  1132. ('allow_public_certificates', 'true', 'Yes'),
  1133. ('allow_public_certificates', 'false', 'No'),
  1134. ('platform_unsubscribe_allowed', 'true', 'Yes'),
  1135. ('platform_unsubscribe_allowed', 'false', 'No'),
  1136. ('activate_email_template', 'true', 'Yes'),
  1137. ('activate_email_template', 'false', 'No'),
  1138. ('enable_iframe_inclusion', 'true', 'Yes'),
  1139. ('enable_iframe_inclusion', 'false', 'No'),
  1140. ('show_hot_courses', 'true', 'Yes'),
  1141. ('show_hot_courses', 'false', 'No'),
  1142. ('enable_webcam_clip', 'true', 'Yes'),
  1143. ('enable_webcam_clip', 'false', 'No');
  1144. UNLOCK TABLES;
  1145. /*!40000 ALTER TABLE settings_options ENABLE KEYS */;
  1146. --
  1147. -- Table structure for table sys_announcement
  1148. --
  1149. DROP TABLE IF EXISTS sys_announcement;
  1150. CREATE TABLE IF NOT EXISTS sys_announcement (
  1151. id int unsigned NOT NULL auto_increment,
  1152. date_start datetime NOT NULL default '0000-00-00 00:00:00',
  1153. date_end datetime NOT NULL default '0000-00-00 00:00:00',
  1154. visible_teacher tinyint NOT NULL default 0,
  1155. visible_student tinyint NOT NULL default 0,
  1156. visible_guest tinyint NOT NULL default 0,
  1157. title varchar(250) NOT NULL default '',
  1158. content text NOT NULL,
  1159. lang varchar(70) NULL default NULL,
  1160. access_url_id INT NOT NULL default 1,
  1161. PRIMARY KEY (id)
  1162. );
  1163. --
  1164. -- Table structure for shared_survey
  1165. --
  1166. DROP TABLE IF EXISTS shared_survey;
  1167. CREATE TABLE IF NOT EXISTS shared_survey (
  1168. survey_id int unsigned NOT NULL auto_increment,
  1169. code varchar(20) default NULL,
  1170. title text default NULL,
  1171. subtitle text default NULL,
  1172. author varchar(250) default NULL,
  1173. lang varchar(20) default NULL,
  1174. template varchar(20) default NULL,
  1175. intro text,
  1176. surveythanks text,
  1177. creation_date datetime NOT NULL default '0000-00-00 00:00:00',
  1178. course_code varchar(40) NOT NULL default '',
  1179. PRIMARY KEY (survey_id),
  1180. UNIQUE KEY id (survey_id)
  1181. );
  1182. -- --------------------------------------------------------
  1183. --
  1184. -- Table structure for shared_survey_question
  1185. --
  1186. DROP TABLE IF EXISTS shared_survey_question;
  1187. CREATE TABLE IF NOT EXISTS shared_survey_question (
  1188. question_id int NOT NULL auto_increment,
  1189. survey_id int NOT NULL default '0',
  1190. survey_question text NOT NULL,
  1191. survey_question_comment text NOT NULL,
  1192. type varchar(250) NOT NULL default '',
  1193. display varchar(10) NOT NULL default '',
  1194. sort int NOT NULL default '0',
  1195. code varchar(40) NOT NULL default '',
  1196. max_value int NOT NULL,
  1197. PRIMARY KEY (question_id)
  1198. );
  1199. -- --------------------------------------------------------
  1200. --
  1201. -- Table structure for shared_survey_question_option
  1202. --
  1203. DROP TABLE IF EXISTS shared_survey_question_option;
  1204. CREATE TABLE IF NOT EXISTS shared_survey_question_option (
  1205. question_option_id int NOT NULL auto_increment,
  1206. question_id int NOT NULL default '0',
  1207. survey_id int NOT NULL default '0',
  1208. option_text text NOT NULL,
  1209. sort int NOT NULL default '0',
  1210. PRIMARY KEY (question_option_id)
  1211. );
  1212. -- --------------------------------------------------------
  1213. --
  1214. -- Table structure for templates (User's FCKEditor templates)
  1215. --
  1216. DROP TABLE IF EXISTS templates;
  1217. CREATE TABLE IF NOT EXISTS templates (
  1218. id int NOT NULL auto_increment,
  1219. title varchar(100) NOT NULL,
  1220. description varchar(250) NOT NULL,
  1221. course_code varchar(40) NOT NULL,
  1222. user_id int NOT NULL,
  1223. ref_doc int NOT NULL,
  1224. image varchar(250) NOT NULL,
  1225. PRIMARY KEY (id)
  1226. );
  1227. --
  1228. -- --------------------------------------------------------
  1229. --
  1230. -- Table structure of openid_association (keep info on openid servers)
  1231. --
  1232. DROP TABLE IF EXISTS openid_association;
  1233. CREATE TABLE IF NOT EXISTS openid_association (
  1234. id int NOT NULL auto_increment,
  1235. idp_endpoint_uri text NOT NULL,
  1236. session_type varchar(30) NOT NULL,
  1237. assoc_handle text NOT NULL,
  1238. assoc_type text NOT NULL,
  1239. expires_in bigint NOT NULL,
  1240. mac_key text NOT NULL,
  1241. created bigint NOT NULL,
  1242. PRIMARY KEY (id)
  1243. );
  1244. --
  1245. -- --------------------------------------------------------
  1246. --
  1247. -- Tables for gradebook
  1248. --
  1249. DROP TABLE IF EXISTS gradebook_category;
  1250. CREATE TABLE IF NOT EXISTS gradebook_category (
  1251. id int NOT NULL auto_increment,
  1252. name text NOT NULL,
  1253. description text,
  1254. user_id int NOT NULL,
  1255. course_code varchar(40) default NULL,
  1256. parent_id int default NULL,
  1257. weight float NOT NULL,
  1258. visible tinyint NOT NULL,
  1259. certif_min_score int DEFAULT NULL,
  1260. session_id int DEFAULT NULL,
  1261. document_id int unsigned DEFAULT NULL,
  1262. locked int NOT NULL DEFAULT 0,
  1263. default_lowest_eval_exclude TINYINT default null,
  1264. PRIMARY KEY (id)
  1265. );
  1266. DROP TABLE IF EXISTS gradebook_evaluation;
  1267. CREATE TABLE IF NOT EXISTS gradebook_evaluation (
  1268. id int unsigned NOT NULL auto_increment,
  1269. name text NOT NULL,
  1270. description text,
  1271. user_id int NOT NULL,
  1272. course_code varchar(40) default NULL,
  1273. category_id int default NULL,
  1274. created_at DATETIME NOT NULL default '0000-00-00 00:00:00',
  1275. weight FLOAT NOT NULL,
  1276. max float unsigned NOT NULL,
  1277. visible int NOT NULL,
  1278. type varchar(40) NOT NULL default 'evaluation',
  1279. locked int NOT NULL DEFAULT 0,
  1280. PRIMARY KEY (id)
  1281. );
  1282. DROP TABLE IF EXISTS gradebook_link;
  1283. CREATE TABLE IF NOT EXISTS gradebook_link (
  1284. id int NOT NULL auto_increment,
  1285. type int NOT NULL,
  1286. ref_id int NOT NULL,
  1287. user_id int NOT NULL,
  1288. course_code varchar(40) NOT NULL,
  1289. category_id int NOT NULL,
  1290. created_at DATETIME NOT NULL default '0000-00-00 00:00:00',
  1291. weight float NOT NULL,
  1292. visible int NOT NULL,
  1293. locked int NOT NULL DEFAULT 0,
  1294. PRIMARY KEY (id)
  1295. );
  1296. DROP TABLE IF EXISTS gradebook_result;
  1297. CREATE TABLE IF NOT EXISTS gradebook_result (
  1298. id int NOT NULL auto_increment,
  1299. user_id int NOT NULL,
  1300. evaluation_id int NOT NULL,
  1301. created_at DATETIME NOT NULL default '0000-00-00 00:00:00',
  1302. score float unsigned default NULL,
  1303. PRIMARY KEY (id)
  1304. );
  1305. DROP TABLE IF EXISTS gradebook_score_display;
  1306. CREATE TABLE IF NOT EXISTS gradebook_score_display (
  1307. id int NOT NULL auto_increment,
  1308. score float unsigned NOT NULL,
  1309. display varchar(40) NOT NULL,
  1310. category_id int NOT NULL default 0,
  1311. score_color_percent float unsigned NOT NULL default 0,
  1312. PRIMARY KEY (id)
  1313. );
  1314. ALTER TABLE gradebook_score_display ADD INDEX(category_id);
  1315. DROP TABLE IF EXISTS user_field;
  1316. CREATE TABLE IF NOT EXISTS user_field (
  1317. id INT NOT NULL auto_increment,
  1318. field_type int NOT NULL DEFAULT 1,
  1319. field_variable varchar(64) NOT NULL,
  1320. field_display_text varchar(64),
  1321. field_default_value text,
  1322. field_order int,
  1323. field_visible tinyint default 0,
  1324. field_changeable tinyint default 0,
  1325. field_filter tinyint default 0,
  1326. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  1327. PRIMARY KEY(id)
  1328. );
  1329. DROP TABLE IF EXISTS user_field_options;
  1330. CREATE TABLE IF NOT EXISTS user_field_options (
  1331. id int NOT NULL auto_increment,
  1332. field_id int NOT NULL,
  1333. option_value text,
  1334. option_display_text varchar(64),
  1335. option_order int,
  1336. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  1337. PRIMARY KEY (id)
  1338. );
  1339. DROP TABLE IF EXISTS user_field_values;
  1340. CREATE TABLE IF NOT EXISTS user_field_values(
  1341. id bigint NOT NULL auto_increment,
  1342. user_id int unsigned NOT NULL,
  1343. field_id int NOT NULL,
  1344. field_value text,
  1345. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  1346. PRIMARY KEY(id)
  1347. );
  1348. ALTER TABLE user_field_values ADD INDEX (user_id, field_id);
  1349. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (1, 'legal_accept','Legal',0,0);
  1350. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (1, 'already_logged_in','Already logged in',0,0);
  1351. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (1, 'update_type','Update script type',0,0);
  1352. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (10, 'tags','tags',0,0);
  1353. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (1, 'rssfeeds','RSS',0,0);
  1354. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (1, 'dashboard', 'Dashboard', 0, 0);
  1355. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (11, 'timezone', 'Timezone', 0, 0);
  1356. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable, field_default_value) values (4, 'mail_notify_invitation', 'MailNotifyInvitation',1,1,'1');
  1357. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable, field_default_value) values (4, 'mail_notify_message', 'MailNotifyMessage',1,1,'1');
  1358. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable, field_default_value) values (4, 'mail_notify_group_message','MailNotifyGroupMessage',1,1,'1');
  1359. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (1, 'user_chat_status','User chat status',0,0);
  1360. INSERT INTO user_field (field_type, field_variable, field_display_text, field_visible, field_changeable) VALUES (1, 'google_calendar_url','Google Calendar URL',0,0);
  1361. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (8, '1', 'AtOnce',1);
  1362. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (8, '8', 'Daily',2);
  1363. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (8, '0', 'No',3);
  1364. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (9, '1', 'AtOnce',1);
  1365. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (9, '8', 'Daily',2);
  1366. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (9, '0', 'No',3);
  1367. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (10, '1', 'AtOnce',1);
  1368. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (10, '8', 'Daily',2);
  1369. INSERT INTO user_field_options (field_id, option_value, option_display_text, option_order) values (10, '0', 'No',3);
  1370. DROP TABLE IF EXISTS gradebook_result_log;
  1371. CREATE TABLE IF NOT EXISTS gradebook_result_log (
  1372. id int NOT NULL auto_increment,
  1373. id_result int NOT NULL,
  1374. user_id int NOT NULL,
  1375. evaluation_id int NOT NULL,
  1376. created_at DATETIME NOT NULL default '0000-00-00 00:00:00',
  1377. score float unsigned default NULL,
  1378. PRIMARY KEY(id)
  1379. );
  1380. DROP TABLE IF EXISTS gradebook_linkeval_log;
  1381. CREATE TABLE IF NOT EXISTS gradebook_linkeval_log (
  1382. id int NOT NULL auto_increment,
  1383. id_linkeval_log int NOT NULL,
  1384. name text,
  1385. description text,
  1386. created_at DATETIME NOT NULL default '0000-00-00 00:00:00',
  1387. weight smallint default NULL,
  1388. visible tinyint default NULL,
  1389. type varchar(20) NOT NULL,
  1390. user_id_log int NOT NULL,
  1391. PRIMARY KEY (id)
  1392. );
  1393. --
  1394. -- --------------------------------------------------------
  1395. --
  1396. -- Tables for the access URL feature
  1397. --
  1398. DROP TABLE IF EXISTS access_url;
  1399. CREATE TABLE IF NOT EXISTS access_url(
  1400. id int unsigned NOT NULL auto_increment,
  1401. url varchar(255) NOT NULL,
  1402. description text,
  1403. active int unsigned not null default 0,
  1404. created_by int not null,
  1405. tms DATETIME NOT NULL default '0000-00-00 00:00:00',
  1406. PRIMARY KEY (id)
  1407. );
  1408. INSERT INTO access_url(url, description, active, created_by) VALUES ('http://localhost/',' ',1,1);
  1409. DROP TABLE IF EXISTS access_url_rel_user;
  1410. CREATE TABLE IF NOT EXISTS access_url_rel_user (
  1411. access_url_id int unsigned NOT NULL,
  1412. user_id int unsigned NOT NULL,
  1413. PRIMARY KEY (access_url_id, user_id)
  1414. );
  1415. ALTER TABLE access_url_rel_user ADD INDEX idx_access_url_rel_user_user (user_id);
  1416. ALTER TABLE access_url_rel_user ADD INDEX idx_access_url_rel_user_access_url(access_url_id);
  1417. ALTER TABLE access_url_rel_user ADD INDEX idx_access_url_rel_user_access_url_user (user_id,access_url_id);
  1418. -- Adding admin to the first portal
  1419. INSERT INTO access_url_rel_user VALUES(1, 1);
  1420. DROP TABLE IF EXISTS access_url_rel_course;
  1421. CREATE TABLE IF NOT EXISTS access_url_rel_course (
  1422. access_url_id int unsigned NOT NULL,
  1423. course_code char(40) NOT NULL,
  1424. PRIMARY KEY (access_url_id, course_code)
  1425. );
  1426. DROP TABLE IF EXISTS access_url_rel_session;
  1427. CREATE TABLE IF NOT EXISTS access_url_rel_session (
  1428. access_url_id int unsigned NOT NULL,
  1429. session_id int unsigned NOT NULL,
  1430. PRIMARY KEY (access_url_id, session_id)
  1431. );
  1432. --
  1433. -- Table structure for table sys_calendar
  1434. --
  1435. DROP TABLE IF EXISTS sys_calendar;
  1436. CREATE TABLE IF NOT EXISTS sys_calendar (
  1437. id int unsigned NOT NULL auto_increment,
  1438. title varchar(255) NOT NULL,
  1439. content text,
  1440. start_date datetime NOT NULL default '0000-00-00 00:00:00',
  1441. end_date datetime NOT NULL default '0000-00-00 00:00:00',
  1442. access_url_id INT NOT NULL default 1,
  1443. all_day INT NOT NULL DEFAULT 0,
  1444. PRIMARY KEY (id)
  1445. );
  1446. DROP TABLE IF EXISTS system_template;
  1447. CREATE TABLE IF NOT EXISTS system_template (
  1448. id int UNSIGNED NOT NULL auto_increment,
  1449. title varchar(250) NOT NULL,
  1450. comment text NOT NULL,
  1451. image varchar(250) NOT NULL,
  1452. content text NOT NULL,
  1453. PRIMARY KEY (id)
  1454. );
  1455. -- Adding the platform templates
  1456. INSERT INTO system_template (title, comment, image, content) VALUES
  1457. ('TemplateTitleCourseTitle', 'TemplateTitleCourseTitleDescription', 'coursetitle.gif', '
  1458. <head>
  1459. {CSS}
  1460. <style type="text/css">
  1461. .gris_title {
  1462. color: silver;
  1463. }
  1464. h1
  1465. {
  1466. text-align: right;
  1467. }
  1468. </style>
  1469. </head>
  1470. <body>
  1471. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1472. <tbody>
  1473. <tr>
  1474. <td style="vertical-align: middle; width: 50%;" colspan="1" rowspan="1">
  1475. <h1>TITULUS 1<br>
  1476. <span class="gris_title">TITULUS 2</span><br>
  1477. </h1>
  1478. </td>
  1479. <td style="width: 50%;">
  1480. <img style="width: 100px; height: 100px;" alt="dokeos logo" src="{COURSE_DIR}images/logo_dokeos.png"></td>
  1481. </tr>
  1482. </tbody>
  1483. </table>
  1484. <p><br>
  1485. <br>
  1486. </p>
  1487. </body>
  1488. ');
  1489. /*
  1490. INSERT INTO system_template (title, comment, image, content) VALUES
  1491. ('TemplateTitleCheckList', 'TemplateTitleCheckListDescription', 'checklist.gif', '
  1492. <head>
  1493. {CSS}
  1494. </head>
  1495. <body>
  1496. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1497. <tbody>
  1498. <tr>
  1499. <td style="vertical-align: top; width: 66%;">
  1500. <h3>Lorem ipsum dolor sit amet</h3>
  1501. <ul>
  1502. <li>consectetur adipisicing elit</li>
  1503. <li>sed do eiusmod tempor incididunt</li>
  1504. <li>ut labore et dolore magna aliqua</li>
  1505. </ul>
  1506. <h3>Ut enim ad minim veniam</h3>
  1507. <ul>
  1508. <li>quis nostrud exercitation ullamco</li>
  1509. <li>laboris nisi ut aliquip ex ea commodo consequat</li>
  1510. <li>Excepteur sint occaecat cupidatat non proident</li>
  1511. </ul>
  1512. <h3>Sed ut perspiciatis unde omnis</h3>
  1513. <ul>
  1514. <li>iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam</li>
  1515. <li>eaque ipsa quae ab illo inventore veritatis</li>
  1516. <li>et quasi architecto beatae vitae dicta sunt explicabo.&nbsp;</li>
  1517. </ul>
  1518. </td>
  1519. <td style="background: transparent url({IMG_DIR}postit.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 33%; text-align: center; vertical-align: bottom;">
  1520. <h3>Ut enim ad minima</h3>
  1521. Veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur.<br>
  1522. <h3>
  1523. <img style="width: 180px; height: 144px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_smile.png "><br></h3>
  1524. </td>
  1525. </tr>
  1526. </tbody>
  1527. </table>
  1528. <p><br>
  1529. <br>
  1530. </p>
  1531. </body>
  1532. ');
  1533. */
  1534. INSERT INTO system_template (title, comment, image, content) VALUES
  1535. ('TemplateTitleTeacher', 'TemplateTitleTeacherDescription', 'yourinstructor.gif', '
  1536. <head>
  1537. {CSS}
  1538. <style type="text/css">
  1539. .text
  1540. {
  1541. font-weight: normal;
  1542. }
  1543. </style>
  1544. </head>
  1545. <body>
  1546. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1547. <tbody>
  1548. <tr>
  1549. <td></td>
  1550. <td style="height: 33%;"></td>
  1551. <td></td>
  1552. </tr>
  1553. <tr>
  1554. <td style="width: 25%;"></td>
  1555. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right; font-weight: bold;" colspan="1" rowspan="1">
  1556. <span class="text">
  1557. <br>
  1558. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis pellentesque.</span>
  1559. </td>
  1560. <td style="width: 25%; font-weight: bold;">
  1561. <img style="width: 180px; height: 241px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_case.png "></td>
  1562. </tr>
  1563. </tbody>
  1564. </table>
  1565. <p><br>
  1566. <br>
  1567. </p>
  1568. </body>
  1569. ');
  1570. INSERT INTO system_template (title, comment, image, content) VALUES
  1571. ('TemplateTitleLeftList', 'TemplateTitleListLeftListDescription', 'leftlist.gif', '
  1572. <head>
  1573. {CSS}
  1574. </head>
  1575. <body>
  1576. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1577. <tbody>
  1578. <tr>
  1579. <td style="width: 66%;"></td>
  1580. <td style="vertical-align: bottom; width: 33%;" colspan="1" rowspan="4">&nbsp;<img style="width: 180px; height: 248px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_reads.png "><br>
  1581. </td>
  1582. </tr>
  1583. <tr align="right">
  1584. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">Lorem
  1585. ipsum dolor sit amet.
  1586. </td>
  1587. </tr>
  1588. <tr align="right">
  1589. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">
  1590. Vivamus
  1591. a quam.&nbsp;<br>
  1592. </td>
  1593. </tr>
  1594. <tr align="right">
  1595. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">
  1596. Proin
  1597. a est stibulum ante ipsum.</td>
  1598. </tr>
  1599. </tbody>
  1600. </table>
  1601. <p><br>
  1602. <br>
  1603. </p>
  1604. </body>
  1605. ');
  1606. INSERT INTO system_template (title, comment, image, content) VALUES
  1607. ('TemplateTitleLeftRightList', 'TemplateTitleLeftRightListDescription', 'leftrightlist.gif', '
  1608. <head>
  1609. {CSS}
  1610. </head>
  1611. <body>
  1612. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; height: 400px; width: 720px;" border="0" cellpadding="15" cellspacing="6">
  1613. <tbody>
  1614. <tr>
  1615. <td></td>
  1616. <td style="vertical-align: top;" colspan="1" rowspan="4">&nbsp;<img style="width: 180px; height: 294px;" alt="Trainer" src="{COURSE_DIR}images/trainer/trainer_join_hands.png "><br>
  1617. </td>
  1618. <td></td>
  1619. </tr>
  1620. <tr>
  1621. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right;">Lorem
  1622. ipsum dolor sit amet.
  1623. </td>
  1624. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: left;">
  1625. Convallis
  1626. ut.&nbsp;Cras dui magna.</td>
  1627. </tr>
  1628. <tr>
  1629. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right;">
  1630. Vivamus
  1631. a quam.&nbsp;<br>
  1632. </td>
  1633. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: left;">
  1634. Etiam
  1635. lacinia stibulum ante.<br>
  1636. </td>
  1637. </tr>
  1638. <tr>
  1639. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right;">
  1640. Proin
  1641. a est stibulum ante ipsum.</td>
  1642. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: left;">
  1643. Consectetuer
  1644. adipiscing elit. <br>
  1645. </td>
  1646. </tr>
  1647. </tbody>
  1648. </table>
  1649. <p><br>
  1650. <br>
  1651. </p>
  1652. </body>
  1653. ');
  1654. INSERT INTO system_template (title, comment, image, content) VALUES
  1655. ('TemplateTitleRightList', 'TemplateTitleRightListDescription', 'rightlist.gif', '
  1656. <head>
  1657. {CSS}
  1658. </head>
  1659. <body style="direction: ltr;">
  1660. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1661. <tbody>
  1662. <tr>
  1663. <td style="vertical-align: bottom; width: 50%;" colspan="1" rowspan="4"><img style="width: 300px; height: 199px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_points_right.png"><br>
  1664. </td>
  1665. <td style="width: 50%;"></td>
  1666. </tr>
  1667. <tr>
  1668. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; text-align: left; width: 50%;">
  1669. Convallis
  1670. ut.&nbsp;Cras dui magna.</td>
  1671. </tr>
  1672. <tr>
  1673. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; text-align: left; width: 50%;">
  1674. Etiam
  1675. lacinia.<br>
  1676. </td>
  1677. </tr>
  1678. <tr>
  1679. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; text-align: left; width: 50%;">
  1680. Consectetuer
  1681. adipiscing elit. <br>
  1682. </td>
  1683. </tr>
  1684. </tbody>
  1685. </table>
  1686. <p><br>
  1687. <br>
  1688. </p>
  1689. </body>
  1690. ');
  1691. /*
  1692. INSERT INTO system_template (title, comment, image, content) VALUES
  1693. ('TemplateTitleComparison', 'TemplateTitleComparisonDescription', 'compare.gif', '
  1694. <head>
  1695. {CSS}
  1696. </head>
  1697. <body>
  1698. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1699. <tr>
  1700. <td style="height: 10%; width: 33%;"></td>
  1701. <td style="vertical-align: top; width: 33%;" colspan="1" rowspan="2">&nbsp;<img style="width: 180px; height: 271px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_standing.png "><br>
  1702. </td>
  1703. <td style="height: 10%; width: 33%;"></td>
  1704. </tr>
  1705. <tr>
  1706. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 33%; text-align: right;">
  1707. Lorem ipsum dolor sit amet.
  1708. </td>
  1709. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; text-align: left; width: 33%;">
  1710. Convallis
  1711. ut.&nbsp;Cras dui magna.</td>
  1712. </tr>
  1713. </body>
  1714. ');
  1715. */
  1716. INSERT INTO system_template (title, comment, image, content) VALUES
  1717. ('TemplateTitleDiagram', 'TemplateTitleDiagramDescription', 'diagram.gif', '
  1718. <head>
  1719. {CSS}
  1720. </head>
  1721. <body>
  1722. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1723. <tbody>
  1724. <tr>
  1725. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; text-align: left; height: 33%; width: 33%;">
  1726. <br>
  1727. Etiam
  1728. lacinia stibulum ante.
  1729. Convallis
  1730. ut.&nbsp;Cras dui magna.</td>
  1731. <td colspan="1" rowspan="3">
  1732. <img style="width: 350px; height: 267px;" alt="Alaska chart" src="{COURSE_DIR}images/diagrams/alaska_chart.png "></td>
  1733. </tr>
  1734. <tr>
  1735. <td colspan="1" rowspan="1">
  1736. <img style="width: 300px; height: 199px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_points_right.png "></td>
  1737. </tr>
  1738. <tr>
  1739. </tr>
  1740. </tbody>
  1741. </table>
  1742. <p><br>
  1743. <br>
  1744. </p>
  1745. </body>
  1746. ');
  1747. INSERT INTO system_template (title, comment, image, content) VALUES
  1748. ('TemplateTitleDesc', 'TemplateTitleCheckListDescription', 'description.gif', '
  1749. <head>
  1750. {CSS}
  1751. </head>
  1752. <body>
  1753. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1754. <tbody>
  1755. <tr>
  1756. <td style="width: 50%; vertical-align: top;">
  1757. <img style="width: 48px; height: 49px; float: left;" alt="01" src="{COURSE_DIR}images/small/01.png " hspace="5"><br>Lorem ipsum dolor sit amet<br><br><br>
  1758. <img style="width: 48px; height: 49px; float: left;" alt="02" src="{COURSE_DIR}images/small/02.png " hspace="5">
  1759. <br>Ut enim ad minim veniam<br><br><br>
  1760. <img style="width: 48px; height: 49px; float: left;" alt="03" src="{COURSE_DIR}images/small/03.png " hspace="5">Duis aute irure dolor in reprehenderit<br><br><br>
  1761. <img style="width: 48px; height: 49px; float: left;" alt="04" src="{COURSE_DIR}images/small/04.png " hspace="5">Neque porro quisquam est</td>
  1762. <td style="vertical-align: top; width: 50%; text-align: right;" colspan="1" rowspan="1">
  1763. <img style="width: 300px; height: 291px;" alt="Gearbox" src="{COURSE_DIR}images/diagrams/gearbox.jpg "><br></td>
  1764. </tr><tr></tr>
  1765. </tbody>
  1766. </table>
  1767. <p><br>
  1768. <br>
  1769. </p>
  1770. </body>
  1771. ');
  1772. /*
  1773. INSERT INTO system_template (title, comment, image, content) VALUES
  1774. ('TemplateTitleObjectives', 'TemplateTitleObjectivesDescription', 'courseobjectives.gif', '
  1775. <head>
  1776. {CSS}
  1777. </head>
  1778. <body>
  1779. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1780. <tbody>
  1781. <tr>
  1782. <td style="vertical-align: bottom; width: 33%;" colspan="1" rowspan="2">
  1783. <img style="width: 180px; height: 271px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_chair.png "><br>
  1784. </td>
  1785. <td style="height: 10%; width: 66%;"></td>
  1786. </tr>
  1787. <tr>
  1788. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; text-align: left; width: 66%;">
  1789. <h3>Lorem ipsum dolor sit amet</h3>
  1790. <ul>
  1791. <li>consectetur adipisicing elit</li>
  1792. <li>sed do eiusmod tempor incididunt</li>
  1793. <li>ut labore et dolore magna aliqua</li>
  1794. </ul>
  1795. <h3>Ut enim ad minim veniam</h3>
  1796. <ul>
  1797. <li>quis nostrud exercitation ullamco</li>
  1798. <li>laboris nisi ut aliquip ex ea commodo consequat</li>
  1799. <li>Excepteur sint occaecat cupidatat non proident</li>
  1800. </ul>
  1801. </td>
  1802. </tr>
  1803. </tbody>
  1804. </table>
  1805. <p><br>
  1806. <br>
  1807. </p>
  1808. </body>
  1809. ');
  1810. */
  1811. INSERT INTO system_template (title, comment, image, content) VALUES
  1812. ('TemplateTitleCycle', 'TemplateTitleCycleDescription', 'cyclechart.gif', '
  1813. <head>
  1814. {CSS}
  1815. <style>
  1816. .title
  1817. {
  1818. color: white; font-weight: bold;
  1819. }
  1820. </style>
  1821. </head>
  1822. <body>
  1823. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="8" cellspacing="6">
  1824. <tbody>
  1825. <tr>
  1826. <td style="text-align: center; vertical-align: bottom; height: 10%;" colspan="3" rowspan="1">
  1827. <img style="width: 250px; height: 76px;" alt="arrow" src="{COURSE_DIR}images/diagrams/top_arrow.png ">
  1828. </td>
  1829. </tr>
  1830. <tr>
  1831. <td style="height: 5%; width: 45%; vertical-align: top; background-color: rgb(153, 153, 153); text-align: center;">
  1832. <span class="title">Lorem ipsum</span>
  1833. </td>
  1834. <td style="height: 5%; width: 10%;"></td>
  1835. <td style="height: 5%; vertical-align: top; background-color: rgb(153, 153, 153); text-align: center;">
  1836. <span class="title">Sed ut perspiciatis</span>
  1837. </td>
  1838. </tr>
  1839. <tr>
  1840. <td style="background-color: rgb(204, 204, 255); width: 45%; vertical-align: top;">
  1841. <ul>
  1842. <li>dolor sit amet</li>
  1843. <li>consectetur adipisicing elit</li>
  1844. <li>sed do eiusmod tempor&nbsp;</li>
  1845. <li>adipisci velit, sed quia non numquam</li>
  1846. <li>eius modi tempora incidunt ut labore et dolore magnam</li>
  1847. </ul>
  1848. </td>
  1849. <td style="width: 10%;"></td>
  1850. <td style="background-color: rgb(204, 204, 255); width: 45%; vertical-align: top;">
  1851. <ul>
  1852. <li>ut enim ad minim veniam</li>
  1853. <li>quis nostrud exercitation</li><li>ullamco laboris nisi ut</li>
  1854. <li> Quis autem vel eum iure reprehenderit qui in ea</li>
  1855. <li>voluptate velit esse quam nihil molestiae consequatur,</li>
  1856. </ul>
  1857. </td>
  1858. </tr>
  1859. <tr align="center">
  1860. <td style="height: 10%; vertical-align: top;" colspan="3" rowspan="1">
  1861. <img style="width: 250px; height: 76px;" alt="arrow" src="{COURSE_DIR}images/diagrams/bottom_arrow.png ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
  1862. </td>
  1863. </tr>
  1864. </tbody>
  1865. </table>
  1866. <p><br>
  1867. <br>
  1868. </p>
  1869. </body>
  1870. ');
  1871. /*
  1872. INSERT INTO system_template (title, comment, image, content) VALUES
  1873. ('TemplateTitleLearnerWonder', 'TemplateTitleLearnerWonderDescription', 'learnerwonder.gif', '
  1874. <head>
  1875. {CSS}
  1876. </head>
  1877. <body>
  1878. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1879. <tbody>
  1880. <tr>
  1881. <td style="width: 33%;" colspan="1" rowspan="4">
  1882. <img style="width: 120px; height: 348px;" alt="learner wonders" src="{COURSE_DIR}images/silhouette.png "><br>
  1883. </td>
  1884. <td style="width: 66%;"></td>
  1885. </tr>
  1886. <tr align="center">
  1887. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">
  1888. Convallis
  1889. ut.&nbsp;Cras dui magna.</td>
  1890. </tr>
  1891. <tr align="center">
  1892. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">
  1893. Etiam
  1894. lacinia stibulum ante.<br>
  1895. </td>
  1896. </tr>
  1897. <tr align="center">
  1898. <td style="background: transparent url({IMG_DIR}faded_grey.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 66%;">
  1899. Consectetuer
  1900. adipiscing elit. <br>
  1901. </td>
  1902. </tr>
  1903. </tbody>
  1904. </table>
  1905. <p><br>
  1906. <br>
  1907. </p>
  1908. </body>
  1909. ');
  1910. */
  1911. INSERT INTO system_template (title, comment, image, content) VALUES
  1912. ('TemplateTitleTimeline', 'TemplateTitleTimelineDescription', 'phasetimeline.gif', '
  1913. <head>
  1914. {CSS}
  1915. <style>
  1916. .title
  1917. {
  1918. font-weight: bold; text-align: center;
  1919. }
  1920. </style>
  1921. </head>
  1922. <body>
  1923. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="8" cellspacing="5">
  1924. <tbody>
  1925. <tr class="title">
  1926. <td style="vertical-align: top; height: 3%; background-color: rgb(224, 224, 224);">Lorem ipsum</td>
  1927. <td style="height: 3%;"></td>
  1928. <td style="vertical-align: top; height: 3%; background-color: rgb(237, 237, 237);">Perspiciatis</td>
  1929. <td style="height: 3%;"></td>
  1930. <td style="vertical-align: top; height: 3%; background-color: rgb(245, 245, 245);">Nemo enim</td>
  1931. </tr>
  1932. <tr>
  1933. <td style="vertical-align: top; width: 30%; background-color: rgb(224, 224, 224);">
  1934. <ul>
  1935. <li>dolor sit amet</li>
  1936. <li>consectetur</li>
  1937. <li>adipisicing elit</li>
  1938. </ul>
  1939. <br>
  1940. </td>
  1941. <td>
  1942. <img style="width: 32px; height: 32px;" alt="arrow" src="{COURSE_DIR}images/small/arrow.png ">
  1943. </td>
  1944. <td style="vertical-align: top; width: 30%; background-color: rgb(237, 237, 237);">
  1945. <ul>
  1946. <li>ut labore</li>
  1947. <li>et dolore</li>
  1948. <li>magni dolores</li>
  1949. </ul>
  1950. </td>
  1951. <td>
  1952. <img style="width: 32px; height: 32px;" alt="arrow" src="{COURSE_DIR}images/small/arrow.png ">
  1953. </td>
  1954. <td style="vertical-align: top; background-color: rgb(245, 245, 245); width: 30%;">
  1955. <ul>
  1956. <li>neque porro</li>
  1957. <li>quisquam est</li>
  1958. <li>qui dolorem&nbsp;&nbsp;</li>
  1959. </ul>
  1960. <br><br>
  1961. </td>
  1962. </tr>
  1963. </tbody>
  1964. </table>
  1965. <p><br>
  1966. <br>
  1967. </p>
  1968. </body>
  1969. ');
  1970. /*
  1971. INSERT INTO system_template (title, comment, image, content) VALUES
  1972. ('TemplateTitleStopAndThink', 'TemplateTitleStopAndThinkDescription', 'stopthink.gif', '
  1973. <head>
  1974. {CSS}
  1975. </head>
  1976. <body>
  1977. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  1978. <tbody>
  1979. <tr>
  1980. <td style="vertical-align: bottom; width: 33%;" colspan="1" rowspan="2">
  1981. <img style="width: 180px; height: 169px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_staring.png ">
  1982. <br>
  1983. </td>
  1984. <td style="height: 10%; width: 66%;"></td>
  1985. </tr>
  1986. <tr>
  1987. <td style="background: transparent url({IMG_DIR}postit.png ) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 66%; vertical-align: middle; text-align: center;">
  1988. <h3>Attentio sectetur adipisicing elit</h3>
  1989. <ul>
  1990. <li>sed do eiusmod tempor incididunt</li>
  1991. <li>ut labore et dolore magna aliqua</li>
  1992. <li>quis nostrud exercitation ullamco</li>
  1993. </ul><br></td>
  1994. </tr>
  1995. </tbody>
  1996. </table>
  1997. <p><br>
  1998. <br>
  1999. </p>
  2000. </body>
  2001. ');
  2002. */
  2003. INSERT INTO system_template (title, comment, image, content) VALUES
  2004. ('TemplateTitleTable', 'TemplateTitleCheckListDescription', 'table.gif', '
  2005. <head>
  2006. {CSS}
  2007. <style type="text/css">
  2008. .title
  2009. {
  2010. font-weight: bold; text-align: center;
  2011. }
  2012. .items
  2013. {
  2014. text-align: right;
  2015. }
  2016. </style>
  2017. </head>
  2018. <body>
  2019. <br />
  2020. <h2>A table</h2>
  2021. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px;" border="1" cellpadding="5" cellspacing="0">
  2022. <tbody>
  2023. <tr class="title">
  2024. <td>City</td>
  2025. <td>2005</td>
  2026. <td>2006</td>
  2027. <td>2007</td>
  2028. <td>2008</td>
  2029. </tr>
  2030. <tr class="items">
  2031. <td>Lima</td>
  2032. <td>10,40</td>
  2033. <td>8,95</td>
  2034. <td>9,19</td>
  2035. <td>9,76</td>
  2036. </tr>
  2037. <tr class="items">
  2038. <td>New York</td>
  2039. <td>18,39</td>
  2040. <td>17,52</td>
  2041. <td>16,57</td>
  2042. <td>16,60</td>
  2043. </tr>
  2044. <tr class="items">
  2045. <td>Barcelona</td>
  2046. <td>0,10</td>
  2047. <td>0,10</td>
  2048. <td>0,05</td>
  2049. <td>0,05</td>
  2050. </tr>
  2051. <tr class="items">
  2052. <td>Paris</td>
  2053. <td>3,38</td>
  2054. <td >3,63</td>
  2055. <td>3,63</td>
  2056. <td>3,54</td>
  2057. </tr>
  2058. </tbody>
  2059. </table>
  2060. <br>
  2061. </body>
  2062. ');
  2063. INSERT INTO system_template (title, comment, image, content) VALUES
  2064. ('TemplateTitleAudio', 'TemplateTitleAudioDescription', 'audiocomment.gif', '
  2065. <head>
  2066. {CSS}
  2067. </head>
  2068. <body>
  2069. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  2070. <tbody>
  2071. <tr>
  2072. <td>
  2073. <div align="center">
  2074. <span style="text-align: center;">
  2075. <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="300" height="20" bgcolor="#FFFFFF" src="{REL_PATH}main/inc/lib/mediaplayer/player.swf" allowfullscreen="false" allowscriptaccess="always" flashvars="file={COURSE_DIR}audio/ListeningComprehension.mp3&amp;autostart=true"></embed>
  2076. </span></div>
  2077. <br>
  2078. </td>
  2079. <td colspan="1" rowspan="3"><br>
  2080. <img style="width: 300px; height: 341px; float: right;" alt="image" src="{COURSE_DIR}images/diagrams/head_olfactory_nerve.png "><br></td>
  2081. </tr>
  2082. <tr>
  2083. <td colspan="1" rowspan="1">
  2084. <img style="width: 180px; height: 271px;" alt="trainer" src="{COURSE_DIR}images/trainer/trainer_glasses.png"><br></td>
  2085. </tr>
  2086. <tr>
  2087. </tr>
  2088. </tbody>
  2089. </table>
  2090. <p><br>
  2091. <br>
  2092. </p>
  2093. </body>
  2094. ');
  2095. INSERT INTO system_template (title, comment, image, content) VALUES
  2096. ('TemplateTitleVideo', 'TemplateTitleVideoDescription', 'video.gif', '
  2097. <head>
  2098. {CSS}
  2099. </head>
  2100. <body>
  2101. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 720px; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  2102. <tbody>
  2103. <tr>
  2104. <td style="width: 50%; vertical-align: top;">
  2105. <div style="text-align: center;" id="player810625-parent">
  2106. <div style="border-style: none; overflow: hidden; width: 320px; height: 240px; background-color: rgb(220, 220, 220);">
  2107. <div id="player810625">
  2108. <div id="player810625-config" style="overflow: hidden; display: none; visibility: hidden; width: 0px; height: 0px;">url={REL_PATH}main/default_course_document/video/flv/example.flv width=320 height=240 loop=false play=false downloadable=false fullscreen=true displayNavigation=true displayDigits=true align=left dispPlaylist=none playlistThumbs=false</div>
  2109. </div>
  2110. <embed
  2111. type="application/x-shockwave-flash"
  2112. src="{REL_PATH}main/inc/lib/mediaplayer/player.swf"
  2113. width="320"
  2114. height="240"
  2115. id="single"
  2116. name="single"
  2117. quality="high"
  2118. allowfullscreen="true"
  2119. flashvars="width=320&height=240&autostart=false&file={REL_PATH}main/default_course_document/video/flv/example.flv&repeat=false&image=&showdownload=false&link={REL_PATH}main/default_course_document/video/flv/example.flv&showdigits=true&shownavigation=true&logo="
  2120. />
  2121. </div>
  2122. </div>
  2123. </td>
  2124. <td style="background: transparent url({IMG_DIR}faded_grey.png) repeat scroll center top; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; vertical-align: top; width: 50%;">
  2125. <h3><br>
  2126. </h3>
  2127. <h3>Lorem ipsum dolor sit amet</h3>
  2128. <ul>
  2129. <li>consectetur adipisicing elit</li>
  2130. <li>sed do eiusmod tempor incididunt</li>
  2131. <li>ut labore et dolore magna aliqua</li>
  2132. </ul>
  2133. <h3>Ut enim ad minim veniam</h3>
  2134. <ul>
  2135. <li>quis nostrud exercitation ullamco</li>
  2136. <li>laboris nisi ut aliquip ex ea commodo consequat</li>
  2137. <li>Excepteur sint occaecat cupidatat non proident</li>
  2138. </ul>
  2139. </td>
  2140. </tr>
  2141. </tbody>
  2142. </table>
  2143. <p><br>
  2144. <br>
  2145. </p>
  2146. <style type="text/css">body{}</style><!-- to fix a strange bug appearing with firefox when editing this template -->
  2147. </body>
  2148. ');
  2149. INSERT INTO system_template (title, comment, image, content) VALUES
  2150. ('TemplateTitleFlash', 'TemplateTitleFlashDescription', 'flash.gif', '
  2151. <head>
  2152. {CSS}
  2153. </head>
  2154. <body>
  2155. <center>
  2156. <table style="background: transparent url({IMG_DIR}faded_blue_horizontal.png ) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; text-align: left; width: 100%; height: 400px;" border="0" cellpadding="15" cellspacing="6">
  2157. <tbody>
  2158. <tr>
  2159. <td align="center">
  2160. <embed width="700" height="300" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="{COURSE_DIR}flash/SpinEchoSequence.swf" play="true" loop="true" menu="true"></embed></span><br />
  2161. </td>
  2162. </tr>
  2163. </tbody>
  2164. </table>
  2165. <p><br>
  2166. <br>
  2167. </p>
  2168. </center>
  2169. </body>
  2170. ');
  2171. --
  2172. -- --------------------------------------------------------
  2173. --
  2174. -- Tables for reservation
  2175. --
  2176. --
  2177. -- Table structure for table reservation category
  2178. --
  2179. DROP TABLE IF EXISTS reservation_category;
  2180. CREATE TABLE IF NOT EXISTS reservation_category (
  2181. id int unsigned NOT NULL auto_increment,
  2182. parent_id int NOT NULL default 0,
  2183. name varchar(128) NOT NULL default '',
  2184. PRIMARY KEY ( id )
  2185. );
  2186. --
  2187. -- Table structure for table reservation category_rights
  2188. --
  2189. DROP TABLE IF EXISTS reservation_category_rights;
  2190. CREATE TABLE IF NOT EXISTS reservation_category_rights (
  2191. id int unsigned NOT NULL auto_increment,
  2192. category_id int NOT NULL default 0,
  2193. class_id int NOT NULL default 0,
  2194. m_items tinyint NOT NULL default 0,
  2195. PRIMARY KEY ( id )
  2196. );
  2197. --
  2198. -- Table structure for table item reservation
  2199. --
  2200. DROP TABLE IF EXISTS reservation_item;
  2201. CREATE TABLE IF NOT EXISTS reservation_item (
  2202. id int unsigned NOT NULL auto_increment,
  2203. category_id int unsigned NOT NULL default 0,
  2204. course_code varchar(40) NOT NULL default '',
  2205. name varchar(128) NOT NULL default '',
  2206. description text NOT NULL,
  2207. blackout tinyint NOT NULL default 0,
  2208. creator int unsigned NOT NULL default 0,
  2209. always_available TINYINT NOT NULL default 0,
  2210. PRIMARY KEY ( id )
  2211. );
  2212. -- --------------------------------------------------------
  2213. --
  2214. -- Table structure for table reservation item_rights
  2215. --
  2216. DROP TABLE IF EXISTS reservation_item_rights;
  2217. CREATE TABLE IF NOT EXISTS reservation_item_rights (
  2218. item_id int unsigned NOT NULL default 0,
  2219. class_id int unsigned NOT NULL default 0,
  2220. edit_right tinyint unsigned NOT NULL default 0,
  2221. delete_right tinyint unsigned NOT NULL default 0,
  2222. m_reservation tinyint unsigned NOT NULL default 0,
  2223. view_right tinyint NOT NULL default 0,
  2224. PRIMARY KEY ( item_id , class_id )
  2225. );
  2226. -- --------------------------------------------------------
  2227. --
  2228. -- Table structure for main reservation table
  2229. --
  2230. DROP TABLE IF EXISTS reservation_main;
  2231. CREATE TABLE IF NOT EXISTS reservation_main (
  2232. id int unsigned NOT NULL auto_increment,
  2233. subid int unsigned NOT NULL default 0,
  2234. item_id int unsigned NOT NULL default 0,
  2235. auto_accept tinyint unsigned NOT NULL default 0,
  2236. max_users int unsigned NOT NULL default 1,
  2237. start_at datetime NOT NULL default '0000-00-00 00:00:00',
  2238. end_at datetime NOT NULL default '0000-00-00 00:00:00',
  2239. subscribe_from datetime NOT NULL default '0000-00-00 00:00:00',
  2240. subscribe_until datetime NOT NULL default '0000-00-00 00:00:00',
  2241. subscribers int unsigned NOT NULL default 0,
  2242. notes text NOT NULL,
  2243. timepicker tinyint NOT NULL default 0,
  2244. timepicker_min int NOT NULL default 0,
  2245. timepicker_max int NOT NULL default 0,
  2246. PRIMARY KEY ( id )
  2247. );
  2248. -- --------------------------------------------------------
  2249. --
  2250. -- Table structure for reservation subscription table
  2251. --
  2252. DROP TABLE IF EXISTS reservation_subscription;
  2253. CREATE TABLE IF NOT EXISTS reservation_subscription (
  2254. dummy int unsigned NOT NULL auto_increment,
  2255. user_id int unsigned NOT NULL default 0,
  2256. reservation_id int unsigned NOT NULL default 0,
  2257. accepted tinyint unsigned NOT NULL default 0,
  2258. start_at datetime NOT NULL default '0000-00-00 00:00:00',
  2259. end_at datetime NOT NULL default '0000-00-00 00:00:00',
  2260. PRIMARY KEY ( dummy )
  2261. );
  2262. -- ---------------------------------------------------------
  2263. --
  2264. -- Table structure for table user_rel_user
  2265. --
  2266. DROP TABLE IF EXISTS user_rel_user;
  2267. CREATE TABLE IF NOT EXISTS user_rel_user (
  2268. id bigint unsigned not null auto_increment,
  2269. user_id int unsigned not null,
  2270. friend_user_id int unsigned not null,
  2271. relation_type int not null default 0,
  2272. last_edit DATETIME,
  2273. PRIMARY KEY(id)
  2274. );
  2275. ALTER TABLE user_rel_user ADD INDEX idx_user_rel_user__user (user_id);
  2276. ALTER TABLE user_rel_user ADD INDEX idx_user_rel_user__friend_user(friend_user_id);
  2277. ALTER TABLE user_rel_user ADD INDEX idx_user_rel_user__user_friend_user(user_id,friend_user_id);
  2278. --
  2279. -- Table structure for table user_friend_relation_type
  2280. --
  2281. DROP TABLE IF EXISTS user_friend_relation_type;
  2282. CREATE TABLE IF NOT EXISTS user_friend_relation_type(
  2283. id int unsigned not null auto_increment,
  2284. title char(20),
  2285. PRIMARY KEY(id)
  2286. );
  2287. --
  2288. -- Table structure for MD5 API keys for users
  2289. --
  2290. DROP TABLE IF EXISTS user_api_key;
  2291. CREATE TABLE IF NOT EXISTS user_api_key (
  2292. id int unsigned NOT NULL auto_increment,
  2293. user_id int unsigned NOT NULL,
  2294. api_key char(32) NOT NULL,
  2295. api_service char(10) NOT NULL default 'dokeos',
  2296. api_end_point text DEFAULT NULL,
  2297. created_date datetime DEFAULT NULL,
  2298. validity_start_date datetime DEFAULT NULL,
  2299. validity_end_date datetime DEFAULT NULL,
  2300. description text DEFAULT NULL,
  2301. PRIMARY KEY (id)
  2302. );
  2303. ALTER TABLE user_api_key ADD INDEX idx_user_api_keys_user (user_id);
  2304. --
  2305. -- Table structure for table message
  2306. --
  2307. DROP TABLE IF EXISTS message;
  2308. CREATE TABLE IF NOT EXISTS message(
  2309. id bigint unsigned not null auto_increment,
  2310. user_sender_id int unsigned not null,
  2311. user_receiver_id int unsigned not null,
  2312. msg_status tinyint unsigned not null default 0, -- 0 read, 1 unread, 3 deleted, 5 pending invitation, 6 accepted invitation, 7 invitation denied
  2313. send_date datetime not null default '0000-00-00 00:00:00',
  2314. title varchar(255) not null,
  2315. content text not null,
  2316. group_id int unsigned not null default 0,
  2317. parent_id int unsigned not null default 0,
  2318. update_date datetime not null default '0000-00-00 00:00:00',
  2319. PRIMARY KEY(id)
  2320. );
  2321. ALTER TABLE message ADD INDEX idx_message_user_sender(user_sender_id);
  2322. ALTER TABLE message ADD INDEX idx_message_user_receiver(user_receiver_id);
  2323. ALTER TABLE message ADD INDEX idx_message_user_sender_user_receiver(user_sender_id,user_receiver_id);
  2324. ALTER TABLE message ADD INDEX idx_message_group(group_id);
  2325. ALTER TABLE message ADD INDEX idx_message_parent(parent_id);
  2326. INSERT INTO user_friend_relation_type (id,title)
  2327. VALUES
  2328. (1,'SocialUnknow'),
  2329. (2,'SocialParent'),
  2330. (3,'SocialFriend'),
  2331. (4,'SocialGoodFriend'),
  2332. (5,'SocialEnemy'),
  2333. (6,'SocialDeleted');
  2334. --
  2335. -- Table structure for table legal (Terms & Conditions)
  2336. --
  2337. DROP TABLE IF EXISTS legal;
  2338. CREATE TABLE IF NOT EXISTS legal (
  2339. legal_id int NOT NULL auto_increment,
  2340. language_id int NOT NULL,
  2341. date int NOT NULL default 0,
  2342. content text,
  2343. type int NOT NULL,
  2344. changes text NOT NULL,
  2345. version int,
  2346. PRIMARY KEY (legal_id,language_id)
  2347. );
  2348. --
  2349. -- Table structure for certificate with gradebook
  2350. --
  2351. DROP TABLE IF EXISTS gradebook_certificate;
  2352. CREATE TABLE IF NOT EXISTS gradebook_certificate (
  2353. id bigint unsigned not null auto_increment,
  2354. cat_id int unsigned not null,
  2355. user_id int unsigned not null,
  2356. score_certificate float unsigned not null default 0,
  2357. created_at DATETIME NOT NULL default '0000-00-00 00:00:00',
  2358. path_certificate text null,
  2359. PRIMARY KEY(id)
  2360. );
  2361. ALTER TABLE gradebook_certificate ADD INDEX idx_gradebook_certificate_category_id(cat_id);
  2362. ALTER TABLE gradebook_certificate ADD INDEX idx_gradebook_certificate_user_id(user_id);
  2363. ALTER TABLE gradebook_certificate ADD INDEX idx_gradebook_certificate_category_id_user_id(cat_id,user_id);
  2364. --
  2365. -- Tables structure for search tool
  2366. --
  2367. -- specific fields tables
  2368. DROP TABLE IF EXISTS specific_field;
  2369. CREATE TABLE IF NOT EXISTS specific_field (
  2370. id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  2371. code char(1) NOT NULL,
  2372. name VARCHAR(200) NOT NULL
  2373. );
  2374. DROP TABLE IF EXISTS specific_field_values;
  2375. CREATE TABLE IF NOT EXISTS specific_field_values (
  2376. id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  2377. course_code VARCHAR(40) NOT NULL ,
  2378. tool_id VARCHAR(100) NOT NULL ,
  2379. ref_id INT NOT NULL ,
  2380. field_id INT NOT NULL ,
  2381. value VARCHAR(200) NOT NULL
  2382. );
  2383. ALTER TABLE specific_field ADD CONSTRAINT unique_specific_field__code UNIQUE (code);
  2384. -- search engine references to map dokeos resources
  2385. DROP TABLE IF EXISTS search_engine_ref;
  2386. CREATE TABLE IF NOT EXISTS search_engine_ref (
  2387. id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  2388. course_code VARCHAR( 40 ) NOT NULL,
  2389. tool_id VARCHAR( 100 ) NOT NULL,
  2390. ref_id_high_level INT NOT NULL,
  2391. ref_id_second_level INT NULL,
  2392. search_did INT NOT NULL
  2393. );
  2394. --
  2395. -- Table structure for table sessions categories
  2396. --
  2397. DROP TABLE IF EXISTS session_category;
  2398. CREATE TABLE IF NOT EXISTS session_category (
  2399. id int NOT NULL auto_increment,
  2400. name varchar(100) default NULL,
  2401. date_start date default NULL,
  2402. date_end date default NULL,
  2403. access_url_id INT NOT NULL default 1,
  2404. PRIMARY KEY (id)
  2405. );
  2406. --
  2407. -- Table structure for table user tag
  2408. --
  2409. DROP TABLE IF EXISTS tag;
  2410. CREATE TABLE IF NOT EXISTS tag (
  2411. id int NOT NULL auto_increment,
  2412. tag char(255) NOT NULL,
  2413. field_id int NOT NULL,
  2414. count int NOT NULL,
  2415. PRIMARY KEY (id)
  2416. );
  2417. DROP TABLE IF EXISTS user_rel_tag;
  2418. CREATE TABLE IF NOT EXISTS user_rel_tag (
  2419. id int NOT NULL auto_increment,
  2420. user_id int NOT NULL,
  2421. tag_id int NOT NULL,
  2422. PRIMARY KEY (id)
  2423. );
  2424. --
  2425. -- Table structure for user platform groups
  2426. --
  2427. DROP TABLE IF EXISTS groups;
  2428. CREATE TABLE IF NOT EXISTS groups (
  2429. id int NOT NULL AUTO_INCREMENT,
  2430. name varchar(255) NOT NULL,
  2431. description varchar(255) NOT NULL,
  2432. picture_uri varchar(255) NOT NULL,
  2433. url varchar(255) NOT NULL,
  2434. visibility int NOT NULL,
  2435. updated_on varchar(255) NOT NULL,
  2436. created_on varchar(255) NOT NULL,
  2437. PRIMARY KEY (id)
  2438. );
  2439. DROP TABLE IF EXISTS group_rel_tag;
  2440. CREATE TABLE IF NOT EXISTS group_rel_tag (
  2441. id int NOT NULL AUTO_INCREMENT,
  2442. tag_id int NOT NULL,
  2443. group_id int NOT NULL,
  2444. PRIMARY KEY (id)
  2445. );
  2446. ALTER TABLE group_rel_tag ADD INDEX ( group_id );
  2447. ALTER TABLE group_rel_tag ADD INDEX ( tag_id );
  2448. DROP TABLE IF EXISTS group_rel_user;
  2449. CREATE TABLE IF NOT EXISTS group_rel_user (
  2450. id int NOT NULL AUTO_INCREMENT,
  2451. group_id int NOT NULL,
  2452. user_id int NOT NULL,
  2453. relation_type int NOT NULL,
  2454. PRIMARY KEY (id)
  2455. );
  2456. ALTER TABLE group_rel_user ADD INDEX ( group_id );
  2457. ALTER TABLE group_rel_user ADD INDEX ( user_id );
  2458. ALTER TABLE group_rel_user ADD INDEX ( relation_type );
  2459. DROP TABLE IF EXISTS group_rel_group;
  2460. CREATE TABLE IF NOT EXISTS group_rel_group (
  2461. id int NOT NULL AUTO_INCREMENT,
  2462. group_id int NOT NULL,
  2463. subgroup_id int NOT NULL,
  2464. relation_type int NOT NULL,
  2465. PRIMARY KEY (id)
  2466. );
  2467. ALTER TABLE group_rel_group ADD INDEX ( group_id );
  2468. ALTER TABLE group_rel_group ADD INDEX ( subgroup_id );
  2469. ALTER TABLE group_rel_group ADD INDEX ( relation_type );
  2470. DROP TABLE IF EXISTS announcement_rel_group;
  2471. CREATE TABLE IF NOT EXISTS announcement_rel_group (
  2472. group_id int NOT NULL,
  2473. announcement_id int NOT NULL,
  2474. PRIMARY KEY (group_id, announcement_id)
  2475. );
  2476. --
  2477. -- Table structure for table message attachment
  2478. --
  2479. DROP TABLE IF EXISTS message_attachment;
  2480. CREATE TABLE IF NOT EXISTS message_attachment (
  2481. id int NOT NULL AUTO_INCREMENT,
  2482. path varchar(255) NOT NULL,
  2483. comment text,
  2484. size int NOT NULL default 0,
  2485. message_id int NOT NULL,
  2486. filename varchar(255) NOT NULL,
  2487. PRIMARY KEY (id)
  2488. );
  2489. INSERT INTO course_field (field_type, field_variable, field_display_text, field_default_value, field_visible, field_changeable) values (10, 'special_course','Special course', 'Yes', 1 , 1);
  2490. --
  2491. -- Table structure for table block
  2492. --
  2493. DROP TABLE IF EXISTS block;
  2494. CREATE TABLE IF NOT EXISTS block (
  2495. id INT NOT NULL AUTO_INCREMENT,
  2496. name VARCHAR(255) NULL,
  2497. description TEXT NULL,
  2498. path VARCHAR(255) NOT NULL,
  2499. controller VARCHAR(100) NOT NULL,
  2500. active TINYINT NOT NULL DEFAULT 1,
  2501. PRIMARY KEY(id)
  2502. );
  2503. ALTER TABLE block ADD UNIQUE(path);
  2504. --
  2505. -- Structure for table 'course_request' ("Course validation" feature)
  2506. --
  2507. DROP TABLE IF EXISTS course_request;
  2508. CREATE TABLE IF NOT EXISTS course_request (
  2509. id int NOT NULL AUTO_INCREMENT,
  2510. code varchar(40) NOT NULL,
  2511. user_id int unsigned NOT NULL default '0',
  2512. directory varchar(40) DEFAULT NULL,
  2513. db_name varchar(40) DEFAULT NULL,
  2514. course_language varchar(20) DEFAULT NULL,
  2515. title varchar(250) DEFAULT NULL,
  2516. description text,
  2517. category_code varchar(40) DEFAULT NULL,
  2518. tutor_name varchar(200) DEFAULT NULL,
  2519. visual_code varchar(40) DEFAULT NULL,
  2520. request_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  2521. objetives text,
  2522. target_audience text,
  2523. status int unsigned NOT NULL default '0',
  2524. info int unsigned NOT NULL default '0',
  2525. exemplary_content int unsigned NOT NULL default '0',
  2526. PRIMARY KEY (id),
  2527. UNIQUE KEY code (code)
  2528. );
  2529. --
  2530. -- Structure for Careers, Promotions and Usergroups
  2531. --
  2532. DROP TABLE IF EXISTS career;
  2533. CREATE TABLE IF NOT EXISTS career (
  2534. id INT NOT NULL AUTO_INCREMENT,
  2535. name VARCHAR(255) NOT NULL ,
  2536. description TEXT NOT NULL,
  2537. status INT NOT NULL default '0',
  2538. created_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  2539. updated_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  2540. PRIMARY KEY (id)
  2541. );
  2542. DROP TABLE IF EXISTS promotion;
  2543. CREATE TABLE IF NOT EXISTS promotion (
  2544. id INT NOT NULL AUTO_INCREMENT,
  2545. name VARCHAR(255) NOT NULL ,
  2546. description TEXT NOT NULL,
  2547. career_id INT NOT NULL,
  2548. status INT NOT NULL default '0',
  2549. created_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  2550. updated_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  2551. PRIMARY KEY(id)
  2552. );
  2553. DROP TABLE IF EXISTS usergroup;
  2554. CREATE TABLE IF NOT EXISTS usergroup (
  2555. id INT NOT NULL AUTO_INCREMENT,
  2556. name VARCHAR(255) NOT NULL,
  2557. description TEXT NOT NULL,
  2558. PRIMARY KEY (id)
  2559. );
  2560. DROP TABLE IF EXISTS usergroup_rel_user;
  2561. CREATE TABLE IF NOT EXISTS usergroup_rel_user (
  2562. id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  2563. usergroup_id INT NOT NULL,
  2564. user_id INT NOT NULL
  2565. );
  2566. DROP TABLE IF EXISTS usergroup_rel_course;
  2567. CREATE TABLE IF NOT EXISTS usergroup_rel_course (
  2568. id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  2569. usergroup_id INT NOT NULL,
  2570. course_id INT NOT NULL
  2571. );
  2572. DROP TABLE IF EXISTS usergroup_rel_session;
  2573. CREATE TABLE IF NOT EXISTS usergroup_rel_session (
  2574. id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  2575. usergroup_id INT NOT NULL,
  2576. session_id INT NOT NULL
  2577. );
  2578. --
  2579. -- Structure for Mail notifications
  2580. --
  2581. DROP TABLE IF EXISTS notification;
  2582. CREATE TABLE IF NOT EXISTS notification (
  2583. id BIGINT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  2584. dest_user_id INT NOT NULL,
  2585. dest_mail CHAR(255),
  2586. title CHAR(255),
  2587. content CHAR(255),
  2588. send_freq SMALLINT DEFAULT 1,
  2589. created_at DATETIME NOT NULL,
  2590. sent_at DATETIME NULL
  2591. );
  2592. ALTER TABLE notification ADD index mail_notify_sent_index (sent_at);
  2593. ALTER TABLE notification ADD index mail_notify_freq_index (sent_at, send_freq, created_at);
  2594. -- Skills management
  2595. DROP TABLE IF EXISTS skill;
  2596. CREATE TABLE IF NOT EXISTS skill (
  2597. id int NOT NULL AUTO_INCREMENT,
  2598. name varchar(255) NOT NULL,
  2599. short_code varchar(100) NOT NULL,
  2600. description TEXT NOT NULL,
  2601. access_url_id int NOT NULL,
  2602. icon varchar(255) NOT NULL,
  2603. PRIMARY KEY (id)
  2604. );
  2605. INSERT INTO skill (name) VALUES ('Root');
  2606. DROP TABLE IF EXISTS skill_rel_gradebook;
  2607. CREATE TABLE IF NOT EXISTS skill_rel_gradebook (
  2608. id int NOT NULL AUTO_INCREMENT,
  2609. gradebook_id int NOT NULL,
  2610. skill_id int NOT NULL,
  2611. type varchar(10) NOT NULL,
  2612. PRIMARY KEY (id)
  2613. );
  2614. DROP TABLE IF EXISTS skill_rel_skill;
  2615. CREATE TABLE IF NOT EXISTS skill_rel_skill (
  2616. id int NOT NULL AUTO_INCREMENT,
  2617. skill_id int NOT NULL,
  2618. parent_id int NOT NULL,
  2619. relation_type int NOT NULL,
  2620. level int NOT NULL,
  2621. PRIMARY KEY (id)
  2622. );
  2623. INSERT INTO skill_rel_skill VALUES(1, 1, 0, 0, 0);
  2624. DROP TABLE IF EXISTS skill_rel_user;
  2625. CREATE TABLE IF NOT EXISTS skill_rel_user (
  2626. id int NOT NULL AUTO_INCREMENT,
  2627. user_id int NOT NULL,
  2628. skill_id int NOT NULL,
  2629. acquired_skill_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  2630. assigned_by int NOT NULL,
  2631. PRIMARY KEY (id)
  2632. );
  2633. DROP TABLE IF EXISTS skill_profile;
  2634. CREATE TABLE IF NOT EXISTS skill_profile (
  2635. id INTEGER NOT NULL AUTO_INCREMENT,
  2636. name VARCHAR(255) NOT NULL,
  2637. description TEXT NOT NULL,
  2638. PRIMARY KEY (id)
  2639. );
  2640. DROP TABLE IF EXISTS skill_rel_profile;
  2641. CREATE TABLE IF NOT EXISTS skill_rel_profile (
  2642. id INTEGER NOT NULL AUTO_INCREMENT,
  2643. skill_id INTEGER NOT NULL,
  2644. profile_id INTEGER NOT NULL,
  2645. PRIMARY KEY (id)
  2646. );
  2647. --
  2648. -- Table structure for event email sending
  2649. --
  2650. DROP TABLE IF EXISTS event_email_template;
  2651. CREATE TABLE event_email_template (
  2652. id int NOT NULL AUTO_INCREMENT,
  2653. message text,
  2654. subject varchar(255) DEFAULT NULL,
  2655. event_type_name varchar(255) DEFAULT NULL,
  2656. activated tinyint NOT NULL DEFAULT '0',
  2657. language_id int DEFAULT NULL,
  2658. PRIMARY KEY (id)
  2659. );
  2660. ALTER TABLE event_email_template ADD INDEX event_name_index (event_type_name);
  2661. DROP TABLE IF EXISTS event_sent;
  2662. CREATE TABLE event_sent (
  2663. id int NOT NULL AUTO_INCREMENT,
  2664. user_from int NOT NULL,
  2665. user_to int DEFAULT NULL,
  2666. event_type_name varchar(100) DEFAULT NULL,
  2667. PRIMARY KEY (id)
  2668. );
  2669. ALTER TABLE event_sent ADD INDEX event_name_index (event_type_name);
  2670. DROP TABLE IF EXISTS user_rel_event_type;
  2671. CREATE TABLE user_rel_event_type (
  2672. id int NOT NULL AUTO_INCREMENT,
  2673. user_id int NOT NULL,
  2674. event_type_name varchar(255) NOT NULL,
  2675. PRIMARY KEY (id)
  2676. );
  2677. ALTER TABLE user_rel_event_type ADD INDEX event_name_index (event_type_name);
  2678. -- Course ranking
  2679. DROP TABLE IF EXISTS track_course_ranking;
  2680. CREATE TABLE IF NOT EXISTS track_course_ranking (
  2681. id int unsigned not null PRIMARY KEY AUTO_INCREMENT,
  2682. c_id int unsigned not null,
  2683. session_id int unsigned not null default 0,
  2684. url_id int unsigned not null default 0,
  2685. accesses int unsigned not null default 0,
  2686. total_score int unsigned not null default 0,
  2687. users int unsigned not null default 0,
  2688. creation_date datetime not null
  2689. );
  2690. ALTER TABLE track_course_ranking ADD INDEX idx_tcc_cid (c_id);
  2691. ALTER TABLE track_course_ranking ADD INDEX idx_tcc_sid (session_id);
  2692. ALTER TABLE track_course_ranking ADD INDEX idx_tcc_urlid (url_id);
  2693. ALTER TABLE track_course_ranking ADD INDEX idx_tcc_creation_date (creation_date);
  2694. DROP TABLE IF EXISTS user_rel_course_vote;
  2695. CREATE TABLE IF NOT EXISTS user_rel_course_vote (
  2696. id int unsigned not null AUTO_INCREMENT PRIMARY KEY,
  2697. c_id int unsigned not null,
  2698. user_id int unsigned not null,
  2699. session_id int unsigned not null default 0,
  2700. url_id int unsigned not null default 0,
  2701. vote int unsigned not null default 0
  2702. );
  2703. ALTER TABLE user_rel_course_vote ADD INDEX idx_ucv_cid (c_id);
  2704. ALTER TABLE user_rel_course_vote ADD INDEX idx_ucv_uid (user_id);
  2705. ALTER TABLE user_rel_course_vote ADD INDEX idx_ucv_cuid (user_id, c_id);
  2706. -- Global chat
  2707. DROP TABLE IF EXISTS chat;
  2708. CREATE TABLE IF NOT EXISTS chat (
  2709. id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  2710. from_user INTEGER,
  2711. to_user INTEGER,
  2712. message TEXT NOT NULL,
  2713. sent DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  2714. recd INTEGER UNSIGNED NOT NULL DEFAULT 0,
  2715. PRIMARY KEY (id)
  2716. );
  2717. ALTER TABLE chat ADD INDEX idx_chat_to_user (to_user);
  2718. ALTER TABLE chat ADD INDEX idx_chat_from_user (from_user);
  2719. -- Grade Model
  2720. DROP TABLE IF EXISTS grade_model;
  2721. CREATE TABLE grade_model (
  2722. id INTEGER NOT NULL AUTO_INCREMENT,
  2723. name VARCHAR(255) NOT NULL,
  2724. description TEXT,
  2725. default_lowest_eval_exclude TINYINT default null,
  2726. default_external_eval TINYINT default null,
  2727. default_external_eval_prefix VARCHAR(140) default null,
  2728. PRIMARY KEY (id)
  2729. );
  2730. DROP TABLE IF EXISTS grade_components;
  2731. CREATE TABLE grade_components (
  2732. id INTEGER NOT NULL AUTO_INCREMENT,
  2733. percentage VARCHAR(255) NOT NULL,
  2734. title VARCHAR(255) NOT NULL,
  2735. acronym VARCHAR(255) NOT NULL,
  2736. grade_model_id INTEGER NOT NULL,
  2737. PRIMARY KEY (id)
  2738. );
  2739. ALTER TABLE gradebook_category ADD COLUMN grade_model_id INT DEFAULT 0;
  2740. DROP TABLE IF EXISTS course_type;
  2741. CREATE TABLE course_type (
  2742. id int unsigned not null auto_increment primary key,
  2743. name varchar(50) not null,
  2744. translation_var char(40) default 'UndefinedCourseTypeLabel',
  2745. description TEXT default '',
  2746. props text default ''
  2747. );
  2748. INSERT INTO course_type (id, name) VALUES (1, 'All tools');
  2749. INSERT INTO course_type (id, name) VALUES (2, 'Entry exam');
  2750. ALTER TABLE course add course_type_id int unsigned default 1;
  2751. DROP TABLE IF EXISTS usergroup_rel_question;
  2752. CREATE TABLE usergroup_rel_question (
  2753. id int unsigned not null auto_increment primary key,
  2754. c_id int unsigned not null,
  2755. question_id int unsigned not null,
  2756. usergroup_id int unsigned not null,
  2757. coefficient float(6,2)
  2758. );