[svn r10737] Update the course creation file.

Add default images when create a course in the document tool
it's a temporaly solution we must discuss how it will be done
skala
Julian Prud'homme 19 years ago
parent 8167c9be52
commit 4939b1a81e
  1. BIN
      main/img/default_courses_img/board.gif
  2. BIN
      main/img/default_courses_img/book.gif
  3. BIN
      main/img/default_courses_img/book_highlight.gif
  4. BIN
      main/img/default_courses_img/bookcase.gif
  5. BIN
      main/img/default_courses_img/calendar.gif
  6. BIN
      main/img/default_courses_img/computer.gif
  7. BIN
      main/img/default_courses_img/emot_happy.gif
  8. BIN
      main/img/default_courses_img/emot_neutral.gif
  9. BIN
      main/img/default_courses_img/emot_sad.gif
  10. BIN
      main/img/default_courses_img/emot_wink.gif
  11. BIN
      main/img/default_courses_img/female.gif
  12. BIN
      main/img/default_courses_img/floppy.gif
  13. BIN
      main/img/default_courses_img/geometry.gif
  14. BIN
      main/img/default_courses_img/group.gif
  15. BIN
      main/img/default_courses_img/hal.gif
  16. BIN
      main/img/default_courses_img/homework.gif
  17. BIN
      main/img/default_courses_img/idea.gif
  18. BIN
      main/img/default_courses_img/interaction.gif
  19. BIN
      main/img/default_courses_img/japanese.gif
  20. BIN
      main/img/default_courses_img/keyboard.gif
  21. BIN
      main/img/default_courses_img/linux.gif
  22. BIN
      main/img/default_courses_img/male.gif
  23. BIN
      main/img/default_courses_img/maths.gif
  24. BIN
      main/img/default_courses_img/mechanism.gif
  25. BIN
      main/img/default_courses_img/mouse.gif
  26. BIN
      main/img/default_courses_img/newspaper.gif
  27. BIN
      main/img/default_courses_img/note.gif
  28. BIN
      main/img/default_courses_img/planet.gif
  29. BIN
      main/img/default_courses_img/presentation.gif
  30. BIN
      main/img/default_courses_img/redlight.gif
  31. BIN
      main/img/default_courses_img/science.gif
  32. BIN
      main/img/default_courses_img/search.gif
  33. BIN
      main/img/default_courses_img/speech.gif
  34. BIN
      main/img/default_courses_img/teacher.gif
  35. BIN
      main/img/default_courses_img/time.gif
  36. BIN
      main/img/default_courses_img/tutorial.gif
  37. BIN
      main/img/default_courses_img/wallet.gif
  38. BIN
      main/img/default_courses_img/wikipedia.gif
  39. BIN
      main/img/default_courses_img/work.gif
  40. BIN
      main/img/default_courses_img/world.gif
  41. BIN
      main/img/default_courses_img/write.gif
  42. 28
      main/inc/lib/add_course.lib.inc.php

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

@ -1275,6 +1275,16 @@ function fill_course_repository($courseRepository)
fputs($fp, $enreg);
}
$img_code_path = api_get_path(SYS_CODE_PATH)."img/default_courses_img/";
$course_documents_folder=$sys_course_path.$courseRepository.'/document/images/';
$handle = opendir($img_code_path);
while (false !== ($file = readdir($handle))) {
copy($img_code_path.$file,$course_documents_folder.$file);
chmod($course_documents_folder.$file,"0777");
}
fclose($fp);
return 0;
@ -1481,7 +1491,23 @@ function fill_Db_course($courseDbName, $courseRepository, $language)
api_sql_query("INSERT INTO `".$TABLETOOLDOCUMENT . "`(path,title,filetype,size) VALUES ('/video','".get_lang('Video')."','folder','0')");
$example_doc_id = Database :: get_last_insert_id();
api_sql_query("INSERT INTO `".$TABLEITEMPROPERTY . "` (tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility) VALUES ('document',1,NOW(),NOW(),$example_doc_id,'DocumentAdded',1,0,NULL,0)");
//FILL THE COURSE DOCUMENT WITH DEFAULT COURSE PICTURES
$img_code_path = api_get_path(SYS_CODE_PATH)."img/default_courses_img/";
$sys_course_path = api_get_path(SYS_COURSE_PATH);
$handle = opendir($img_code_path);
while (false !== ($file = readdir($handle))) {
if($file!="." && $file!=".."){
$file_size=filesize($img_code_path.$file);
$file=lang2db($file);
api_sql_query("INSERT INTO `".$TABLETOOLDOCUMENT . "`(path,title,filetype,size) VALUES ('/images/','$file','file','$file_size')");
$image_id = Database :: get_last_insert_id();
api_sql_query("INSERT INTO `".$TABLEITEMPROPERTY . "` (tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility) VALUES ('document',1,NOW(),NOW(),$image_id,'DocumentAdded',1,0,NULL,0)");
}
}
/*
-----------------------------------------------------------
Agenda tool

Loading…
Cancel
Save