Setting course in order to be used in the script

skala
Julio Montoya 12 years ago
parent 9a12d38738
commit 499c7d276a
  1. 3
      main/document/create_document.php
  2. 2
      main/document/upload.php
  3. 4
      main/inc/lib/document.lib.php

@ -160,6 +160,7 @@ require_once api_get_path(SYS_CODE_PATH).'document/document.inc.php';
//I'm in the certification module?
$is_certificate_mode = false;
$_course = api_get_course_info();
if (isset($_REQUEST['certificate']) && $_REQUEST['certificate'] == 'true') {
$is_certificate_mode = true;
@ -753,4 +754,4 @@ if ($form->validate()) {
</div>
</div>';
Display :: display_footer();
}
}

@ -101,7 +101,7 @@ $(function () {
// Variables
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
$_course = api_get_course_info();
$courseDir = $_course['path'].'/document';
$sys_course_path = api_get_path(SYS_COURSE_PATH);
$base_work_dir = $sys_course_path.$courseDir;

@ -652,6 +652,10 @@ class DocumentManager
$to_group_id = intval($to_group_id);
if (empty($_course)) {
return false;
}
if ($can_see_invisible) {
//condition for the session
$session_id = api_get_session_id();

Loading…
Cancel
Save