[system] / trunk / wwmoodle / wwassignment / db / mysql.php Repository:
ViewVC logotype

View of /trunk/wwmoodle/wwassignment/db/mysql.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4188 - (download) (as text) (annotate)
Thu Jun 29 16:12:01 2006 UTC (13 years, 7 months ago) by gage
File size: 823 byte(s)
Removed update code since I doubt that it will help in converting from wwmoodle to wwassignment.

    1 <?PHP
    2 
    3 function wwmoodleassignment_upgrade($oldversion) {
    4 /// This function does anything necessary to upgrade
    5 /// older versions to match current functionality
    6 
    7   global $CFG;
    8 
    9   if ($oldversion < 20060827) {
   10     // fix to handle course shortnames with spaces properly.
   11 /*    table_column('wwassignment_bridge', null, 'coursename', 'varchar', 15, '', '', 'not null', 'course'); */
   12 /*    // now properly update the table to have modified shortName */
   13 /*    $aRecords = get_records('wwassignment_bridge'); */
   14 /*    foreach( $aRecords as $oRecord ) { */
   15 /*      // get the short name: */
   16 /*      $oCourse = get_record('course', 'id', $oRecord->course); */
   17 /*      $oRecord->coursename = preg_replace("/[^a-zA-Z0-9]/", "", $oCourse->shortname); */
   18 /*      update_record('wwassignment_bridge', $oRecord); */
   19 /*    } */
   20   }
   21   return true;
   22 }
   23 
   24 ?>

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9