1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558
|
DELIMITER $
CONNECT claroline1
DROP PROCEDURE crea_table$
CREATE PROCEDURE crea_table()
BEGIN
DECLARE code VARCHAR (40);
DECLARE done INT DEFAULT 0;
DECLARE curseur_db CURSOR FOR SELECT code FROM cl_cours;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
OPEN curseur_db;
REPEAT
FETCH curseur_db INTO code;
IF NOT done THEN
/* Pour chaque cours, on récupère le code du cours et on crée les nouvelles 48 nouvelles tables pour ce cours */
SET @requete_crea_table = CONCAT
(
'CREATE TABLE IF NOT EXISTS c_' , code , '_announcement (
id mediumint(11) NOT NULL AUTO_INCREMENT,
title varchar(80) DEFAULT NULL,
contenu text,
temps date DEFAULT NULL,
ordre mediumint(11) NOT NULL DEFAULT \'0\',
visibility enum(\'SHOW\',\'HIDE\') NOT NULL DEFAULT \'SHOW\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'announcements table\' AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_categories (
cat_id int(10) NOT NULL AUTO_INCREMENT,
cat_title varchar(100) DEFAULT NULL,
cat_order int(10) DEFAULT NULL,
PRIMARY KEY (cat_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
INSERT INTO c_' , code , '_bb_categories (cat_id, cat_title, cat_order) VALUES
(2, \'Général\', 1),
(1, \'Forums des Groupes\', 2);
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_forums (
forum_id int(10) NOT NULL AUTO_INCREMENT,
group_id int(11) DEFAULT NULL,
forum_name varchar(150) DEFAULT NULL,
forum_desc text,
forum_access int(10) DEFAULT \'1\',
forum_moderator int(10) DEFAULT NULL,
forum_topics int(10) NOT NULL DEFAULT \'0\',
forum_posts int(10) NOT NULL DEFAULT \'0\',
forum_last_post_id int(10) NOT NULL DEFAULT \'0\',
cat_id int(10) DEFAULT NULL,
forum_type int(10) DEFAULT \'0\',
forum_order int(10) DEFAULT \'0\',
PRIMARY KEY (forum_id),
KEY forum_last_post_id (forum_last_post_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
INSERT INTO c_' , code , '_bb_forums (forum_id, group_id, forum_name, forum_desc, forum_access, forum_moderator, forum_topics, forum_posts, forum_last_post_id, cat_id, forum_type, forum_order) VALUES
(1, NULL, \'Exemple de forum\', \'Peut être supprimer via l\'\'administration des forums\', 2, 1, 1, 1, 1, 2, 0, 1);
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_posts (
post_id int(10) NOT NULL AUTO_INCREMENT,
topic_id int(10) NOT NULL DEFAULT \'0\',
forum_id int(10) NOT NULL DEFAULT \'0\',
poster_id int(10) NOT NULL DEFAULT \'0\',
post_time varchar(20) DEFAULT NULL,
poster_ip varchar(16) DEFAULT NULL,
nom varchar(30) DEFAULT NULL,
prenom varchar(30) DEFAULT NULL,
PRIMARY KEY (post_id),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY poster_id (poster_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_posts_text (
post_id int(10) NOT NULL DEFAULT \'0\',
post_text text,
PRIMARY KEY (post_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_priv_msgs (
msg_id int(10) NOT NULL AUTO_INCREMENT,
from_userid int(10) NOT NULL DEFAULT \'0\',
to_userid int(10) NOT NULL DEFAULT \'0\',
msg_time varchar(20) DEFAULT NULL,
poster_ip varchar(16) DEFAULT NULL,
msg_status int(10) DEFAULT \'0\',
msg_text text,
PRIMARY KEY (msg_id),
KEY to_userid (to_userid)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_rel_forum_userstonotify (
notify_id int(10) NOT NULL AUTO_INCREMENT,
user_id int(10) NOT NULL DEFAULT \'0\',
forum_id int(10) NOT NULL DEFAULT \'0\',
PRIMARY KEY (notify_id),
KEY SECONDARY (user_id,forum_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_rel_topic_userstonotify (
notify_id int(10) NOT NULL AUTO_INCREMENT,
user_id int(10) NOT NULL DEFAULT \'0\',
topic_id int(10) NOT NULL DEFAULT \'0\',
PRIMARY KEY (notify_id),
KEY SECONDARY (user_id,topic_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_' , code , '_bb_topics (
topic_id int(10) NOT NULL AUTO_INCREMENT,
topic_title varchar(100) DEFAULT NULL,
topic_poster int(10) DEFAULT NULL,
topic_time varchar(20) DEFAULT NULL,
topic_views int(10) NOT NULL DEFAULT \'0\',
topic_replies int(10) NOT NULL DEFAULT \'0\',
topic_last_post_id int(10) NOT NULL DEFAULT \'0\',
forum_id int(10) NOT NULL DEFAULT \'0\',
topic_status int(10) NOT NULL DEFAULT \'0\',
topic_notify int(2) DEFAULT \'0\',
nom varchar(30) DEFAULT NULL,
prenom varchar(30) DEFAULT NULL,
PRIMARY KEY (topic_id),
KEY forum_id (forum_id),
KEY topic_last_post_id (topic_last_post_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_bb_users (
user_id int(10) NOT NULL AUTO_INCREMENT,
username varchar(40) NOT NULL,
user_regdate varchar(20) NOT NULL,
user_password varchar(32) NOT NULL,
user_email varchar(50) DEFAULT NULL,
user_icq varchar(15) DEFAULT NULL,
user_website varchar(100) DEFAULT NULL,
user_occ varchar(100) DEFAULT NULL,
user_from varchar(100) DEFAULT NULL,
user_intrest varchar(150) DEFAULT NULL,
user_sig varchar(255) DEFAULT NULL,
user_viewemail tinyint(2) DEFAULT NULL,
user_theme int(10) DEFAULT NULL,
user_aim varchar(18) DEFAULT NULL,
user_yim varchar(25) DEFAULT NULL,
user_msnm varchar(25) DEFAULT NULL,
user_posts int(10) DEFAULT \'0\',
user_attachsig int(2) DEFAULT \'0\',
user_desmile int(2) DEFAULT \'0\',
user_html int(2) DEFAULT \'0\',
user_bbcode int(2) DEFAULT \'0\',
user_rank int(10) DEFAULT \'0\',
user_level int(10) DEFAULT \'1\',
user_lang varchar(255) DEFAULT NULL,
user_actkey varchar(32) DEFAULT NULL,
user_newpasswd varchar(32) DEFAULT NULL,
PRIMARY KEY (user_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_bb_whosonline (
id int(3) NOT NULL AUTO_INCREMENT,
ip varchar(255) DEFAULT NULL,
name varchar(255) DEFAULT NULL,
count varchar(255) DEFAULT NULL,
date varchar(255) DEFAULT NULL,
username varchar(40) DEFAULT NULL,
forum int(10) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_calendar_event (
id int(11) NOT NULL AUTO_INCREMENT,
titre varchar(200) DEFAULT NULL,
contenu text,
day date NOT NULL DEFAULT \'0000-00-00\',
hour time NOT NULL DEFAULT \'00:00:00\',
lasting varchar(20) DEFAULT NULL,
visibility enum(\'SHOW\',\'HIDE\') NOT NULL DEFAULT \'SHOW\',
location varchar(50) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_chat (
id int(11) NOT NULL AUTO_INCREMENT,
user_id int(11) NOT NULL DEFAULT \'0\',
group_id int(11) DEFAULT NULL,
message text,
post_time datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_chat_users (
id int(11) NOT NULL AUTO_INCREMENT,
user_id int(11) NOT NULL DEFAULT \'0\',
group_id int(11) DEFAULT NULL,
last_action datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_course_description (
id int(11) NOT NULL AUTO_INCREMENT,
category int(11) NOT NULL DEFAULT \'-1\',
title varchar(255) DEFAULT NULL,
content text,
lastEditDate datetime NOT NULL,
visibility enum(\'VISIBLE\',\'INVISIBLE\') NOT NULL DEFAULT \'VISIBLE\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_course_properties (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL DEFAULT \'\',
value varchar(255) DEFAULT NULL,
category varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
INSERT INTO c_', code ,'_course_properties (id, name, value, category) VALUES
(1, \'self_registration\', \'0\', \'GROUP\'),
(2, \'nbGroupPerUser\', NULL, \'GROUP\'),
(3, \'private\', \'1\', \'GROUP\'),
(4, \'CLDOC\', \'1\', \'GROUP\'),
(5, \'CLFRM\', \'1\', \'GROUP\'),
(6, \'CLWIKI\', \'1\', \'GROUP\'),
(7, \'CLCHAT\', \'1\', \'GROUP\');
CREATE TABLE IF NOT EXISTS c_', code ,'_document (
id int(4) NOT NULL AUTO_INCREMENT,
path varchar(255) NOT NULL,
visibility char(1) NOT NULL DEFAULT \'v\',
comment varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_group_rel_team_user (
id int(11) NOT NULL AUTO_INCREMENT,
user int(11) NOT NULL DEFAULT \'0\',
team int(11) NOT NULL DEFAULT \'0\',
status int(11) NOT NULL DEFAULT \'0\',
role varchar(50) NOT NULL DEFAULT \'\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_group_team (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) DEFAULT NULL,
description text,
tutor int(11) DEFAULT NULL,
maxStudent int(11) DEFAULT \'0\',
secretDirectory varchar(30) NOT NULL DEFAULT \'0\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_lnk_links (
id int(11) NOT NULL AUTO_INCREMENT,
src_id int(11) NOT NULL DEFAULT \'0\',
dest_id int(11) NOT NULL DEFAULT \'0\',
creation_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_lnk_resources (
id int(11) NOT NULL AUTO_INCREMENT,
crl text NOT NULL,
title text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_lp_asset (
asset_id int(11) NOT NULL AUTO_INCREMENT,
module_id int(11) NOT NULL DEFAULT \'0\',
path varchar(255) NOT NULL DEFAULT \'\',
comment varchar(255) DEFAULT NULL,
PRIMARY KEY (asset_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'List of resources of module of learning paths\' AUTO_INCREMENT=3 ;
INSERT INTO c_', code ,'_lp_asset (asset_id, module_id, path, comment) VALUES
(1, 1, \'/Example_document.pdf\', \'\'),
(2, 2, \'1\', \'\');
CREATE TABLE IF NOT EXISTS c_', code ,'_lp_learnpath (
learnPath_id int(11) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL DEFAULT \'\',
comment text NOT NULL,
lock enum(\'OPEN\',\'CLOSE\') NOT NULL DEFAULT \'OPEN\',
visibility enum(\'HIDE\',\'SHOW\') NOT NULL DEFAULT \'SHOW\',
rank int(11) NOT NULL DEFAULT \'0\',
PRIMARY KEY (learnPath_id),
UNIQUE KEY rank (rank)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'List of learning Paths\' AUTO_INCREMENT=3 ;
INSERT INTO c_', code ,'_lp_learnpath (learnPath_id, name, comment, lock, visibility, rank) VALUES
(1, \'Exemple de parcours pédagogique\', \'Ceci est un exemple de parcours pédagogique. Il utilise l\'\'exemple d\'\'exercice et l\'\'exemple de document des outils Exercices et Documents et liens. Cliquez sur <b>Modifier</b> pour changer ce texte.\', \'OPEN\', \'SHOW\', 1),
(2, \'Parcours Test\', \'Parcours pédagogique Test\', \'OPEN\', \'SHOW\', 2);
CREATE TABLE IF NOT EXISTS c_', code ,'_lp_module (
module_id int(11) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL DEFAULT \'\',
comment text NOT NULL,
accessibility enum(\'PRIVATE\',\'PUBLIC\') NOT NULL DEFAULT \'PRIVATE\',
startAsset_id int(11) NOT NULL DEFAULT \'0\',
contentType enum(\'CLARODOC\',\'DOCUMENT\',\'EXERCISE\',\'HANDMADE\',\'SCORM\',\'LABEL\') NOT NULL,
launch_data text NOT NULL,
PRIMARY KEY (module_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'List of available modules used in learning paths\' AUTO_INCREMENT=3 ;
INSERT INTO c_', code ,'_lp_module (module_id, name, comment, accessibility, startAsset_id, contentType, launch_data) VALUES
(1, \'Exemple de document\', \'Vous pouvez utiliser n\'\'importe quel document de l\'\'outil Documents et liens de ce cours.\', \'PRIVATE\', 1, \'DOCUMENT\', \'\'),
(2, \'Exemple d\'\'exercice\', \'Vous pouvez utiliser n\'\'importe quel exercice de l\'\'outil Exercices de ce cours.\', \'PRIVATE\', 2, \'EXERCISE\', \'\');
CREATE TABLE IF NOT EXISTS c_', code ,'_lp_rel_learnpath_module (
learnPath_module_id int(11) NOT NULL AUTO_INCREMENT,
learnPath_id int(11) NOT NULL DEFAULT \'0\',
module_id int(11) NOT NULL DEFAULT \'0\',
lock enum(\'OPEN\',\'CLOSE\') NOT NULL DEFAULT \'OPEN\',
visibility enum(\'HIDE\',\'SHOW\') NOT NULL DEFAULT \'SHOW\',
specificComment text NOT NULL,
rank int(11) NOT NULL DEFAULT \'0\',
parent int(11) NOT NULL DEFAULT \'0\',
raw_to_pass tinyint(4) NOT NULL DEFAULT \'50\',
PRIMARY KEY (learnPath_module_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'This table links module to the learning path using them\' AUTO_INCREMENT=3 ;
INSERT INTO c_', code ,'_lp_rel_learnpath_module (learnPath_module_id, learnPath_id, module_id, lock, visibility, specificComment, rank, parent, raw_to_pass) VALUES
(1, 1, 1, \'OPEN\', \'SHOW\', \'\', 1, 0, 50),
(2, 1, 2, \'OPEN\', \'SHOW\', \'\', 2, 0, 50);
CREATE TABLE IF NOT EXISTS c_', code ,'_lp_user_module_progress (
user_module_progress_id int(22) NOT NULL AUTO_INCREMENT,
user_id mediumint(9) NOT NULL DEFAULT \'0\',
learnPath_module_id int(11) NOT NULL DEFAULT \'0\',
learnPath_id int(11) NOT NULL DEFAULT \'0\',
lesson_location varchar(255) NOT NULL DEFAULT \'\',
lesson_status enum(\'NOT ATTEMPTED\',\'PASSED\',\'FAILED\',\'COMPLETED\',\'BROWSED\',\'INCOMPLETE\',\'UNKNOWN\') NOT NULL DEFAULT \'NOT ATTEMPTED\',
entry enum(\'AB-INITIO\',\'RESUME\',\'\') NOT NULL DEFAULT \'AB-INITIO\',
raw tinyint(4) NOT NULL DEFAULT \'-1\',
scoreMin tinyint(4) NOT NULL DEFAULT \'-1\',
scoreMax tinyint(4) NOT NULL DEFAULT \'-1\',
total_time varchar(13) NOT NULL DEFAULT \'0000:00:00.00\',
session_time varchar(13) NOT NULL DEFAULT \'0000:00:00.00\',
suspend_data text NOT NULL,
credit enum(\'CREDIT\',\'NO-CREDIT\') NOT NULL DEFAULT \'NO-CREDIT\',
PRIMARY KEY (user_module_progress_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'Record the last known status of the user in the course\' AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_answer_fib (
id int(11) NOT NULL AUTO_INCREMENT,
questionId int(11) NOT NULL,
answer text NOT NULL,
gradeList text NOT NULL,
wrongAnswerList text NOT NULL,
type tinyint(4) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_answer_matching (
id int(11) NOT NULL AUTO_INCREMENT,
questionId int(11) NOT NULL,
answer text NOT NULL,
match varchar(32) DEFAULT NULL,
grade float NOT NULL DEFAULT \'0\',
code varchar(32) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_answer_multiple_choice (
id int(11) NOT NULL AUTO_INCREMENT,
questionId int(11) NOT NULL,
answer text NOT NULL,
correct tinyint(4) NOT NULL,
grade float NOT NULL,
comment text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
INSERT INTO c_', code ,'_qwz_answer_multiple_choice (id, questionId, answer, correct, grade, comment) VALUES
(1, 1, \'Ridiculiser son interlocuteur pour lui faire admettre son erreur.\', 0, -5, \'Non. L\'\'ironie socratique ne se joue pas sur le terrain de la psychologie mais sur celui de l\'\'argumentation.\'),
(2, 1, \'Reconnaître ses erreurs pour inviter son interlocuteur à faire de même.\', 0, -5, \'Non. Il ne s\'\'agit pas d\'\'une stratégie de séduction ou d\'\'une méthode par l\'\'exemple.\'),
(3, 1, \'Contraindre son interlocuteur, par une série de questions et de sous-questions, à reconnaître qu\'\'il ne connaît pas ce qu\'\'il prétend connaître.\', 1, 5, \'En effet. L\'\'ironie socratique est une méthode interrogative. Le grec "eirotao" signifie d\'\'ailleurs "interroger".\'),
(4, 1, \'Utiliser le principe de non-contradiction pour amener son interlocuteur dans l\'\'impasse.\', 1, 5, \'Cette réponse n\'\'est pas fausse. Il est exact que la mise en évidence de l\'\'ignorance de l\'\'interlocuteur se fait en soulignant les contradictions auxquelles aboutissent ses thèses.\');
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_answer_truefalse (
id int(11) NOT NULL AUTO_INCREMENT,
questionId int(11) NOT NULL,
trueFeedback text NOT NULL,
trueGrade float NOT NULL,
falseFeedback text NOT NULL,
falseGrade float NOT NULL,
correctAnswer enum(\'TRUE\',\'FALSE\') NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_exercise (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL,
description text NOT NULL,
visibility enum(\'VISIBLE\',\'INVISIBLE\') NOT NULL DEFAULT \'INVISIBLE\',
displayType enum(\'SEQUENTIAL\',\'ONEPAGE\') NOT NULL DEFAULT \'ONEPAGE\',
shuffle smallint(6) NOT NULL DEFAULT \'0\',
useSameShuffle enum(\'0\',\'1\') NOT NULL DEFAULT \'0\',
showAnswers enum(\'ALWAYS\',\'NEVER\',\'LASTTRY\') NOT NULL DEFAULT \'ALWAYS\',
startDate datetime NOT NULL,
endDate datetime NOT NULL,
timeLimit smallint(6) NOT NULL DEFAULT \'0\',
attempts tinyint(4) NOT NULL DEFAULT \'0\',
anonymousAttempts enum(\'ALLOWED\',\'NOTALLOWED\') NOT NULL DEFAULT \'NOTALLOWED\',
quizEndMessage text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
INSERT INTO c_', code ,'_qwz_exercise (id, title, description, visibility, displayType, shuffle, useSameShuffle, showAnswers, startDate, endDate, timeLimit, attempts, anonymousAttempts, quizEndMessage) VALUES
(1, \'Exemple d\'\'exercice\', \'Histoire de la philosophie antique\', \'INVISIBLE\', \'ONEPAGE\', 0, \'0\', \'ALWAYS\', \'2010-01-07 16:18:53\', \'2011-01-07 16:18:53\', 0, 0, \'NOTALLOWED\', \'\');
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_question (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL DEFAULT \'\',
description text NOT NULL,
attachment varchar(255) NOT NULL DEFAULT \'\',
type enum(\'MCUA\',\'MCMA\',\'TF\',\'FIB\',\'MATCHING\') NOT NULL DEFAULT \'MCUA\',
grade float NOT NULL DEFAULT \'0\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
INSERT INTO c_', code ,'_qwz_question (id, title, description, attachment, type, grade) VALUES
(1, \'L\'\'ironie socratique consiste à...\', \'(plusieurs bonnes réponses possibles)\', \'\', \'MCMA\', 10);
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_rel_exercise_question (
exerciseId int(11) NOT NULL,
questionId int(11) NOT NULL,
rank int(11) NOT NULL DEFAULT \'0\'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO c_', code ,'_qwz_rel_exercise_question (exerciseId, questionId, rank) VALUES
(1, 1, 1);
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_tracking (
id int(11) NOT NULL AUTO_INCREMENT,
user_id int(10) DEFAULT NULL,
date datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
exo_id int(11) NOT NULL DEFAULT \'0\',
result float NOT NULL DEFAULT \'0\',
time mediumint(8) NOT NULL DEFAULT \'0\',
weighting float NOT NULL DEFAULT \'0\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'Record informations about exercices\' AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_tracking_answers (
id int(11) NOT NULL AUTO_INCREMENT,
details_id int(11) NOT NULL DEFAULT \'0\',
answer text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_tracking_questions (
id int(11) NOT NULL AUTO_INCREMENT,
exercise_track_id int(11) NOT NULL DEFAULT \'0\',
question_id int(11) NOT NULL DEFAULT \'0\',
result float NOT NULL DEFAULT \'0\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'Record answers of students in exercices\' AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_qwz_users_random_questions (
id int(11) NOT NULL AUTO_INCREMENT,
user_id int(11) NOT NULL,
exercise_id int(11) NOT NULL,
questions text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_tool_intro (
id int(11) NOT NULL AUTO_INCREMENT,
tool_id int(11) NOT NULL DEFAULT \'0\',
title varchar(255) DEFAULT NULL,
display_date datetime DEFAULT NULL,
content text,
rank int(11) DEFAULT \'1\',
visibility enum(\'SHOW\',\'HIDE\') NOT NULL DEFAULT \'SHOW\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_tool_list (
id int(11) NOT NULL AUTO_INCREMENT,
tool_id int(10) unsigned DEFAULT NULL,
rank int(10) unsigned NOT NULL,
visibility tinyint(4) DEFAULT \'0\',
script_url varchar(255) DEFAULT NULL,
script_name varchar(255) DEFAULT NULL,
addedTool enum(\'YES\',\'NO\') DEFAULT \'YES\',
activated enum(\'true\',\'false\') NOT NULL DEFAULT \'true\',
installed enum(\'true\',\'false\') NOT NULL DEFAULT \'true\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;
INSERT INTO c_', code ,'_tool_list (id, tool_id, rank, visibility, script_url, script_name, addedTool, activated, installed) VALUES
(1, 1, 1, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(2, 2, 2, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(3, 3, 3, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(4, 4, 4, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(5, 5, 5, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(6, 6, 6, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(7, 7, 7, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(8, 8, 8, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(9, 9, 9, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(10, 10, 10, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(11, 11, 11, 1, NULL, NULL, \'YES\', \'true\', \'true\'),
(12, 12, 12, 1, NULL, NULL, \'YES\', \'true\', \'true\');
CREATE TABLE IF NOT EXISTS c_', code ,'_tracking_event (
id int(11) NOT NULL AUTO_INCREMENT,
tool_id int(11) DEFAULT NULL,
user_id int(11) DEFAULT NULL,
group_id int(11) DEFAULT NULL,
date datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
type varchar(60) NOT NULL DEFAULT \'\',
data text NOT NULL,
PRIMARY KEY (id),
KEY tool (tool_id),
KEY user (user_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_userinfo_content (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
user_id mediumint(8) unsigned NOT NULL DEFAULT \'0\',
def_id int(10) unsigned NOT NULL DEFAULT \'0\',
ed_ip varchar(39) DEFAULT NULL,
ed_date datetime DEFAULT NULL,
content text,
PRIMARY KEY (id),
KEY user_id (user_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'content of users information\' AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_userinfo_def (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
title varchar(80) NOT NULL DEFAULT \'\',
comment varchar(160) DEFAULT NULL,
nbLine int(10) unsigned NOT NULL DEFAULT \'5\',
rank tinyint(3) unsigned NOT NULL DEFAULT \'0\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=\'categories definition for user information of a course\' AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_wiki_acls (
wiki_id int(11) unsigned NOT NULL DEFAULT \'0\',
flag varchar(255) NOT NULL DEFAULT \'\',
value enum(\'false\',\'true\') NOT NULL DEFAULT \'false\'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS c_', code ,'_wiki_pages (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
wiki_id int(11) unsigned NOT NULL DEFAULT \'0\',
owner_id int(11) unsigned NOT NULL DEFAULT \'0\',
title varchar(255) NOT NULL DEFAULT \'\',
ctime datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
last_version int(11) unsigned NOT NULL DEFAULT \'0\',
last_mtime datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_wiki_pages_content (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
pid int(11) unsigned NOT NULL DEFAULT \'0\',
editor_id int(11) NOT NULL DEFAULT \'0\',
mtime datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
content text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_wiki_properties (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL DEFAULT \'\',
description text,
group_id int(11) NOT NULL DEFAULT \'0\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_wrk_assignment (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(200) NOT NULL DEFAULT \'\',
description text NOT NULL,
visibility enum(\'VISIBLE\',\'INVISIBLE\') NOT NULL DEFAULT \'VISIBLE\',
def_submission_visibility enum(\'VISIBLE\',\'INVISIBLE\') NOT NULL DEFAULT \'VISIBLE\',
assignment_type enum(\'INDIVIDUAL\',\'GROUP\') NOT NULL DEFAULT \'INDIVIDUAL\',
authorized_content enum(\'TEXT\',\'FILE\',\'TEXTFILE\') NOT NULL DEFAULT \'FILE\',
allow_late_upload enum(\'YES\',\'NO\') NOT NULL DEFAULT \'YES\',
start_date datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
end_date datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
prefill_text text NOT NULL,
prefill_doc_path varchar(200) NOT NULL DEFAULT \'\',
prefill_submit enum(\'ENDDATE\',\'AFTERPOST\') NOT NULL DEFAULT \'ENDDATE\',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS c_', code ,'_wrk_submission (
id int(11) NOT NULL AUTO_INCREMENT,
assignment_id int(11) DEFAULT NULL,
parent_id int(11) DEFAULT NULL,
user_id int(11) DEFAULT NULL,
group_id int(11) DEFAULT NULL,
title varchar(200) NOT NULL DEFAULT \'\',
visibility enum(\'VISIBLE\',\'INVISIBLE\') DEFAULT \'VISIBLE\',
creation_date datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
last_edit_date datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\',
authors varchar(200) NOT NULL DEFAULT \'\',
submitted_text text NOT NULL,
submitted_doc_path varchar(200) NOT NULL DEFAULT \'\',
private_feedback text,
original_id int(11) DEFAULT NULL,
score smallint(3) DEFAULT NULL,
PRIMARY KEY (id),
KEY assigid (assignment_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;'
);
PREPARE statement1 FROM @requete_crea_table;
EXECUTE statement1;
DEALLOCATE PREPARE statement1;
END IF;
UNTIL done END REPEAT;
CLOSE curseur_db;
END;
$
DELIMITER ;
CALL crea_table; |
Partager