1
0

upgrade_files.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * This file keeps track of upgrades to the lams module.
  4. *
  5. * Sometimes, changes between versions involve
  6. * alterations to database structures and other
  7. * major things that may break installations.
  8. * The upgrade function in this file will attempt
  9. * to perform all the necessary actions to upgrade
  10. * your older installtion to the current version.
  11. * If there's something it cannot do itself, it
  12. * will tell you what you need to do.
  13. * The commands in here will all be database-neutral,
  14. * using the functions defined in lib/ddllib.php
  15. *
  16. * - v 1.4 2013/09/19
  17. * + Insert general fields for iassign statement (grade, timeavaliable, timedue, preventlate, test, max_experiment).
  18. * + Change index field 'name' in 'iassign_ilm' table to index field 'name,version'.
  19. * - v 1.2 2013/08/30
  20. * + Change 'filearea' for new concept for files.
  21. * + Change path file for ilm, consider version in pathname.
  22. *
  23. * @author Patricia Alves Rodrigues
  24. * @author Leônidas O. Brandão
  25. * @version v 1.4 2013/09/19
  26. * @package mod_iassign_db
  27. * @since 2010/12/21
  28. * @copyright iMath (http://www.matematica.br) and LInE (http://line.ime.usp.br) - Computer Science Dep. of IME-USP (Brazil)
  29. *
  30. * <b>License</b>
  31. * - http://opensource.org/licenses/gpl-license.php GNU Public License
  32. *
  33. * @param $oldversion Number of the old version.
  34. */
  35. require_once ("../../config.php");
  36. echo "TODO: upgrade_files.php: not in use...<br/>\n";
  37. global $CFG, $DB, $USER;
  38. $DB->delete_records('iassign_ilm',array('id'=>'8'));
  39. $ilm_files = $DB->get_records('iassign_ilm');
  40. echo "<pre>";
  41. print_r($ilm_files);
  42. echo "</pre>";
  43. //foreach ($ilm_files as $ilm_file) {
  44. // //$tmp = explode (".",$ilm_file->name);
  45. // $ilm_file->file_jar=$ilm_file->name.".jar";
  46. // echo $ilm_file->file_jar."</br>";
  47. // $DB->update_record('iassign_ilm', $ilm_file);
  48. // }
  49. ?>