upgrade_files.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. * @author Luciano Oliveira Borges
  26. * @version v 1.4 2013/09/19
  27. * @package mod_iassign_db
  28. * @since 2010/12/21
  29. * @copyright iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
  30. *
  31. * <b>License</b>
  32. * - http://opensource.org/licenses/gpl-license.php GNU Public License
  33. *
  34. * @param $oldversion Number of the old version.
  35. */
  36. require_once ("../../config.php");
  37. echo "aqui";
  38. global $CFG, $DB, $USER;
  39. $DB->delete_records('iassign_ilm',array('id'=>'8'));
  40. $ilm_files = $DB->get_records('iassign_ilm');
  41. echo "<pre>";
  42. print_r($ilm_files);
  43. echo "</pre>";
  44. //foreach ($ilm_files as $ilm_file) {
  45. // //$tmp = explode (".",$ilm_file->name);
  46. // $ilm_file->file_jar=$ilm_file->name.".jar";
  47. // echo $ilm_file->file_jar."</br>";
  48. // $DB->update_record('iassign_ilm', $ilm_file);
  49. //}
  50. ?>