db_course.sql 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973
  1. -- MySQL dump 10.13 Distrib 5.1.66, for debian-linux-gnu (i486)
  2. --
  3. -- Host: localhost Database: chamilo
  4. -- ------------------------------------------------------
  5. -- Server version 5.1.66-0+squeeze1
  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. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Table structure for table c_announcement
  18. --
  19. DROP TABLE IF EXISTS c_announcement;
  20. /*!40101 SET @saved_cs_client = @@character_set_client */;
  21. /*!40101 SET character_set_client = utf8 */;
  22. CREATE TABLE c_announcement (
  23. c_id int(11) NOT NULL,
  24. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  25. title text,
  26. content mediumtext,
  27. end_date date DEFAULT NULL,
  28. display_order mediumint(9) NOT NULL DEFAULT '0',
  29. email_sent tinyint(4) DEFAULT '0',
  30. session_id int(11) DEFAULT '0',
  31. PRIMARY KEY (c_id,id),
  32. KEY session_id (session_id)
  33. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  34. /*!40101 SET character_set_client = @saved_cs_client */;
  35. --
  36. -- Table structure for table c_announcement_attachment
  37. --
  38. DROP TABLE IF EXISTS c_announcement_attachment;
  39. /*!40101 SET @saved_cs_client = @@character_set_client */;
  40. /*!40101 SET character_set_client = utf8 */;
  41. CREATE TABLE c_announcement_attachment (
  42. c_id int(11) NOT NULL,
  43. id int(11) NOT NULL AUTO_INCREMENT,
  44. path varchar(255) NOT NULL,
  45. comment text,
  46. size int(11) NOT NULL DEFAULT '0',
  47. announcement_id int(11) NOT NULL,
  48. filename varchar(255) NOT NULL,
  49. PRIMARY KEY (c_id,id)
  50. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  51. /*!40101 SET character_set_client = @saved_cs_client */;
  52. --
  53. -- Table structure for table c_attendance
  54. --
  55. DROP TABLE IF EXISTS c_attendance;
  56. /*!40101 SET @saved_cs_client = @@character_set_client */;
  57. /*!40101 SET character_set_client = utf8 */;
  58. CREATE TABLE c_attendance (
  59. c_id int(11) NOT NULL,
  60. id int(11) NOT NULL AUTO_INCREMENT,
  61. name text NOT NULL,
  62. description text,
  63. active tinyint(4) NOT NULL DEFAULT '1',
  64. attendance_qualify_title varchar(255) DEFAULT NULL,
  65. attendance_qualify_max int(11) NOT NULL DEFAULT '0',
  66. attendance_weight float(6,2) NOT NULL DEFAULT '0.00',
  67. session_id int(11) NOT NULL DEFAULT '0',
  68. locked int(11) NOT NULL DEFAULT '0',
  69. PRIMARY KEY (c_id,id),
  70. KEY session_id (session_id),
  71. KEY active (active)
  72. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  73. /*!40101 SET character_set_client = @saved_cs_client */;
  74. --
  75. -- Table structure for table c_attendance_calendar
  76. --
  77. DROP TABLE IF EXISTS c_attendance_calendar;
  78. /*!40101 SET @saved_cs_client = @@character_set_client */;
  79. /*!40101 SET character_set_client = utf8 */;
  80. CREATE TABLE c_attendance_calendar (
  81. c_id int(11) NOT NULL,
  82. id int(11) NOT NULL AUTO_INCREMENT,
  83. attendance_id int(11) NOT NULL,
  84. date_time datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  85. done_attendance tinyint(4) NOT NULL DEFAULT '0',
  86. PRIMARY KEY (c_id,id),
  87. KEY attendance_id (attendance_id),
  88. KEY done_attendance (done_attendance)
  89. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  90. /*!40101 SET character_set_client = @saved_cs_client */;
  91. --
  92. -- Table structure for table c_attendance_result
  93. --
  94. DROP TABLE IF EXISTS c_attendance_result;
  95. /*!40101 SET @saved_cs_client = @@character_set_client */;
  96. /*!40101 SET character_set_client = utf8 */;
  97. CREATE TABLE c_attendance_result (
  98. c_id int(11) NOT NULL,
  99. id int(11) NOT NULL AUTO_INCREMENT,
  100. user_id int(11) NOT NULL,
  101. attendance_id int(11) NOT NULL,
  102. score int(11) NOT NULL DEFAULT '0',
  103. PRIMARY KEY (c_id,id),
  104. KEY attendance_id (attendance_id),
  105. KEY user_id (user_id)
  106. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  107. /*!40101 SET character_set_client = @saved_cs_client */;
  108. --
  109. -- Table structure for table c_attendance_sheet
  110. --
  111. DROP TABLE IF EXISTS c_attendance_sheet;
  112. /*!40101 SET @saved_cs_client = @@character_set_client */;
  113. /*!40101 SET character_set_client = utf8 */;
  114. CREATE TABLE c_attendance_sheet (
  115. c_id int(11) NOT NULL,
  116. user_id int(11) NOT NULL,
  117. attendance_calendar_id int(11) NOT NULL,
  118. presence tinyint(4) NOT NULL DEFAULT '0',
  119. PRIMARY KEY (c_id,user_id,attendance_calendar_id),
  120. KEY presence (presence)
  121. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  122. /*!40101 SET character_set_client = @saved_cs_client */;
  123. --
  124. -- Table structure for table c_attendance_sheet_log
  125. --
  126. DROP TABLE IF EXISTS c_attendance_sheet_log;
  127. /*!40101 SET @saved_cs_client = @@character_set_client */;
  128. /*!40101 SET character_set_client = utf8 */;
  129. CREATE TABLE c_attendance_sheet_log (
  130. c_id int(11) NOT NULL,
  131. id int(11) NOT NULL AUTO_INCREMENT,
  132. attendance_id int(11) NOT NULL DEFAULT '0',
  133. lastedit_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  134. lastedit_type varchar(200) NOT NULL,
  135. lastedit_user_id int(11) NOT NULL DEFAULT '0',
  136. calendar_date_value datetime DEFAULT NULL,
  137. PRIMARY KEY (c_id,id)
  138. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  139. /*!40101 SET character_set_client = @saved_cs_client */;
  140. --
  141. -- Table structure for table c_blog
  142. --
  143. DROP TABLE IF EXISTS c_blog;
  144. /*!40101 SET @saved_cs_client = @@character_set_client */;
  145. /*!40101 SET character_set_client = utf8 */;
  146. CREATE TABLE c_blog (
  147. c_id int(11) NOT NULL,
  148. blog_id int(11) NOT NULL AUTO_INCREMENT,
  149. blog_name varchar(250) NOT NULL DEFAULT '',
  150. blog_subtitle varchar(250) DEFAULT NULL,
  151. date_creation datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  152. visibility tinyint(3) unsigned NOT NULL DEFAULT '0',
  153. session_id int(11) DEFAULT '0',
  154. PRIMARY KEY (c_id,blog_id),
  155. KEY session_id (session_id)
  156. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Table with blogs in this course';
  157. /*!40101 SET character_set_client = @saved_cs_client */;
  158. --
  159. -- Table structure for table c_blog_attachment
  160. --
  161. DROP TABLE IF EXISTS c_blog_attachment;
  162. /*!40101 SET @saved_cs_client = @@character_set_client */;
  163. /*!40101 SET character_set_client = utf8 */;
  164. CREATE TABLE c_blog_attachment (
  165. c_id int(11) NOT NULL,
  166. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  167. path varchar(255) NOT NULL COMMENT 'the real filename',
  168. comment text,
  169. size int(11) NOT NULL DEFAULT '0',
  170. post_id int(11) NOT NULL,
  171. filename varchar(255) NOT NULL COMMENT 'the user s file name',
  172. blog_id int(11) NOT NULL,
  173. comment_id int(11) NOT NULL DEFAULT '0',
  174. PRIMARY KEY (c_id,id)
  175. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  176. /*!40101 SET character_set_client = @saved_cs_client */;
  177. --
  178. -- Table structure for table c_blog_comment
  179. --
  180. DROP TABLE IF EXISTS c_blog_comment;
  181. /*!40101 SET @saved_cs_client = @@character_set_client */;
  182. /*!40101 SET character_set_client = utf8 */;
  183. CREATE TABLE c_blog_comment (
  184. c_id int(11) NOT NULL,
  185. comment_id int(11) NOT NULL AUTO_INCREMENT,
  186. title varchar(250) NOT NULL DEFAULT '',
  187. comment longtext NOT NULL,
  188. author_id int(11) NOT NULL DEFAULT '0',
  189. date_creation datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  190. blog_id int(11) NOT NULL DEFAULT '0',
  191. post_id int(11) NOT NULL DEFAULT '0',
  192. task_id int(11) DEFAULT NULL,
  193. parent_comment_id int(11) NOT NULL DEFAULT '0',
  194. PRIMARY KEY (c_id,comment_id)
  195. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Table with comments on posts in a blog';
  196. /*!40101 SET character_set_client = @saved_cs_client */;
  197. --
  198. -- Table structure for table c_blog_post
  199. --
  200. DROP TABLE IF EXISTS c_blog_post;
  201. /*!40101 SET @saved_cs_client = @@character_set_client */;
  202. /*!40101 SET character_set_client = utf8 */;
  203. CREATE TABLE c_blog_post (
  204. c_id int(11) NOT NULL,
  205. post_id int(11) NOT NULL AUTO_INCREMENT,
  206. title varchar(250) NOT NULL DEFAULT '',
  207. full_text longtext NOT NULL,
  208. date_creation datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  209. blog_id int(11) NOT NULL DEFAULT '0',
  210. author_id int(11) NOT NULL DEFAULT '0',
  211. PRIMARY KEY (c_id,post_id)
  212. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Table with posts / blog.';
  213. /*!40101 SET character_set_client = @saved_cs_client */;
  214. --
  215. -- Table structure for table c_blog_rating
  216. --
  217. DROP TABLE IF EXISTS c_blog_rating;
  218. /*!40101 SET @saved_cs_client = @@character_set_client */;
  219. /*!40101 SET character_set_client = utf8 */;
  220. CREATE TABLE c_blog_rating (
  221. c_id int(11) NOT NULL,
  222. rating_id int(11) NOT NULL AUTO_INCREMENT,
  223. blog_id int(11) NOT NULL DEFAULT '0',
  224. rating_type enum('post','comment') NOT NULL DEFAULT 'post',
  225. item_id int(11) NOT NULL DEFAULT '0',
  226. user_id int(11) NOT NULL DEFAULT '0',
  227. rating int(11) NOT NULL DEFAULT '0',
  228. PRIMARY KEY (c_id,rating_id)
  229. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Table with ratings for post/comments in a certain blog';
  230. /*!40101 SET character_set_client = @saved_cs_client */;
  231. --
  232. -- Table structure for table c_blog_rel_user
  233. --
  234. DROP TABLE IF EXISTS c_blog_rel_user;
  235. /*!40101 SET @saved_cs_client = @@character_set_client */;
  236. /*!40101 SET character_set_client = utf8 */;
  237. CREATE TABLE c_blog_rel_user (
  238. c_id int(11) NOT NULL,
  239. blog_id int(11) NOT NULL DEFAULT '0',
  240. user_id int(11) NOT NULL DEFAULT '0',
  241. PRIMARY KEY (c_id,blog_id,user_id)
  242. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Table representing users subscribed to a blog';
  243. /*!40101 SET character_set_client = @saved_cs_client */;
  244. --
  245. -- Table structure for table c_blog_task
  246. --
  247. DROP TABLE IF EXISTS c_blog_task;
  248. /*!40101 SET @saved_cs_client = @@character_set_client */;
  249. /*!40101 SET character_set_client = utf8 */;
  250. CREATE TABLE c_blog_task (
  251. c_id int(11) NOT NULL,
  252. task_id int(11) NOT NULL AUTO_INCREMENT,
  253. blog_id int(11) NOT NULL DEFAULT '0',
  254. title varchar(250) NOT NULL DEFAULT '',
  255. description text NOT NULL,
  256. color varchar(10) NOT NULL DEFAULT '',
  257. system_task tinyint(3) unsigned NOT NULL DEFAULT '0',
  258. PRIMARY KEY (c_id,task_id)
  259. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Table with tasks for a blog';
  260. /*!40101 SET character_set_client = @saved_cs_client */;
  261. --
  262. -- Table structure for table c_blog_task_rel_user
  263. --
  264. DROP TABLE IF EXISTS c_blog_task_rel_user;
  265. /*!40101 SET @saved_cs_client = @@character_set_client */;
  266. /*!40101 SET character_set_client = utf8 */;
  267. CREATE TABLE c_blog_task_rel_user (
  268. c_id int(11) NOT NULL,
  269. blog_id int(11) NOT NULL DEFAULT '0',
  270. user_id int(11) NOT NULL DEFAULT '0',
  271. task_id int(11) NOT NULL DEFAULT '0',
  272. target_date date NOT NULL DEFAULT '0000-00-00',
  273. PRIMARY KEY (c_id,blog_id,user_id,task_id)
  274. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Table with tasks assigned to a user in a blog';
  275. /*!40101 SET character_set_client = @saved_cs_client */;
  276. --
  277. -- Table structure for table c_calendar_event
  278. --
  279. DROP TABLE IF EXISTS c_calendar_event;
  280. /*!40101 SET @saved_cs_client = @@character_set_client */;
  281. /*!40101 SET character_set_client = utf8 */;
  282. CREATE TABLE c_calendar_event (
  283. c_id int(11) NOT NULL,
  284. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  285. title varchar(255) NOT NULL,
  286. content text,
  287. start_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  288. end_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  289. parent_event_id int(11) DEFAULT NULL,
  290. session_id int(10) unsigned NOT NULL DEFAULT '0',
  291. all_day int(11) NOT NULL DEFAULT '0',
  292. PRIMARY KEY (c_id,id),
  293. KEY session_id (session_id)
  294. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  295. /*!40101 SET character_set_client = @saved_cs_client */;
  296. --
  297. -- Table structure for table c_calendar_event_attachment
  298. --
  299. DROP TABLE IF EXISTS c_calendar_event_attachment;
  300. /*!40101 SET @saved_cs_client = @@character_set_client */;
  301. /*!40101 SET character_set_client = utf8 */;
  302. CREATE TABLE c_calendar_event_attachment (
  303. c_id int(11) NOT NULL,
  304. id int(11) NOT NULL AUTO_INCREMENT,
  305. path varchar(255) NOT NULL,
  306. comment text,
  307. size int(11) NOT NULL DEFAULT '0',
  308. agenda_id int(11) NOT NULL,
  309. filename varchar(255) NOT NULL,
  310. PRIMARY KEY (c_id,id)
  311. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  312. /*!40101 SET character_set_client = @saved_cs_client */;
  313. --
  314. -- Table structure for table c_calendar_event_repeat
  315. --
  316. DROP TABLE IF EXISTS c_calendar_event_repeat;
  317. /*!40101 SET @saved_cs_client = @@character_set_client */;
  318. /*!40101 SET character_set_client = utf8 */;
  319. CREATE TABLE c_calendar_event_repeat (
  320. c_id int(11) NOT NULL,
  321. cal_id int(11) NOT NULL DEFAULT '0',
  322. cal_type varchar(20) DEFAULT NULL,
  323. cal_end int(11) DEFAULT NULL,
  324. cal_frequency int(11) DEFAULT '1',
  325. cal_days char(7) DEFAULT NULL,
  326. PRIMARY KEY (c_id,cal_id)
  327. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  328. /*!40101 SET character_set_client = @saved_cs_client */;
  329. --
  330. -- Table structure for table c_calendar_event_repeat_not
  331. --
  332. DROP TABLE IF EXISTS c_calendar_event_repeat_not;
  333. /*!40101 SET @saved_cs_client = @@character_set_client */;
  334. /*!40101 SET character_set_client = utf8 */;
  335. CREATE TABLE c_calendar_event_repeat_not (
  336. c_id int(11) NOT NULL,
  337. cal_id int(11) NOT NULL,
  338. cal_date int(11) NOT NULL,
  339. PRIMARY KEY (c_id,cal_id,cal_date)
  340. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  341. /*!40101 SET character_set_client = @saved_cs_client */;
  342. --
  343. -- Table structure for table c_chat_connected
  344. --
  345. DROP TABLE IF EXISTS c_chat_connected;
  346. /*!40101 SET @saved_cs_client = @@character_set_client */;
  347. /*!40101 SET character_set_client = utf8 */;
  348. CREATE TABLE c_chat_connected (
  349. c_id int(11) NOT NULL,
  350. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  351. user_id int(10) unsigned NOT NULL DEFAULT '0',
  352. last_connection datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  353. session_id int(11) NOT NULL DEFAULT '0',
  354. to_group_id int(11) NOT NULL DEFAULT '0',
  355. PRIMARY KEY (c_id,id,user_id,last_connection),
  356. KEY char_connected_index (user_id,session_id,to_group_id)
  357. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  358. /*!40101 SET character_set_client = @saved_cs_client */;
  359. --
  360. -- Table structure for table c_course_description
  361. --
  362. DROP TABLE IF EXISTS c_course_description;
  363. /*!40101 SET @saved_cs_client = @@character_set_client */;
  364. /*!40101 SET character_set_client = utf8 */;
  365. CREATE TABLE c_course_description (
  366. c_id int(11) NOT NULL,
  367. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  368. title varchar(255) DEFAULT NULL,
  369. content text,
  370. session_id int(11) DEFAULT '0',
  371. description_type tinyint(3) unsigned NOT NULL DEFAULT '0',
  372. progress int(11) NOT NULL DEFAULT '0',
  373. PRIMARY KEY (c_id,id),
  374. KEY session_id (session_id)
  375. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  376. /*!40101 SET character_set_client = @saved_cs_client */;
  377. --
  378. -- Table structure for table c_course_setting
  379. --
  380. DROP TABLE IF EXISTS c_course_setting;
  381. /*!40101 SET @saved_cs_client = @@character_set_client */;
  382. /*!40101 SET character_set_client = utf8 */;
  383. CREATE TABLE c_course_setting (
  384. c_id int(11) NOT NULL,
  385. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  386. variable varchar(255) NOT NULL DEFAULT '',
  387. subkey varchar(255) DEFAULT NULL,
  388. type varchar(255) DEFAULT NULL,
  389. category varchar(255) DEFAULT NULL,
  390. value varchar(255) NOT NULL DEFAULT '',
  391. title varchar(255) NOT NULL DEFAULT '',
  392. comment varchar(255) DEFAULT NULL,
  393. subkeytext varchar(255) DEFAULT NULL,
  394. PRIMARY KEY (c_id,id)
  395. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  396. /*!40101 SET character_set_client = @saved_cs_client */;
  397. --
  398. -- Table structure for table c_document
  399. --
  400. DROP TABLE IF EXISTS c_document;
  401. /*!40101 SET @saved_cs_client = @@character_set_client */;
  402. /*!40101 SET character_set_client = utf8 */;
  403. CREATE TABLE c_document (
  404. c_id int(11) NOT NULL,
  405. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  406. path varchar(255) NOT NULL DEFAULT '',
  407. comment text,
  408. title varchar(255) DEFAULT NULL,
  409. filetype set('file','folder') NOT NULL DEFAULT 'file',
  410. size int(11) NOT NULL DEFAULT '0',
  411. readonly tinyint(3) unsigned NOT NULL,
  412. session_id int(10) unsigned NOT NULL DEFAULT '0',
  413. PRIMARY KEY (c_id,id)
  414. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  415. /*!40101 SET character_set_client = @saved_cs_client */;
  416. --
  417. -- Table structure for table c_dropbox_category
  418. --
  419. DROP TABLE IF EXISTS c_dropbox_category;
  420. /*!40101 SET @saved_cs_client = @@character_set_client */;
  421. /*!40101 SET character_set_client = utf8 */;
  422. CREATE TABLE c_dropbox_category (
  423. c_id int(11) NOT NULL,
  424. cat_id int(11) NOT NULL AUTO_INCREMENT,
  425. cat_name text NOT NULL,
  426. received tinyint(3) unsigned NOT NULL DEFAULT '0',
  427. sent tinyint(3) unsigned NOT NULL DEFAULT '0',
  428. user_id int(11) NOT NULL DEFAULT '0',
  429. session_id int(11) NOT NULL DEFAULT '0',
  430. PRIMARY KEY (c_id,cat_id),
  431. KEY session_id (session_id)
  432. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  433. /*!40101 SET character_set_client = @saved_cs_client */;
  434. --
  435. -- Table structure for table c_dropbox_feedback
  436. --
  437. DROP TABLE IF EXISTS c_dropbox_feedback;
  438. /*!40101 SET @saved_cs_client = @@character_set_client */;
  439. /*!40101 SET character_set_client = utf8 */;
  440. CREATE TABLE c_dropbox_feedback (
  441. c_id int(11) NOT NULL,
  442. feedback_id int(11) NOT NULL AUTO_INCREMENT,
  443. file_id int(11) NOT NULL DEFAULT '0',
  444. author_user_id int(11) NOT NULL DEFAULT '0',
  445. feedback text NOT NULL,
  446. feedback_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  447. PRIMARY KEY (c_id,feedback_id),
  448. KEY file_id (file_id),
  449. KEY author_user_id (author_user_id)
  450. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  451. /*!40101 SET character_set_client = @saved_cs_client */;
  452. --
  453. -- Table structure for table c_dropbox_file
  454. --
  455. DROP TABLE IF EXISTS c_dropbox_file;
  456. /*!40101 SET @saved_cs_client = @@character_set_client */;
  457. /*!40101 SET character_set_client = utf8 */;
  458. CREATE TABLE c_dropbox_file (
  459. c_id int(11) NOT NULL,
  460. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  461. uploader_id int(10) unsigned NOT NULL DEFAULT '0',
  462. filename varchar(250) NOT NULL DEFAULT '',
  463. filesize int(10) unsigned NOT NULL,
  464. title varchar(250) DEFAULT '',
  465. description varchar(250) DEFAULT '',
  466. author varchar(250) DEFAULT '',
  467. upload_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  468. last_upload_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  469. cat_id int(11) NOT NULL DEFAULT '0',
  470. session_id int(10) unsigned NOT NULL,
  471. PRIMARY KEY (c_id,id),
  472. UNIQUE KEY UN_filename (filename),
  473. KEY session_id (session_id)
  474. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  475. /*!40101 SET character_set_client = @saved_cs_client */;
  476. --
  477. -- Table structure for table c_dropbox_person
  478. --
  479. DROP TABLE IF EXISTS c_dropbox_person;
  480. /*!40101 SET @saved_cs_client = @@character_set_client */;
  481. /*!40101 SET character_set_client = utf8 */;
  482. CREATE TABLE c_dropbox_person (
  483. c_id int(11) NOT NULL,
  484. file_id int(10) unsigned NOT NULL,
  485. user_id int(10) unsigned NOT NULL DEFAULT '0',
  486. PRIMARY KEY (c_id,file_id,user_id)
  487. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  488. /*!40101 SET character_set_client = @saved_cs_client */;
  489. --
  490. -- Table structure for table c_dropbox_post
  491. --
  492. DROP TABLE IF EXISTS c_dropbox_post;
  493. /*!40101 SET @saved_cs_client = @@character_set_client */;
  494. /*!40101 SET character_set_client = utf8 */;
  495. CREATE TABLE c_dropbox_post (
  496. c_id int(11) NOT NULL,
  497. file_id int(10) unsigned NOT NULL,
  498. dest_user_id int(10) unsigned NOT NULL DEFAULT '0',
  499. feedback_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  500. feedback text,
  501. cat_id int(11) NOT NULL DEFAULT '0',
  502. session_id int(10) unsigned NOT NULL,
  503. PRIMARY KEY (c_id,file_id,dest_user_id),
  504. KEY session_id (session_id)
  505. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  506. /*!40101 SET character_set_client = @saved_cs_client */;
  507. --
  508. -- Table structure for table c_forum_attachment
  509. --
  510. DROP TABLE IF EXISTS c_forum_attachment;
  511. /*!40101 SET @saved_cs_client = @@character_set_client */;
  512. /*!40101 SET character_set_client = utf8 */;
  513. CREATE TABLE c_forum_attachment (
  514. c_id int(11) NOT NULL,
  515. id int(11) NOT NULL AUTO_INCREMENT,
  516. path varchar(255) NOT NULL,
  517. comment text,
  518. size int(11) NOT NULL DEFAULT '0',
  519. post_id int(11) NOT NULL,
  520. filename varchar(255) NOT NULL,
  521. PRIMARY KEY (c_id,id)
  522. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  523. /*!40101 SET character_set_client = @saved_cs_client */;
  524. --
  525. -- Table structure for table c_forum_category
  526. --
  527. DROP TABLE IF EXISTS c_forum_category;
  528. /*!40101 SET @saved_cs_client = @@character_set_client */;
  529. /*!40101 SET character_set_client = utf8 */;
  530. CREATE TABLE c_forum_category (
  531. c_id int(11) NOT NULL,
  532. cat_id int(11) NOT NULL AUTO_INCREMENT,
  533. cat_title varchar(255) NOT NULL DEFAULT '',
  534. cat_comment text,
  535. cat_order int(11) NOT NULL DEFAULT '0',
  536. locked int(11) NOT NULL DEFAULT '0',
  537. session_id int(10) unsigned NOT NULL DEFAULT '0',
  538. PRIMARY KEY (c_id,cat_id),
  539. KEY session_id (session_id)
  540. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  541. /*!40101 SET character_set_client = @saved_cs_client */;
  542. --
  543. -- Table structure for table c_forum_forum
  544. --
  545. DROP TABLE IF EXISTS c_forum_forum;
  546. /*!40101 SET @saved_cs_client = @@character_set_client */;
  547. /*!40101 SET character_set_client = utf8 */;
  548. CREATE TABLE c_forum_forum (
  549. c_id int(11) NOT NULL,
  550. forum_id int(11) NOT NULL AUTO_INCREMENT,
  551. forum_title varchar(255) NOT NULL DEFAULT '',
  552. forum_comment text,
  553. forum_threads int(11) DEFAULT '0',
  554. forum_posts int(11) DEFAULT '0',
  555. forum_last_post int(11) DEFAULT '0',
  556. forum_category int(11) DEFAULT NULL,
  557. allow_anonymous int(11) DEFAULT NULL,
  558. allow_edit int(11) DEFAULT NULL,
  559. approval_direct_post varchar(20) DEFAULT NULL,
  560. allow_attachments int(11) DEFAULT NULL,
  561. allow_new_threads int(11) DEFAULT NULL,
  562. default_view varchar(20) DEFAULT NULL,
  563. forum_of_group varchar(20) DEFAULT NULL,
  564. forum_group_public_private varchar(20) DEFAULT 'public',
  565. forum_order int(11) DEFAULT NULL,
  566. locked int(11) NOT NULL DEFAULT '0',
  567. session_id int(11) NOT NULL DEFAULT '0',
  568. forum_image varchar(255) NOT NULL DEFAULT '',
  569. start_time datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  570. end_time datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  571. PRIMARY KEY (c_id,forum_id)
  572. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  573. /*!40101 SET character_set_client = @saved_cs_client */;
  574. --
  575. -- Table structure for table c_forum_mailcue
  576. --
  577. DROP TABLE IF EXISTS c_forum_mailcue;
  578. /*!40101 SET @saved_cs_client = @@character_set_client */;
  579. /*!40101 SET character_set_client = utf8 */;
  580. CREATE TABLE c_forum_mailcue (
  581. c_id int(11) NOT NULL,
  582. id int(11) NOT NULL AUTO_INCREMENT,
  583. user_id int(11) NOT NULL DEFAULT '0',
  584. thread_id int(11) NOT NULL DEFAULT '0',
  585. post_id int(11) NOT NULL DEFAULT '0',
  586. PRIMARY KEY (id,c_id,thread_id,user_id,post_id)
  587. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  588. /*!40101 SET character_set_client = @saved_cs_client */;
  589. --
  590. -- Table structure for table c_forum_notification
  591. --
  592. DROP TABLE IF EXISTS c_forum_notification;
  593. /*!40101 SET @saved_cs_client = @@character_set_client */;
  594. /*!40101 SET character_set_client = utf8 */;
  595. CREATE TABLE c_forum_notification (
  596. c_id int(11) NOT NULL,
  597. id int(11) NOT NULL AUTO_INCREMENT,
  598. user_id int(11) NOT NULL DEFAULT '0',
  599. forum_id int(11) NOT NULL DEFAULT '0',
  600. thread_id int(11) NOT NULL DEFAULT '0',
  601. post_id int(11) NOT NULL DEFAULT '0',
  602. PRIMARY KEY (id,c_id,user_id,forum_id,thread_id,post_id),
  603. KEY user_id (user_id),
  604. KEY forum_id (forum_id)
  605. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  606. /*!40101 SET character_set_client = @saved_cs_client */;
  607. --
  608. -- Table structure for table c_forum_post
  609. --
  610. DROP TABLE IF EXISTS c_forum_post;
  611. /*!40101 SET @saved_cs_client = @@character_set_client */;
  612. /*!40101 SET character_set_client = utf8 */;
  613. CREATE TABLE c_forum_post (
  614. c_id int(11) NOT NULL,
  615. post_id int(11) NOT NULL AUTO_INCREMENT,
  616. post_title varchar(250) DEFAULT NULL,
  617. post_text text,
  618. thread_id int(11) DEFAULT '0',
  619. forum_id int(11) DEFAULT '0',
  620. poster_id int(11) DEFAULT '0',
  621. poster_name varchar(100) DEFAULT '',
  622. post_date datetime DEFAULT '0000-00-00 00:00:00',
  623. post_notification tinyint(4) DEFAULT '0',
  624. post_parent_id int(11) DEFAULT '0',
  625. visible tinyint(4) DEFAULT '1',
  626. PRIMARY KEY (c_id,post_id),
  627. KEY poster_id (poster_id),
  628. KEY forum_id (forum_id),
  629. KEY idx_forum_post_thread_id (thread_id),
  630. KEY idx_forum_post_visible (visible)
  631. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  632. /*!40101 SET character_set_client = @saved_cs_client */;
  633. --
  634. -- Table structure for table c_forum_thread
  635. --
  636. DROP TABLE IF EXISTS c_forum_thread;
  637. /*!40101 SET @saved_cs_client = @@character_set_client */;
  638. /*!40101 SET character_set_client = utf8 */;
  639. CREATE TABLE c_forum_thread (
  640. c_id int(11) NOT NULL,
  641. thread_id int(11) NOT NULL AUTO_INCREMENT,
  642. thread_title varchar(255) DEFAULT NULL,
  643. forum_id int(11) DEFAULT NULL,
  644. thread_replies int(11) DEFAULT '0',
  645. thread_poster_id int(11) DEFAULT NULL,
  646. thread_poster_name varchar(100) DEFAULT '',
  647. thread_views int(11) DEFAULT '0',
  648. thread_last_post int(11) DEFAULT NULL,
  649. thread_date datetime DEFAULT '0000-00-00 00:00:00',
  650. thread_sticky tinyint(3) unsigned DEFAULT '0',
  651. locked int(11) NOT NULL DEFAULT '0',
  652. session_id int(10) unsigned DEFAULT NULL,
  653. thread_title_qualify varchar(255) DEFAULT '',
  654. thread_qualify_max float(6,2) unsigned NOT NULL DEFAULT '0.00',
  655. thread_close_date datetime DEFAULT '0000-00-00 00:00:00',
  656. thread_weight float(6,2) unsigned NOT NULL DEFAULT '0.00',
  657. PRIMARY KEY (c_id,thread_id),
  658. KEY idx_forum_thread_forum_id (forum_id)
  659. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  660. /*!40101 SET character_set_client = @saved_cs_client */;
  661. --
  662. -- Table structure for table c_forum_thread_qualify
  663. --
  664. DROP TABLE IF EXISTS c_forum_thread_qualify;
  665. /*!40101 SET @saved_cs_client = @@character_set_client */;
  666. /*!40101 SET character_set_client = utf8 */;
  667. CREATE TABLE c_forum_thread_qualify (
  668. c_id int(11) NOT NULL,
  669. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  670. user_id int(10) unsigned NOT NULL,
  671. thread_id int(11) NOT NULL,
  672. qualify float(6,2) NOT NULL DEFAULT '0.00',
  673. qualify_user_id int(11) DEFAULT NULL,
  674. qualify_time datetime DEFAULT '0000-00-00 00:00:00',
  675. session_id int(11) DEFAULT NULL,
  676. PRIMARY KEY (c_id,id),
  677. KEY user_id (user_id,thread_id)
  678. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  679. /*!40101 SET character_set_client = @saved_cs_client */;
  680. --
  681. -- Table structure for table c_forum_thread_qualify_log
  682. --
  683. DROP TABLE IF EXISTS c_forum_thread_qualify_log;
  684. /*!40101 SET @saved_cs_client = @@character_set_client */;
  685. /*!40101 SET character_set_client = utf8 */;
  686. CREATE TABLE c_forum_thread_qualify_log (
  687. c_id int(11) NOT NULL,
  688. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  689. user_id int(10) unsigned NOT NULL,
  690. thread_id int(11) NOT NULL,
  691. qualify float(6,2) NOT NULL DEFAULT '0.00',
  692. qualify_user_id int(11) DEFAULT NULL,
  693. qualify_time datetime DEFAULT '0000-00-00 00:00:00',
  694. session_id int(11) DEFAULT NULL,
  695. PRIMARY KEY (c_id,id),
  696. KEY user_id (user_id,thread_id)
  697. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  698. /*!40101 SET character_set_client = @saved_cs_client */;
  699. --
  700. -- Table structure for table c_glossary
  701. --
  702. DROP TABLE IF EXISTS c_glossary;
  703. /*!40101 SET @saved_cs_client = @@character_set_client */;
  704. /*!40101 SET character_set_client = utf8 */;
  705. CREATE TABLE c_glossary (
  706. c_id int(11) NOT NULL,
  707. glossary_id int(10) unsigned NOT NULL AUTO_INCREMENT,
  708. name varchar(255) NOT NULL,
  709. description text NOT NULL,
  710. display_order int(11) DEFAULT NULL,
  711. session_id int(11) DEFAULT '0',
  712. PRIMARY KEY (c_id,glossary_id),
  713. KEY session_id (session_id)
  714. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  715. /*!40101 SET character_set_client = @saved_cs_client */;
  716. --
  717. -- Table structure for table c_group_category
  718. --
  719. DROP TABLE IF EXISTS c_group_category;
  720. /*!40101 SET @saved_cs_client = @@character_set_client */;
  721. /*!40101 SET character_set_client = utf8 */;
  722. CREATE TABLE c_group_category (
  723. c_id int(11) NOT NULL,
  724. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  725. title varchar(255) NOT NULL DEFAULT '',
  726. description text NOT NULL,
  727. doc_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  728. calendar_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  729. work_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  730. announcements_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  731. forum_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  732. wiki_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  733. chat_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  734. max_student int(10) unsigned NOT NULL DEFAULT '8',
  735. self_reg_allowed tinyint(3) unsigned NOT NULL DEFAULT '0',
  736. self_unreg_allowed tinyint(3) unsigned NOT NULL DEFAULT '0',
  737. groups_per_user int(10) unsigned NOT NULL DEFAULT '0',
  738. display_order int(10) unsigned NOT NULL DEFAULT '0',
  739. PRIMARY KEY (c_id,id)
  740. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  741. /*!40101 SET character_set_client = @saved_cs_client */;
  742. --
  743. -- Table structure for table c_group_info
  744. --
  745. DROP TABLE IF EXISTS c_group_info;
  746. /*!40101 SET @saved_cs_client = @@character_set_client */;
  747. /*!40101 SET character_set_client = utf8 */;
  748. CREATE TABLE c_group_info (
  749. c_id int(11) NOT NULL,
  750. id int(11) NOT NULL,
  751. name varchar(100) DEFAULT NULL,
  752. category_id int(10) unsigned NOT NULL DEFAULT '0',
  753. description text,
  754. max_student int(10) unsigned NOT NULL DEFAULT '8',
  755. doc_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  756. calendar_state tinyint(3) unsigned NOT NULL DEFAULT '0',
  757. work_state tinyint(3) unsigned NOT NULL DEFAULT '0',
  758. announcements_state tinyint(3) unsigned NOT NULL DEFAULT '0',
  759. forum_state tinyint(3) unsigned NOT NULL DEFAULT '0',
  760. wiki_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  761. chat_state tinyint(3) unsigned NOT NULL DEFAULT '1',
  762. secret_directory varchar(255) DEFAULT NULL,
  763. self_registration_allowed tinyint(3) unsigned NOT NULL DEFAULT '0',
  764. self_unregistration_allowed tinyint(3) unsigned NOT NULL DEFAULT '0',
  765. session_id int(11) NOT NULL,
  766. iid int(10) unsigned NOT NULL AUTO_INCREMENT,
  767. PRIMARY KEY (iid),
  768. KEY session_id (session_id)
  769. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  770. /*!40101 SET character_set_client = @saved_cs_client */;
  771. --
  772. -- Table structure for table c_group_rel_tutor
  773. --
  774. DROP TABLE IF EXISTS c_group_rel_tutor;
  775. /*!40101 SET @saved_cs_client = @@character_set_client */;
  776. /*!40101 SET character_set_client = utf8 */;
  777. CREATE TABLE c_group_rel_tutor (
  778. c_id int(11) NOT NULL,
  779. id int(11) NOT NULL AUTO_INCREMENT,
  780. user_id int(11) NOT NULL,
  781. group_id int(11) NOT NULL DEFAULT '0',
  782. PRIMARY KEY (c_id,id)
  783. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  784. /*!40101 SET character_set_client = @saved_cs_client */;
  785. --
  786. -- Table structure for table c_group_rel_user
  787. --
  788. DROP TABLE IF EXISTS c_group_rel_user;
  789. /*!40101 SET @saved_cs_client = @@character_set_client */;
  790. /*!40101 SET character_set_client = utf8 */;
  791. CREATE TABLE c_group_rel_user (
  792. c_id int(11) NOT NULL,
  793. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  794. user_id int(10) unsigned NOT NULL,
  795. group_id int(10) unsigned NOT NULL DEFAULT '0',
  796. status int(11) NOT NULL DEFAULT '0',
  797. role char(50) NOT NULL,
  798. PRIMARY KEY (c_id,id)
  799. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  800. /*!40101 SET character_set_client = @saved_cs_client */;
  801. --
  802. -- Table structure for table c_item_property
  803. --
  804. DROP TABLE IF EXISTS c_item_property;
  805. /*!40101 SET @saved_cs_client = @@character_set_client */;
  806. /*!40101 SET character_set_client = utf8 */;
  807. CREATE TABLE c_item_property (
  808. c_id int(11) NOT NULL,
  809. tool varchar(100) NOT NULL DEFAULT '',
  810. insert_user_id int(10) unsigned NOT NULL DEFAULT '0',
  811. insert_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  812. lastedit_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  813. ref int(11) NOT NULL DEFAULT '0',
  814. lastedit_type varchar(100) NOT NULL DEFAULT '',
  815. lastedit_user_id int(10) unsigned NOT NULL DEFAULT '0',
  816. to_group_id int(10) unsigned DEFAULT NULL,
  817. to_user_id int(10) unsigned DEFAULT NULL,
  818. visibility tinyint(4) NOT NULL DEFAULT '1',
  819. start_visible datetime DEFAULT NULL,
  820. end_visible datetime DEFAULT NULL,
  821. id_session int(11) DEFAULT NULL,
  822. id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  823. PRIMARY KEY (id),
  824. KEY idx_item_property_toolref (tool,ref)
  825. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  826. /*!40101 SET character_set_client = @saved_cs_client */;
  827. --
  828. -- Table structure for table c_link
  829. --
  830. DROP TABLE IF EXISTS c_link;
  831. /*!40101 SET @saved_cs_client = @@character_set_client */;
  832. /*!40101 SET character_set_client = utf8 */;
  833. CREATE TABLE c_link (
  834. c_id int(11) NOT NULL,
  835. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  836. url text NOT NULL,
  837. title varchar(150) DEFAULT NULL,
  838. description text,
  839. category_id int(10) unsigned DEFAULT NULL,
  840. display_order int(10) unsigned NOT NULL DEFAULT '0',
  841. on_homepage enum('0','1') NOT NULL DEFAULT '0',
  842. target char(10) DEFAULT '_self',
  843. session_id int(11) DEFAULT '0',
  844. PRIMARY KEY (c_id,id),
  845. KEY session_id (session_id)
  846. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  847. /*!40101 SET character_set_client = @saved_cs_client */;
  848. --
  849. -- Table structure for table c_link_category
  850. --
  851. DROP TABLE IF EXISTS c_link_category;
  852. /*!40101 SET @saved_cs_client = @@character_set_client */;
  853. /*!40101 SET character_set_client = utf8 */;
  854. CREATE TABLE c_link_category (
  855. c_id int(11) NOT NULL,
  856. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  857. category_title varchar(255) NOT NULL,
  858. description text,
  859. display_order mediumint(8) unsigned NOT NULL DEFAULT '0',
  860. session_id int(11) DEFAULT '0',
  861. PRIMARY KEY (c_id,id),
  862. KEY session_id (session_id)
  863. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  864. /*!40101 SET character_set_client = @saved_cs_client */;
  865. --
  866. -- Table structure for table c_lp
  867. --
  868. DROP TABLE IF EXISTS c_lp;
  869. /*!40101 SET @saved_cs_client = @@character_set_client */;
  870. /*!40101 SET character_set_client = utf8 */;
  871. CREATE TABLE c_lp (
  872. c_id int(11) NOT NULL,
  873. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  874. lp_type int(10) unsigned NOT NULL,
  875. name varchar(255) NOT NULL,
  876. ref tinytext,
  877. description text,
  878. path text NOT NULL,
  879. force_commit tinyint(3) unsigned NOT NULL DEFAULT '0',
  880. default_view_mod char(32) NOT NULL DEFAULT 'embedded',
  881. default_encoding char(32) NOT NULL DEFAULT 'UTF-8',
  882. display_order int(10) unsigned NOT NULL DEFAULT '0',
  883. content_maker tinytext NOT NULL,
  884. content_local varchar(32) NOT NULL DEFAULT 'local',
  885. content_license text NOT NULL,
  886. prevent_reinit tinyint(3) unsigned NOT NULL DEFAULT '1',
  887. js_lib tinytext NOT NULL,
  888. debug tinyint(3) unsigned NOT NULL DEFAULT '0',
  889. theme varchar(255) NOT NULL DEFAULT '',
  890. preview_image varchar(255) NOT NULL DEFAULT '',
  891. author varchar(255) NOT NULL DEFAULT '',
  892. session_id int(10) unsigned NOT NULL DEFAULT '0',
  893. prerequisite int(10) unsigned NOT NULL DEFAULT '0',
  894. hide_toc_frame tinyint(4) NOT NULL DEFAULT '0',
  895. seriousgame_mode tinyint(4) NOT NULL DEFAULT '0',
  896. use_max_score int(10) unsigned NOT NULL DEFAULT '1',
  897. autolunch int(10) unsigned NOT NULL DEFAULT '0',
  898. created_on datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  899. modified_on datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  900. publicated_on datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  901. expired_on datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  902. max_attempts int(11) NOT NULL DEFAULT '0',
  903. category_id int(10) unsigned NOT NULL DEFAULT '0',
  904. subscribe_users int(11) NOT NULL DEFAULT '0',
  905. PRIMARY KEY (c_id,id)
  906. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  907. /*!40101 SET character_set_client = @saved_cs_client */;
  908. --
  909. -- Table structure for table c_lp_category
  910. --
  911. DROP TABLE IF EXISTS c_lp_category;
  912. /*!40101 SET @saved_cs_client = @@character_set_client */;
  913. /*!40101 SET character_set_client = utf8 */;
  914. CREATE TABLE c_lp_category (
  915. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  916. c_id int(10) unsigned NOT NULL,
  917. name varchar(255) DEFAULT NULL,
  918. position int(11) DEFAULT NULL,
  919. PRIMARY KEY (id)
  920. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  921. /*!40101 SET character_set_client = @saved_cs_client */;
  922. --
  923. -- Table structure for table c_lp_item
  924. --
  925. DROP TABLE IF EXISTS c_lp_item;
  926. /*!40101 SET @saved_cs_client = @@character_set_client */;
  927. /*!40101 SET character_set_client = utf8 */;
  928. CREATE TABLE c_lp_item (
  929. c_id int(11) NOT NULL,
  930. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  931. lp_id int(10) unsigned NOT NULL,
  932. item_type char(32) NOT NULL DEFAULT 'dokeos_document',
  933. ref tinytext NOT NULL,
  934. title varchar(511) NOT NULL,
  935. description varchar(511) NOT NULL DEFAULT '',
  936. path text NOT NULL,
  937. min_score float unsigned NOT NULL DEFAULT '0',
  938. max_score float unsigned DEFAULT '100',
  939. mastery_score float unsigned DEFAULT NULL,
  940. parent_item_id int(10) unsigned NOT NULL DEFAULT '0',
  941. previous_item_id int(10) unsigned NOT NULL DEFAULT '0',
  942. next_item_id int(10) unsigned NOT NULL DEFAULT '0',
  943. display_order int(10) unsigned NOT NULL DEFAULT '0',
  944. prerequisite text,
  945. parameters text,
  946. launch_data text NOT NULL,
  947. max_time_allowed char(13) DEFAULT '',
  948. terms text,
  949. search_did int(11) DEFAULT NULL,
  950. audio varchar(250) DEFAULT NULL,
  951. PRIMARY KEY (c_id,id),
  952. KEY lp_id (lp_id),
  953. KEY idx_c_lp_item_cid_lp_id (c_id,lp_id)
  954. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  955. /*!40101 SET character_set_client = @saved_cs_client */;
  956. --
  957. -- Table structure for table c_lp_item_view
  958. --
  959. DROP TABLE IF EXISTS c_lp_item_view;
  960. /*!40101 SET @saved_cs_client = @@character_set_client */;
  961. /*!40101 SET character_set_client = utf8 */;
  962. CREATE TABLE c_lp_item_view (
  963. c_id int(11) NOT NULL,
  964. id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  965. lp_item_id int(10) unsigned NOT NULL,
  966. lp_view_id int(10) unsigned NOT NULL,
  967. view_count int(10) unsigned NOT NULL DEFAULT '0',
  968. start_time int(10) unsigned NOT NULL,
  969. total_time int(10) unsigned NOT NULL DEFAULT '0',
  970. score float unsigned NOT NULL DEFAULT '0',
  971. status char(32) NOT NULL DEFAULT 'not attempted',
  972. suspend_data longtext,
  973. lesson_location text,
  974. core_exit varchar(32) NOT NULL DEFAULT 'none',
  975. max_score varchar(8) DEFAULT '',
  976. PRIMARY KEY (c_id,id),
  977. KEY lp_item_id (lp_item_id),
  978. KEY lp_view_id (lp_view_id),
  979. KEY idx_c_lp_item_view_cid_lp_view_id_lp_item_id (c_id,lp_view_id,lp_item_id)
  980. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  981. /*!40101 SET character_set_client = @saved_cs_client */;
  982. --
  983. -- Table structure for table c_lp_iv_interaction
  984. --
  985. DROP TABLE IF EXISTS c_lp_iv_interaction;
  986. /*!40101 SET @saved_cs_client = @@character_set_client */;
  987. /*!40101 SET character_set_client = utf8 */;
  988. CREATE TABLE c_lp_iv_interaction (
  989. c_id int(11) NOT NULL,
  990. id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  991. order_id int(10) unsigned NOT NULL DEFAULT '0',
  992. lp_iv_id bigint(20) unsigned NOT NULL,
  993. interaction_id varchar(255) NOT NULL DEFAULT '',
  994. interaction_type varchar(255) NOT NULL DEFAULT '',
  995. weighting double NOT NULL DEFAULT '0',
  996. completion_time varchar(16) NOT NULL DEFAULT '',
  997. correct_responses text NOT NULL,
  998. student_response text NOT NULL,
  999. result varchar(255) NOT NULL DEFAULT '',
  1000. latency varchar(16) NOT NULL DEFAULT '',
  1001. PRIMARY KEY (c_id,id),
  1002. KEY lp_iv_id (lp_iv_id)
  1003. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1004. /*!40101 SET character_set_client = @saved_cs_client */;
  1005. --
  1006. -- Table structure for table c_lp_iv_objective
  1007. --
  1008. DROP TABLE IF EXISTS c_lp_iv_objective;
  1009. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1010. /*!40101 SET character_set_client = utf8 */;
  1011. CREATE TABLE c_lp_iv_objective (
  1012. c_id int(11) NOT NULL,
  1013. id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  1014. lp_iv_id bigint(20) unsigned NOT NULL,
  1015. order_id int(10) unsigned NOT NULL DEFAULT '0',
  1016. objective_id varchar(255) NOT NULL DEFAULT '',
  1017. score_raw float unsigned NOT NULL DEFAULT '0',
  1018. score_max float unsigned NOT NULL DEFAULT '0',
  1019. score_min float unsigned NOT NULL DEFAULT '0',
  1020. status char(32) NOT NULL DEFAULT 'not attempted',
  1021. PRIMARY KEY (c_id,id),
  1022. KEY lp_iv_id (lp_iv_id)
  1023. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1024. /*!40101 SET character_set_client = @saved_cs_client */;
  1025. --
  1026. -- Table structure for table c_lp_view
  1027. --
  1028. DROP TABLE IF EXISTS c_lp_view;
  1029. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1030. /*!40101 SET character_set_client = utf8 */;
  1031. CREATE TABLE c_lp_view (
  1032. c_id int(11) NOT NULL,
  1033. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1034. lp_id int(10) unsigned NOT NULL,
  1035. user_id int(10) unsigned NOT NULL,
  1036. view_count int(10) unsigned NOT NULL DEFAULT '0',
  1037. last_item int(10) unsigned NOT NULL DEFAULT '0',
  1038. progress int(10) unsigned DEFAULT '0',
  1039. session_id int(11) NOT NULL DEFAULT '0',
  1040. PRIMARY KEY (c_id,id),
  1041. KEY lp_id (lp_id),
  1042. KEY user_id (user_id),
  1043. KEY session_id (session_id)
  1044. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1045. /*!40101 SET character_set_client = @saved_cs_client */;
  1046. --
  1047. -- Table structure for table c_metadata
  1048. --
  1049. DROP TABLE IF EXISTS c_metadata;
  1050. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1051. /*!40101 SET character_set_client = utf8 */;
  1052. CREATE TABLE c_metadata (
  1053. c_id int(11) NOT NULL,
  1054. eid varchar(250) NOT NULL,
  1055. mdxmltext text,
  1056. md5 char(32) DEFAULT '',
  1057. htmlcache1 text,
  1058. htmlcache2 text,
  1059. indexabletext text,
  1060. PRIMARY KEY (c_id,eid)
  1061. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1062. /*!40101 SET character_set_client = @saved_cs_client */;
  1063. --
  1064. -- Table structure for table c_notebook
  1065. --
  1066. DROP TABLE IF EXISTS c_notebook;
  1067. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1068. /*!40101 SET character_set_client = utf8 */;
  1069. CREATE TABLE c_notebook (
  1070. c_id int(11) NOT NULL,
  1071. notebook_id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1072. user_id int(10) unsigned NOT NULL,
  1073. course varchar(40) NOT NULL,
  1074. session_id int(11) NOT NULL DEFAULT '0',
  1075. title varchar(255) NOT NULL,
  1076. description text NOT NULL,
  1077. creation_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1078. update_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1079. status int(11) DEFAULT NULL,
  1080. PRIMARY KEY (c_id,notebook_id)
  1081. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1082. /*!40101 SET character_set_client = @saved_cs_client */;
  1083. --
  1084. -- Table structure for table c_online_connected
  1085. --
  1086. DROP TABLE IF EXISTS c_online_connected;
  1087. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1088. /*!40101 SET character_set_client = utf8 */;
  1089. CREATE TABLE c_online_connected (
  1090. c_id int(11) NOT NULL,
  1091. user_id int(10) unsigned NOT NULL,
  1092. last_connection datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1093. PRIMARY KEY (c_id,user_id)
  1094. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1095. /*!40101 SET character_set_client = @saved_cs_client */;
  1096. --
  1097. -- Table structure for table c_online_link
  1098. --
  1099. DROP TABLE IF EXISTS c_online_link;
  1100. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1101. /*!40101 SET character_set_client = utf8 */;
  1102. CREATE TABLE c_online_link (
  1103. c_id int(11) NOT NULL,
  1104. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1105. name char(50) NOT NULL DEFAULT '',
  1106. url char(100) NOT NULL,
  1107. PRIMARY KEY (c_id,id)
  1108. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1109. /*!40101 SET character_set_client = @saved_cs_client */;
  1110. --
  1111. -- Table structure for table c_permission_group
  1112. --
  1113. DROP TABLE IF EXISTS c_permission_group;
  1114. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1115. /*!40101 SET character_set_client = utf8 */;
  1116. CREATE TABLE c_permission_group (
  1117. c_id int(11) NOT NULL,
  1118. id int(11) NOT NULL AUTO_INCREMENT,
  1119. group_id int(11) NOT NULL DEFAULT '0',
  1120. tool varchar(250) NOT NULL DEFAULT '',
  1121. action varchar(250) NOT NULL DEFAULT '',
  1122. PRIMARY KEY (c_id,id)
  1123. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1124. /*!40101 SET character_set_client = @saved_cs_client */;
  1125. --
  1126. -- Table structure for table c_permission_task
  1127. --
  1128. DROP TABLE IF EXISTS c_permission_task;
  1129. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1130. /*!40101 SET character_set_client = utf8 */;
  1131. CREATE TABLE c_permission_task (
  1132. c_id int(11) NOT NULL,
  1133. id int(11) NOT NULL AUTO_INCREMENT,
  1134. task_id int(11) NOT NULL DEFAULT '0',
  1135. tool varchar(250) NOT NULL DEFAULT '',
  1136. action varchar(250) NOT NULL DEFAULT '',
  1137. PRIMARY KEY (c_id,id)
  1138. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1139. /*!40101 SET character_set_client = @saved_cs_client */;
  1140. --
  1141. -- Table structure for table c_permission_user
  1142. --
  1143. DROP TABLE IF EXISTS c_permission_user;
  1144. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1145. /*!40101 SET character_set_client = utf8 */;
  1146. CREATE TABLE c_permission_user (
  1147. c_id int(11) NOT NULL,
  1148. id int(11) NOT NULL AUTO_INCREMENT,
  1149. user_id int(11) NOT NULL DEFAULT '0',
  1150. tool varchar(250) NOT NULL DEFAULT '',
  1151. action varchar(250) NOT NULL DEFAULT '',
  1152. PRIMARY KEY (c_id,id)
  1153. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1154. /*!40101 SET character_set_client = @saved_cs_client */;
  1155. --
  1156. -- Table structure for table c_quiz
  1157. --
  1158. DROP TABLE IF EXISTS c_quiz;
  1159. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1160. /*!40101 SET character_set_client = utf8 */;
  1161. CREATE TABLE c_quiz (
  1162. c_id int(11) NOT NULL,
  1163. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1164. title varchar(255) NOT NULL,
  1165. description text,
  1166. sound varchar(255) DEFAULT NULL,
  1167. type tinyint(3) unsigned NOT NULL DEFAULT '1',
  1168. random int(11) NOT NULL DEFAULT '0',
  1169. random_answers tinyint(3) unsigned NOT NULL DEFAULT '0',
  1170. active tinyint(4) NOT NULL DEFAULT '0',
  1171. results_disabled int(10) unsigned NOT NULL DEFAULT '0',
  1172. access_condition text,
  1173. max_attempt int(11) NOT NULL DEFAULT '0',
  1174. start_time datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1175. end_time datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1176. feedback_type int(11) NOT NULL DEFAULT '0',
  1177. expired_time int(11) NOT NULL DEFAULT '0',
  1178. session_id int(11) DEFAULT '0',
  1179. propagate_neg int(11) NOT NULL DEFAULT '0',
  1180. review_answers int(11) NOT NULL DEFAULT '0',
  1181. random_by_category int(11) NOT NULL DEFAULT '0',
  1182. text_when_finished text,
  1183. display_category_name int(11) NOT NULL DEFAULT '1',
  1184. pass_percentage int(11) DEFAULT NULL,
  1185. PRIMARY KEY (c_id,id),
  1186. KEY session_id (session_id)
  1187. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1188. /*!40101 SET character_set_client = @saved_cs_client */;
  1189. --
  1190. -- Table structure for table c_quiz_answer
  1191. --
  1192. DROP TABLE IF EXISTS c_quiz_answer;
  1193. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1194. /*!40101 SET character_set_client = utf8 */;
  1195. CREATE TABLE c_quiz_answer (
  1196. c_id int(11) NOT NULL,
  1197. id int(10) unsigned NOT NULL,
  1198. id_auto int(11) NOT NULL AUTO_INCREMENT,
  1199. question_id int(10) unsigned NOT NULL,
  1200. answer text NOT NULL,
  1201. correct mediumint(8) unsigned DEFAULT NULL,
  1202. comment text,
  1203. ponderation float(6,2) NOT NULL DEFAULT '0.00',
  1204. position mediumint(8) unsigned NOT NULL DEFAULT '1',
  1205. hotspot_coordinates text,
  1206. hotspot_type enum('square','circle','poly','delineation','oar') DEFAULT NULL,
  1207. destination text NOT NULL,
  1208. answer_code char(10) DEFAULT '',
  1209. PRIMARY KEY (c_id,id_auto),
  1210. KEY idx_quiz_answer_c_q (c_id,question_id)
  1211. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1212. /*!40101 SET character_set_client = @saved_cs_client */;
  1213. --
  1214. -- Table structure for table c_quiz_order
  1215. --
  1216. DROP TABLE IF EXISTS c_quiz_order;
  1217. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1218. /*!40101 SET character_set_client = utf8 */;
  1219. CREATE TABLE c_quiz_order (
  1220. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1221. c_id int(10) unsigned NOT NULL,
  1222. session_id int(10) unsigned NOT NULL,
  1223. exercise_id int(11) NOT NULL,
  1224. exercise_order int(11) NOT NULL,
  1225. PRIMARY KEY (id)
  1226. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1227. /*!40101 SET character_set_client = @saved_cs_client */;
  1228. --
  1229. -- Table structure for table c_quiz_question
  1230. --
  1231. DROP TABLE IF EXISTS c_quiz_question;
  1232. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1233. /*!40101 SET character_set_client = utf8 */;
  1234. CREATE TABLE c_quiz_question (
  1235. c_id int(11) NOT NULL,
  1236. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1237. question text NOT NULL,
  1238. description text,
  1239. ponderation float(6,2) NOT NULL DEFAULT '0.00',
  1240. position mediumint(8) unsigned NOT NULL DEFAULT '1',
  1241. type tinyint(3) unsigned NOT NULL DEFAULT '2',
  1242. picture varchar(50) DEFAULT NULL,
  1243. level int(10) unsigned NOT NULL DEFAULT '0',
  1244. extra varchar(255) DEFAULT NULL,
  1245. question_code char(10) DEFAULT '',
  1246. parent_id int(10) unsigned NOT NULL DEFAULT '0',
  1247. PRIMARY KEY (c_id,id),
  1248. KEY position (position)
  1249. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1250. /*!40101 SET character_set_client = @saved_cs_client */;
  1251. --
  1252. -- Table structure for table c_quiz_question_category
  1253. --
  1254. DROP TABLE IF EXISTS c_quiz_question_category;
  1255. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1256. /*!40101 SET character_set_client = utf8 */;
  1257. CREATE TABLE c_quiz_question_category (
  1258. c_id int(11) NOT NULL,
  1259. id int(11) NOT NULL AUTO_INCREMENT,
  1260. title varchar(255) NOT NULL,
  1261. description text NOT NULL,
  1262. PRIMARY KEY (c_id,id)
  1263. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1264. /*!40101 SET character_set_client = @saved_cs_client */;
  1265. --
  1266. -- Table structure for table c_quiz_question_option
  1267. --
  1268. DROP TABLE IF EXISTS c_quiz_question_option;
  1269. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1270. /*!40101 SET character_set_client = utf8 */;
  1271. CREATE TABLE c_quiz_question_option (
  1272. c_id int(11) NOT NULL,
  1273. id int(11) NOT NULL AUTO_INCREMENT,
  1274. question_id int(11) NOT NULL,
  1275. name varchar(255) DEFAULT NULL,
  1276. position int(10) unsigned NOT NULL,
  1277. PRIMARY KEY (c_id,id)
  1278. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1279. /*!40101 SET character_set_client = @saved_cs_client */;
  1280. --
  1281. -- Table structure for table c_quiz_question_rel_category
  1282. --
  1283. DROP TABLE IF EXISTS c_quiz_question_rel_category;
  1284. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1285. /*!40101 SET character_set_client = utf8 */;
  1286. CREATE TABLE c_quiz_question_rel_category (
  1287. c_id int(11) NOT NULL,
  1288. question_id int(11) NOT NULL,
  1289. category_id int(11) NOT NULL,
  1290. PRIMARY KEY (c_id,question_id)
  1291. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1292. /*!40101 SET character_set_client = @saved_cs_client */;
  1293. --
  1294. -- Table structure for table c_quiz_rel_question
  1295. --
  1296. DROP TABLE IF EXISTS c_quiz_rel_question;
  1297. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1298. /*!40101 SET character_set_client = utf8 */;
  1299. CREATE TABLE c_quiz_rel_question (
  1300. c_id int(11) NOT NULL,
  1301. question_id int(10) unsigned NOT NULL,
  1302. exercice_id int(10) unsigned NOT NULL,
  1303. question_order int(10) unsigned NOT NULL DEFAULT '1',
  1304. PRIMARY KEY (c_id,question_id,exercice_id)
  1305. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1306. /*!40101 SET character_set_client = @saved_cs_client */;
  1307. --
  1308. -- Table structure for table c_resource
  1309. --
  1310. DROP TABLE IF EXISTS c_resource;
  1311. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1312. /*!40101 SET character_set_client = utf8 */;
  1313. CREATE TABLE c_resource (
  1314. c_id int(11) NOT NULL,
  1315. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1316. source_type varchar(50) DEFAULT NULL,
  1317. source_id int(10) unsigned DEFAULT NULL,
  1318. resource_type varchar(50) DEFAULT NULL,
  1319. resource_id int(10) unsigned DEFAULT NULL,
  1320. PRIMARY KEY (c_id,id)
  1321. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1322. /*!40101 SET character_set_client = @saved_cs_client */;
  1323. --
  1324. -- Table structure for table c_role
  1325. --
  1326. DROP TABLE IF EXISTS c_role;
  1327. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1328. /*!40101 SET character_set_client = utf8 */;
  1329. CREATE TABLE c_role (
  1330. c_id int(11) NOT NULL,
  1331. role_id int(11) NOT NULL AUTO_INCREMENT,
  1332. role_name varchar(250) NOT NULL DEFAULT '',
  1333. role_comment text,
  1334. default_role tinyint(4) DEFAULT '0',
  1335. PRIMARY KEY (c_id,role_id)
  1336. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1337. /*!40101 SET character_set_client = @saved_cs_client */;
  1338. --
  1339. -- Table structure for table c_role_group
  1340. --
  1341. DROP TABLE IF EXISTS c_role_group;
  1342. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1343. /*!40101 SET character_set_client = utf8 */;
  1344. CREATE TABLE c_role_group (
  1345. c_id int(11) NOT NULL,
  1346. id int(11) NOT NULL AUTO_INCREMENT,
  1347. role_id int(11) NOT NULL DEFAULT '0',
  1348. scope varchar(20) NOT NULL DEFAULT 'course',
  1349. group_id int(11) NOT NULL DEFAULT '0',
  1350. PRIMARY KEY (id,c_id,group_id)
  1351. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1352. /*!40101 SET character_set_client = @saved_cs_client */;
  1353. --
  1354. -- Table structure for table c_role_permissions
  1355. --
  1356. DROP TABLE IF EXISTS c_role_permissions;
  1357. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1358. /*!40101 SET character_set_client = utf8 */;
  1359. CREATE TABLE c_role_permissions (
  1360. c_id int(11) NOT NULL,
  1361. id int(11) NOT NULL AUTO_INCREMENT,
  1362. role_id int(11) NOT NULL DEFAULT '0',
  1363. tool varchar(250) NOT NULL DEFAULT '',
  1364. action varchar(50) NOT NULL DEFAULT '',
  1365. default_perm tinyint(4) NOT NULL DEFAULT '0',
  1366. PRIMARY KEY (id,c_id,role_id,tool,action)
  1367. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1368. /*!40101 SET character_set_client = @saved_cs_client */;
  1369. --
  1370. -- Table structure for table c_role_user
  1371. --
  1372. DROP TABLE IF EXISTS c_role_user;
  1373. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1374. /*!40101 SET character_set_client = utf8 */;
  1375. CREATE TABLE c_role_user (
  1376. c_id int(11) NOT NULL,
  1377. role_id int(11) NOT NULL DEFAULT '0',
  1378. scope varchar(20) NOT NULL DEFAULT 'course',
  1379. user_id int(11) NOT NULL DEFAULT '0',
  1380. PRIMARY KEY (c_id,role_id,user_id)
  1381. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1382. /*!40101 SET character_set_client = @saved_cs_client */;
  1383. --
  1384. -- Table structure for table c_student_publication
  1385. --
  1386. DROP TABLE IF EXISTS c_student_publication;
  1387. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1388. /*!40101 SET character_set_client = utf8 */;
  1389. CREATE TABLE c_student_publication (
  1390. c_id int(11) NOT NULL,
  1391. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1392. url varchar(255) DEFAULT NULL,
  1393. title varchar(255) DEFAULT NULL,
  1394. description text,
  1395. author varchar(255) DEFAULT NULL,
  1396. active tinyint(4) DEFAULT NULL,
  1397. accepted tinyint(4) DEFAULT '0',
  1398. post_group_id int(11) NOT NULL DEFAULT '0',
  1399. sent_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1400. filetype set('file','folder') NOT NULL DEFAULT 'file',
  1401. has_properties int(10) unsigned NOT NULL DEFAULT '0',
  1402. view_properties tinyint(4) DEFAULT NULL,
  1403. qualification float(6,2) unsigned NOT NULL DEFAULT '0.00',
  1404. date_of_qualification datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1405. parent_id int(10) unsigned NOT NULL DEFAULT '0',
  1406. qualificator_id int(10) unsigned NOT NULL DEFAULT '0',
  1407. weight float(6,2) unsigned NOT NULL DEFAULT '0.00',
  1408. session_id int(10) unsigned NOT NULL DEFAULT '0',
  1409. user_id int(11) NOT NULL,
  1410. allow_text_assignment int(11) NOT NULL DEFAULT '0',
  1411. contains_file int(11) NOT NULL DEFAULT '0',
  1412. PRIMARY KEY (c_id,id),
  1413. KEY session_id (session_id)
  1414. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1415. /*!40101 SET character_set_client = @saved_cs_client */;
  1416. --
  1417. -- Table structure for table c_student_publication_assignment
  1418. --
  1419. DROP TABLE IF EXISTS c_student_publication_assignment;
  1420. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1421. /*!40101 SET character_set_client = utf8 */;
  1422. CREATE TABLE c_student_publication_assignment (
  1423. c_id int(11) NOT NULL,
  1424. id int(11) NOT NULL AUTO_INCREMENT,
  1425. expires_on datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1426. ends_on datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1427. add_to_calendar tinyint(4) NOT NULL,
  1428. enable_qualification tinyint(4) NOT NULL,
  1429. publication_id int(11) NOT NULL,
  1430. PRIMARY KEY (c_id,id)
  1431. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1432. /*!40101 SET character_set_client = @saved_cs_client */;
  1433. --
  1434. -- Table structure for table c_survey
  1435. --
  1436. DROP TABLE IF EXISTS c_survey;
  1437. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1438. /*!40101 SET character_set_client = utf8 */;
  1439. CREATE TABLE c_survey (
  1440. c_id int(11) NOT NULL,
  1441. survey_id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1442. code varchar(20) DEFAULT NULL,
  1443. title text,
  1444. subtitle text,
  1445. author varchar(20) DEFAULT NULL,
  1446. lang varchar(20) DEFAULT NULL,
  1447. avail_from date DEFAULT NULL,
  1448. avail_till date DEFAULT NULL,
  1449. is_shared char(1) DEFAULT '1',
  1450. template varchar(20) DEFAULT NULL,
  1451. intro text,
  1452. surveythanks text,
  1453. creation_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1454. invited int(11) NOT NULL,
  1455. answered int(11) NOT NULL,
  1456. invite_mail text NOT NULL,
  1457. reminder_mail text NOT NULL,
  1458. mail_subject varchar(255) NOT NULL,
  1459. anonymous enum('0','1') NOT NULL DEFAULT '0',
  1460. access_condition text,
  1461. shuffle tinyint(1) NOT NULL DEFAULT '0',
  1462. one_question_per_page tinyint(1) NOT NULL DEFAULT '0',
  1463. survey_version varchar(255) NOT NULL DEFAULT '',
  1464. parent_id int(10) unsigned NOT NULL,
  1465. survey_type int(11) NOT NULL DEFAULT '0',
  1466. show_form_profile int(11) NOT NULL DEFAULT '0',
  1467. form_fields text NOT NULL,
  1468. session_id int(10) unsigned NOT NULL DEFAULT '0',
  1469. PRIMARY KEY (c_id,survey_id),
  1470. KEY session_id (session_id)
  1471. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1472. /*!40101 SET character_set_client = @saved_cs_client */;
  1473. --
  1474. -- Table structure for table c_survey_answer
  1475. --
  1476. DROP TABLE IF EXISTS c_survey_answer;
  1477. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1478. /*!40101 SET character_set_client = utf8 */;
  1479. CREATE TABLE c_survey_answer (
  1480. c_id int(11) NOT NULL,
  1481. answer_id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1482. survey_id int(10) unsigned NOT NULL,
  1483. question_id int(10) unsigned NOT NULL,
  1484. option_id text NOT NULL,
  1485. value int(10) unsigned NOT NULL,
  1486. user varchar(250) NOT NULL,
  1487. PRIMARY KEY (c_id,answer_id)
  1488. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1489. /*!40101 SET character_set_client = @saved_cs_client */;
  1490. --
  1491. -- Table structure for table c_survey_group
  1492. --
  1493. DROP TABLE IF EXISTS c_survey_group;
  1494. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1495. /*!40101 SET character_set_client = utf8 */;
  1496. CREATE TABLE c_survey_group (
  1497. c_id int(11) NOT NULL,
  1498. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1499. name varchar(20) NOT NULL,
  1500. description varchar(255) NOT NULL,
  1501. survey_id int(10) unsigned NOT NULL,
  1502. PRIMARY KEY (c_id,id)
  1503. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1504. /*!40101 SET character_set_client = @saved_cs_client */;
  1505. --
  1506. -- Table structure for table c_survey_invitation
  1507. --
  1508. DROP TABLE IF EXISTS c_survey_invitation;
  1509. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1510. /*!40101 SET character_set_client = utf8 */;
  1511. CREATE TABLE c_survey_invitation (
  1512. c_id int(11) NOT NULL,
  1513. survey_invitation_id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1514. survey_code varchar(20) NOT NULL,
  1515. user varchar(250) NOT NULL,
  1516. invitation_code varchar(250) NOT NULL,
  1517. invitation_date datetime NOT NULL,
  1518. reminder_date datetime NOT NULL,
  1519. answered int(11) NOT NULL DEFAULT '0',
  1520. session_id int(10) unsigned NOT NULL DEFAULT '0',
  1521. group_id int(11) NOT NULL DEFAULT '0',
  1522. PRIMARY KEY (c_id,survey_invitation_id)
  1523. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1524. /*!40101 SET character_set_client = @saved_cs_client */;
  1525. --
  1526. -- Table structure for table c_survey_question
  1527. --
  1528. DROP TABLE IF EXISTS c_survey_question;
  1529. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1530. /*!40101 SET character_set_client = utf8 */;
  1531. CREATE TABLE c_survey_question (
  1532. c_id int(11) NOT NULL,
  1533. question_id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1534. survey_id int(10) unsigned NOT NULL,
  1535. survey_question text NOT NULL,
  1536. survey_question_comment text NOT NULL,
  1537. type varchar(250) NOT NULL,
  1538. display varchar(10) NOT NULL,
  1539. sort int(11) NOT NULL,
  1540. shared_question_id int(11) DEFAULT NULL,
  1541. max_value int(11) DEFAULT NULL,
  1542. survey_group_pri int(10) unsigned NOT NULL DEFAULT '0',
  1543. survey_group_sec1 int(10) unsigned NOT NULL DEFAULT '0',
  1544. survey_group_sec2 int(10) unsigned NOT NULL DEFAULT '0',
  1545. PRIMARY KEY (c_id,question_id)
  1546. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1547. /*!40101 SET character_set_client = @saved_cs_client */;
  1548. --
  1549. -- Table structure for table c_survey_question_option
  1550. --
  1551. DROP TABLE IF EXISTS c_survey_question_option;
  1552. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1553. /*!40101 SET character_set_client = utf8 */;
  1554. CREATE TABLE c_survey_question_option (
  1555. c_id int(11) NOT NULL,
  1556. question_option_id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1557. question_id int(10) unsigned NOT NULL,
  1558. survey_id int(10) unsigned NOT NULL,
  1559. option_text text NOT NULL,
  1560. sort int(11) NOT NULL,
  1561. value int(11) NOT NULL DEFAULT '0',
  1562. PRIMARY KEY (c_id,question_option_id)
  1563. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1564. /*!40101 SET character_set_client = @saved_cs_client */;
  1565. --
  1566. -- Table structure for table c_thematic
  1567. --
  1568. DROP TABLE IF EXISTS c_thematic;
  1569. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1570. /*!40101 SET character_set_client = utf8 */;
  1571. CREATE TABLE c_thematic (
  1572. c_id int(11) NOT NULL,
  1573. id int(11) NOT NULL AUTO_INCREMENT,
  1574. title varchar(255) NOT NULL,
  1575. content text,
  1576. display_order int(10) unsigned NOT NULL DEFAULT '0',
  1577. active tinyint(4) NOT NULL DEFAULT '0',
  1578. session_id int(11) NOT NULL DEFAULT '0',
  1579. PRIMARY KEY (c_id,id),
  1580. KEY active (active,session_id)
  1581. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1582. /*!40101 SET character_set_client = @saved_cs_client */;
  1583. --
  1584. -- Table structure for table c_thematic_advance
  1585. --
  1586. DROP TABLE IF EXISTS c_thematic_advance;
  1587. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1588. /*!40101 SET character_set_client = utf8 */;
  1589. CREATE TABLE c_thematic_advance (
  1590. c_id int(11) NOT NULL,
  1591. id int(11) NOT NULL AUTO_INCREMENT,
  1592. thematic_id int(11) NOT NULL,
  1593. attendance_id int(11) NOT NULL DEFAULT '0',
  1594. content text,
  1595. start_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1596. duration int(11) NOT NULL DEFAULT '0',
  1597. done_advance tinyint(4) NOT NULL DEFAULT '0',
  1598. PRIMARY KEY (c_id,id),
  1599. KEY thematic_id (thematic_id)
  1600. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1601. /*!40101 SET character_set_client = @saved_cs_client */;
  1602. --
  1603. -- Table structure for table c_thematic_plan
  1604. --
  1605. DROP TABLE IF EXISTS c_thematic_plan;
  1606. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1607. /*!40101 SET character_set_client = utf8 */;
  1608. CREATE TABLE c_thematic_plan (
  1609. c_id int(11) NOT NULL,
  1610. id int(11) NOT NULL AUTO_INCREMENT,
  1611. thematic_id int(11) NOT NULL,
  1612. title varchar(255) NOT NULL,
  1613. description text,
  1614. description_type int(11) NOT NULL,
  1615. PRIMARY KEY (c_id,id),
  1616. KEY thematic_id (thematic_id,description_type)
  1617. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1618. /*!40101 SET character_set_client = @saved_cs_client */;
  1619. --
  1620. -- Table structure for table c_tool
  1621. --
  1622. DROP TABLE IF EXISTS c_tool;
  1623. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1624. /*!40101 SET character_set_client = utf8 */;
  1625. CREATE TABLE c_tool (
  1626. c_id int(11) NOT NULL,
  1627. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1628. name varchar(255) NOT NULL,
  1629. link varchar(255) NOT NULL,
  1630. image varchar(255) DEFAULT NULL,
  1631. visibility tinyint(3) unsigned DEFAULT '0',
  1632. admin varchar(255) DEFAULT NULL,
  1633. address varchar(255) DEFAULT NULL,
  1634. added_tool tinyint(3) unsigned DEFAULT '1',
  1635. target enum('_self','_blank') NOT NULL DEFAULT '_self',
  1636. category varchar(20) NOT NULL DEFAULT 'authoring',
  1637. session_id int(11) DEFAULT '0',
  1638. PRIMARY KEY (c_id,id),
  1639. KEY session_id (session_id)
  1640. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1641. /*!40101 SET character_set_client = @saved_cs_client */;
  1642. --
  1643. -- Table structure for table c_tool_intro
  1644. --
  1645. DROP TABLE IF EXISTS c_tool_intro;
  1646. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1647. /*!40101 SET character_set_client = utf8 */;
  1648. CREATE TABLE c_tool_intro (
  1649. c_id int(11) NOT NULL,
  1650. id varchar(50) NOT NULL,
  1651. intro_text mediumtext NOT NULL,
  1652. session_id int(11) NOT NULL DEFAULT '0',
  1653. PRIMARY KEY (c_id,id,session_id)
  1654. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1655. /*!40101 SET character_set_client = @saved_cs_client */;
  1656. --
  1657. -- Table structure for table c_userinfo_content
  1658. --
  1659. DROP TABLE IF EXISTS c_userinfo_content;
  1660. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1661. /*!40101 SET character_set_client = utf8 */;
  1662. CREATE TABLE c_userinfo_content (
  1663. c_id int(11) NOT NULL,
  1664. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1665. user_id int(10) unsigned NOT NULL,
  1666. definition_id int(10) unsigned NOT NULL,
  1667. editor_ip varchar(39) DEFAULT NULL,
  1668. edition_time datetime DEFAULT NULL,
  1669. content text NOT NULL,
  1670. PRIMARY KEY (c_id,id),
  1671. KEY user_id (user_id)
  1672. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1673. /*!40101 SET character_set_client = @saved_cs_client */;
  1674. --
  1675. -- Table structure for table c_userinfo_def
  1676. --
  1677. DROP TABLE IF EXISTS c_userinfo_def;
  1678. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1679. /*!40101 SET character_set_client = utf8 */;
  1680. CREATE TABLE c_userinfo_def (
  1681. c_id int(11) NOT NULL,
  1682. id int(10) unsigned NOT NULL AUTO_INCREMENT,
  1683. title varchar(80) NOT NULL DEFAULT '',
  1684. comment text,
  1685. line_count tinyint(3) unsigned NOT NULL DEFAULT '5',
  1686. rank tinyint(3) unsigned NOT NULL DEFAULT '0',
  1687. PRIMARY KEY (c_id,id)
  1688. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1689. /*!40101 SET character_set_client = @saved_cs_client */;
  1690. --
  1691. -- Table structure for table c_wiki
  1692. --
  1693. DROP TABLE IF EXISTS c_wiki;
  1694. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1695. /*!40101 SET character_set_client = utf8 */;
  1696. CREATE TABLE c_wiki (
  1697. c_id int(11) NOT NULL,
  1698. id int(11) NOT NULL AUTO_INCREMENT,
  1699. page_id int(11) NOT NULL DEFAULT '0',
  1700. reflink varchar(255) NOT NULL DEFAULT 'index',
  1701. title varchar(255) NOT NULL,
  1702. content mediumtext NOT NULL,
  1703. user_id int(11) NOT NULL DEFAULT '0',
  1704. group_id int(11) DEFAULT NULL,
  1705. dtime datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1706. addlock int(11) NOT NULL DEFAULT '1',
  1707. editlock int(11) NOT NULL DEFAULT '0',
  1708. visibility int(11) NOT NULL DEFAULT '1',
  1709. addlock_disc int(11) NOT NULL DEFAULT '1',
  1710. visibility_disc int(11) NOT NULL DEFAULT '1',
  1711. ratinglock_disc int(11) NOT NULL DEFAULT '1',
  1712. assignment int(11) NOT NULL DEFAULT '0',
  1713. comment text NOT NULL,
  1714. progress text NOT NULL,
  1715. score int(11) DEFAULT '0',
  1716. version int(11) DEFAULT NULL,
  1717. is_editing int(11) NOT NULL DEFAULT '0',
  1718. time_edit datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1719. hits int(11) DEFAULT '0',
  1720. linksto text NOT NULL,
  1721. tag text NOT NULL,
  1722. user_ip varchar(39) NOT NULL,
  1723. session_id int(11) DEFAULT '0',
  1724. PRIMARY KEY (c_id,id),
  1725. KEY reflink (reflink),
  1726. KEY group_id (group_id),
  1727. KEY page_id (page_id),
  1728. KEY session_id (session_id)
  1729. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1730. /*!40101 SET character_set_client = @saved_cs_client */;
  1731. --
  1732. -- Table structure for table c_wiki_conf
  1733. --
  1734. DROP TABLE IF EXISTS c_wiki_conf;
  1735. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1736. /*!40101 SET character_set_client = utf8 */;
  1737. CREATE TABLE c_wiki_conf (
  1738. c_id int(11) NOT NULL,
  1739. page_id int(11) NOT NULL DEFAULT '0',
  1740. task text NOT NULL,
  1741. feedback1 text NOT NULL,
  1742. feedback2 text NOT NULL,
  1743. feedback3 text NOT NULL,
  1744. fprogress1 varchar(3) NOT NULL,
  1745. fprogress2 varchar(3) NOT NULL,
  1746. fprogress3 varchar(3) NOT NULL,
  1747. max_size int(11) DEFAULT NULL,
  1748. max_text int(11) DEFAULT NULL,
  1749. max_version int(11) DEFAULT NULL,
  1750. startdate_assig datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1751. enddate_assig datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1752. delayedsubmit int(11) NOT NULL DEFAULT '0',
  1753. PRIMARY KEY (c_id,page_id),
  1754. KEY page_id (page_id)
  1755. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1756. /*!40101 SET character_set_client = @saved_cs_client */;
  1757. --
  1758. -- Table structure for table c_wiki_discuss
  1759. --
  1760. DROP TABLE IF EXISTS c_wiki_discuss;
  1761. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1762. /*!40101 SET character_set_client = utf8 */;
  1763. CREATE TABLE c_wiki_discuss (
  1764. c_id int(11) NOT NULL,
  1765. id int(11) NOT NULL AUTO_INCREMENT,
  1766. publication_id int(11) NOT NULL DEFAULT '0',
  1767. userc_id int(11) NOT NULL DEFAULT '0',
  1768. comment text NOT NULL,
  1769. p_score varchar(255) DEFAULT NULL,
  1770. dtime datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  1771. PRIMARY KEY (c_id,id)
  1772. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1773. /*!40101 SET character_set_client = @saved_cs_client */;
  1774. --
  1775. -- Table structure for table c_wiki_mailcue
  1776. --
  1777. DROP TABLE IF EXISTS c_wiki_mailcue;
  1778. /*!40101 SET @saved_cs_client = @@character_set_client */;
  1779. /*!40101 SET character_set_client = utf8 */;
  1780. CREATE TABLE c_wiki_mailcue (
  1781. c_id int(11) NOT NULL,
  1782. id int(11) NOT NULL,
  1783. user_id int(11) NOT NULL,
  1784. type text NOT NULL,
  1785. group_id int(11) DEFAULT NULL,
  1786. session_id int(11) DEFAULT '0',
  1787. PRIMARY KEY (c_id,id,user_id),
  1788. KEY c_id (c_id,id)
  1789. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  1790. /*!40101 SET character_set_client = @saved_cs_client */;