quota.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This script displays info about the course disk use and quota:
  5. * how large (in megabytes) is the documents area of the course,
  6. * what is the maximum allowed for this course...
  7. *
  8. * @author Roan Embrechts
  9. * @package chamilo.document
  10. */
  11. /**
  12. * Code
  13. */
  14. // Name of the language file that needs to be included
  15. exit;
  16. $language_file = 'document';
  17. // Including the global dokeos file
  18. require_once '../inc/global.inc.php';
  19. // Including additional libraries
  20. require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
  21. require_once api_get_path(LIBRARY_PATH).'document.lib.php';
  22. // Some constants and variables
  23. $courseDir = $_course['path'].'/document';
  24. $maxFilledSpace = DEFAULT_DOCUMENT_QUOTA;
  25. // Breadcrumbs
  26. $interbreadcrumb[] = array('url' => 'document.php','name' => get_lang('ToolDocument'));
  27. // Title of the page
  28. $nameTools = get_lang('DocumentQuota');
  29. // Display the header
  30. Display::display_header($nameTools,'Doc');
  31. /* FUNCTIONS */
  32. // Actions
  33. echo '<div class="actions">';
  34. // link back to the documents overview
  35. echo '<a href="document.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'','32').'</a>';
  36. echo '</div>';
  37. // Getting the course quota
  38. $course_quota = DocumentManager::get_course_quota();
  39. // Setting the full path
  40. //$full_path = $baseWorkDir.$courseDir;
  41. // Calculating the total space
  42. $already_consumed_space = DocumentManager::documents_total_space($_course);
  43. // Displaying the quota
  44. DocumentManager::display_quota($course_quota, $already_consumed_space);
  45. // Display the footer
  46. Display::display_footer();