if (version_compare($oldversion, '2.4', '<')) { updateInfo(-1, $langUpgCourse . " " . $row->code . " 2.4"); upgrade_course_index_php($row->code); upgrade_course_2_4($row->code, $row->id, $row->lang); } if (version_compare($oldversion, '2.5', '<')) { updateInfo(-1, $langUpgCourse . " " . $row->code . " 2.5"); upgrade_course_2_5($row->code, $row->lang); } if (version_compare($oldversion, '2.8', '<')) { updateInfo(-1, $langUpgCourse . " " . $row->code . " 2.8"); upgrade_course_2_8($row->code, $row->lang); } if (version_compare($oldversion, '2.9', '<')) { updateInfo(-1, $langUpgCourse . " " . $row->code . " 2.9"); upgrade_course_2_9($row->code, $row->lang); } if (version_compare($oldversion, '2.10', '<')) { updateInfo(-1, $langUpgCourse . " " . $row->code . " 2.10"); upgrade_course_2_10($row->code, $row->id); } if (version_compare($oldversion, '2.11', '<')) { updateInfo(-1, $langUpgCourse . " " . $row->code . " 2.10"); upgrade_course_2_11($row->code); } if (version_compare($oldversion, '3.0b2', '<')) { updateInfo(-1, $langUpgCourse . " " . $row->code . " 3.0"); upgrade_course_3_0($row->code, $row->id); } $i++; }
/** * @brief Upgrade course database * @param type $code * @param type $lang */ function upgrade_course($code, $lang) { upgrade_course_2_1_3($code); upgrade_course_2_2($code, $lang); upgrade_course_2_3($code); upgrade_course_2_4($code, $lang); upgrade_course_2_5($code, $lang); upgrade_course_2_8($code, $lang); upgrade_course_2_9($code, $lang); upgrade_course_2_10($code); upgrade_course_2_11($code); upgrade_course_3_0($code); Database::forget(); }