<?php  //$Id: mysql.php,v 1.3.2.1 2006/10/26 22:25:27 stronk7 Exp $

// THIS FILE IS DEPRECATED!  PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL 
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.

// MySQL commands for upgrading this question type

function qtype_multichoice_upgrade($oldversion=0) {
    global $CFG;
    $success = true;
    
    if ($success && $oldversion < 2006081900) {
        $success = $success && table_column('question_multichoice', '', 'correctfeedback', 'text', '', '', '');
        $success = $success && table_column('question_multichoice', '', 'partiallycorrectfeedback', 'text', '', '', '');
        $success = $success && table_column('question_multichoice', '', 'incorrectfeedback', 'text', '', '', '');
    }

    //////  DO NOT ADD NEW THINGS HERE!!  USE upgrade.php and the lib/ddllib.php functions.

    return $success;
}

?>
 /// Modification that worked
<?php  //$Id: mysql.php,v 1.3.2.1 2006/10/26 22:25:27 stronk7 Exp $

// THIS FILE IS DEPRECATED!  PLEASE DO NOT MAKE CHANGES TO IT!
//
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL 
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.

// MySQL commands for upgrading this question type

function qtype_multichoice_upgrade($oldversion=0) {
    global $CFG;
    $success = true;
    
    if ($success && $oldversion < 2006081900) {
        $success = $success && execute_sql(" ALTER TABLE {$CFG->prefix}question_multichoice ADD correctfeedback TEXT NOT NULL");
        $success = $success && execute_sql(" ALTER TABLE {$CFG->prefix}question_multichoice ADD partiallycorrectfeedback TEXT NOT NULL");
	  $success = $success && execute_sql(" ALTER TABLE {$CFG->prefix}question_multichoice ADD incorrectfeedback TEXT NOT NULL");
    }

    //////  DO NOT ADD NEW THINGS HERE!!  USE upgrade.php and the lib/ddllib.php functions.

    return $success;
}

?>

