|
|
|
@ -579,6 +579,13 @@ switch ($action) { |
|
|
|
|
$title = get_lang('Untitled'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$documents_total_space = DocumentManager::documents_total_space(); |
|
|
|
|
$course_max_space = DocumentManager::get_course_quota(); |
|
|
|
|
$total_size = $filesize + $documents_total_space; |
|
|
|
|
if ($total_size > $course_max_space) { |
|
|
|
|
$error_message = get_lang('IsNotPosibleSaveTheDocument'); |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
$active = '1'; |
|
|
|
|
$sql_add_publication = "INSERT INTO " . $work_table . " SET |
|
|
|
|
c_id = $course_id , |
|
|
|
@ -597,6 +604,8 @@ switch ($action) { |
|
|
|
|
//var_dump($sql_add_publication);exit; |
|
|
|
|
Database::query($sql_add_publication); |
|
|
|
|
$id = Database::insert_id(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($id) { |
|
|
|
|
api_item_property_update($course_info, 'work', $id, 'DocumentAdded', $user_id, api_get_group_id()); |
|
|
|
|
/* |
|
|
|
|