Yannick Warnier 14 years ago
parent
commit
e5c9cefd6b
38 changed files with 995 additions and 779 deletions
  1. 2 1
      documentation/changelog.html
  2. 3 2
      main/course_info/infocours.php
  3. 378 365
      main/coursecopy/classes/CourseRecycler.class.php
  4. 6 6
      main/exercice/question_list_admin.inc.php
  5. 2 2
      main/inc/lib/fckeditor/toolbars/extended/admin_templates.php
  6. 3 4
      main/inc/lib/fckeditor/toolbars/extended/agenda.php
  7. 3 3
      main/inc/lib/fckeditor/toolbars/extended/agenda_student.php
  8. 3 4
      main/inc/lib/fckeditor/toolbars/extended/announcements.php
  9. 3 3
      main/inc/lib/fckeditor/toolbars/extended/announcements_student.php
  10. 1 1
      main/inc/lib/fckeditor/toolbars/extended/documents.php
  11. 2 2
      main/inc/lib/fckeditor/toolbars/extended/documents_student.php
  12. 1 1
      main/inc/lib/fckeditor/toolbars/extended/faq.php
  13. 34 24
      main/inc/lib/fckeditor/toolbars/extended/forum.php
  14. 33 24
      main/inc/lib/fckeditor/toolbars/extended/forum_student.php
  15. 3 4
      main/inc/lib/fckeditor/toolbars/extended/global_agenda.php
  16. 32 24
      main/inc/lib/fckeditor/toolbars/extended/glossary.php
  17. 1 1
      main/inc/lib/fckeditor/toolbars/extended/introduction.php
  18. 34 16
      main/inc/lib/fckeditor/toolbars/extended/learning_path_author.php
  19. 35 23
      main/inc/lib/fckeditor/toolbars/extended/learning_path_documents.php
  20. 33 24
      main/inc/lib/fckeditor/toolbars/extended/messages.php
  21. 3 3
      main/inc/lib/fckeditor/toolbars/extended/notebook.php
  22. 3 3
      main/inc/lib/fckeditor/toolbars/extended/notebook_student.php
  23. 33 24
      main/inc/lib/fckeditor/toolbars/extended/portal_home_page.php
  24. 33 24
      main/inc/lib/fckeditor/toolbars/extended/portal_news.php
  25. 33 23
      main/inc/lib/fckeditor/toolbars/extended/profile.php
  26. 34 23
      main/inc/lib/fckeditor/toolbars/extended/project.php
  27. 32 22
      main/inc/lib/fckeditor/toolbars/extended/project_comment.php
  28. 33 21
      main/inc/lib/fckeditor/toolbars/extended/project_comment_student.php
  29. 32 22
      main/inc/lib/fckeditor/toolbars/extended/project_student.php
  30. 34 22
      main/inc/lib/fckeditor/toolbars/extended/survey.php
  31. 35 10
      main/inc/lib/fckeditor/toolbars/extended/test_free_answer.php
  32. 32 10
      main/inc/lib/fckeditor/toolbars/extended/test_proposed_answer.php
  33. 33 24
      main/inc/lib/fckeditor/toolbars/extended/test_question_description.php
  34. 4 5
      main/inc/lib/fckeditor/toolbars/extended/training_description.php
  35. 2 3
      main/inc/lib/fckeditor/toolbars/extended/wiki.php
  36. 2 1
      main/inc/lib/fckeditor/toolbars/extended/wiki_feedback.php
  37. 2 2
      main/inc/lib/fckeditor/toolbars/extended/wiki_student.php
  38. 3 3
      main/inc/lib/fckeditor/toolbars/extended/wiki_task.php

+ 2 - 1
documentation/changelog.html

@@ -92,7 +92,8 @@
   <li>Irrelevant check has been removed, it prevented the page "Administration &gt; Setting the registration page" to be accessed
   in the case of assigned value "No" to the setting "Administration &gt; Configuration settings &gt; Portal &gt; Registration".
   This bug has been reported by Wolfgang in the forum and by Oliver Corre in the Chamilo support site (Bug #1846)</li>
-
+  <li>Until now, when a training was emptied, only as database records related to SCORM learning paths were removed.
+  Now the correspondent folders containing the unzipped SCORM packages are removed from the file system too (Bug #875)</li>
 </ul>
 <h3>Security</h3>
 <ul>

+ 3 - 2
main/course_info/infocours.php

@@ -258,8 +258,8 @@ if (is_settings_editable()) {
 }
 
 
-// THEMATIC SETTINGS
-$form->addElement('html', '<div class="sectiontitle" style="margin-top: 40px;"><a href="#header" style="float:right;">'.Display::return_icon('top.gif', get_lang('Top')).'</a><a name="chatsettings" id="chatsettings"></a>'.Display::return_icon('attendance.gif', get_lang('ConfigChat')).' '.get_lang('ThematicAdvanceConfiguration').'</div>');
+// THEMATIC ADVANCE SETTINGS
+$form->addElement('html', '<div class="sectiontitle" style="margin-top: 40px;"><a href="#header" style="float:right;">'.Display::return_icon('top.gif', get_lang('Top')).'</a><a name="thematicadvance" id="thematicadvance"></a>'.Display::return_icon('course_progress.gif', get_lang('ThematicAdvanceConfiguration')).' '.get_lang('ThematicAdvanceConfiguration').'</div>');
 $form->addElement('radio', 'display_info_advance_inside_homecourse', get_lang('InfoAboutAdvanceInsideHomeCourse'), get_lang('DisplayAboutLastDoneAdvance'), 1);
 $form->addElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDone'), 2);
 $form->addElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDoneAndLastDoneAdvance'), 3);
@@ -403,6 +403,7 @@ echo '<a href="#chatsettings">'.Display::return_icon('chat.gif', get_lang('Confi
 if (api_get_setting('allow_course_theme') == 'true') {
 	echo '<a href="#theme">'.Display::return_icon('theme.gif', get_lang('Theming')).' '.get_lang('Theming').'</a>';
 }
+echo '<a href="#thematicadvance">'.Display::return_icon('course_progress.gif', get_lang('ThematicAdvanceConfiguration')).' '.get_lang('ThematicAdvanceConfiguration').'</a>';
 echo '</div>';
 
 // display course picture

+ 378 - 365
main/coursecopy/classes/CourseRecycler.class.php

@@ -10,389 +10,402 @@ require_once 'Course.class.php';
  */
 class CourseRecycler
 {
-	/**
-	 * A course-object with the items to delete
-	 */
-	var $course;
-	/**
-	 * Create a new CourseRecycler
-	 * @param course $course The course-object which contains the items to
-	 * delete
-	 */
-	function CourseRecycler($course)
-	{
-		$this->course = $course;
-	}
-	/**
-	 * Delete all items from the course.
-	 * This deletes all items in the course-object from the current Dokeos-
-	 * course
-	 */
-	function recycle()
-	{
-		$table_tool_intro = Database::get_course_table(TABLE_TOOL_INTRO);
-		$table_linked_resources = Database :: get_course_table(TABLE_LINKED_RESOURCES);
-		$table_item_properties = Database::get_course_table(TABLE_ITEM_PROPERTY);
-		
-		$this->recycle_links();
-		$this->recycle_link_categories();
-		$this->recycle_events();
-		$this->recycle_announcements();
-		$this->recycle_documents();		
-		$this->recycle_forums(); //@todo does not work yet
-		$this->recycle_forum_categories();
-		$this->recycle_quizzes();
-		$this->recycle_surveys();
-		$this->recycle_learnpaths();
-		$this->recycle_cours_description();
-		$this->recycle_wiki();
-		$this->recycle_glossary();
-		
-		
-		foreach ($this->course->resources as $type => $resources) {			
-			foreach ($resources as $id => $resource) {
-				$sql = "DELETE FROM ".$table_linked_resources." WHERE (source_type = '".$type."' AND source_id = '".$id."') OR (resource_type = '".$type."' AND resource_id = '".$id."')  ";
-				Database::query($sql);
-				if(is_numeric($id)) {
-					$sql = "DELETE FROM ".$table_item_properties." WHERE tool ='".$resource->get_tool()."' AND ref=".$id;
-					Database::query($sql);
-				} elseif ($type == RESOURCE_TOOL_INTRO) {
-					$sql = "DELETE FROM $table_tool_intro WHERE id='$id'";
-					Database::query($sql);
-				}
-			}
-		}
+    /**
+     * A course-object with the items to delete
+     */
+    var $course;
+    /**
+     * Create a new CourseRecycler
+     * @param course $course The course-object which contains the items to
+     * delete
+     */
+    function CourseRecycler($course)
+    {
+        $this->course = $course;
+    }
+    /**
+     * Delete all items from the course.
+     * This deletes all items in the course-object from the current Dokeos-
+     * course
+     */
+    function recycle()
+    {
+        $table_tool_intro = Database::get_course_table(TABLE_TOOL_INTRO);
+        $table_linked_resources = Database :: get_course_table(TABLE_LINKED_RESOURCES);
+        $table_item_properties = Database::get_course_table(TABLE_ITEM_PROPERTY);
 
-	}
-	/**
-	 * Delete documents
-	 */
-	function recycle_documents()
-	{
-		if ($this->course->has_resources(RESOURCE_DOCUMENT))
-		{
-			$table = Database :: get_course_table(TABLE_DOCUMENT);
-			foreach ($this->course->resources[RESOURCE_DOCUMENT] as $id => $document)
-			{
-				rmdirr($this->course->backup_path.'/'.$document->path);
-			}
-			$ids = implode(',', (array_keys($this->course->resources[RESOURCE_DOCUMENT])));
-			$sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
-			Database::query($sql);
-		}
-	}
+        $this->recycle_links();
+        $this->recycle_link_categories();
+        $this->recycle_events();
+        $this->recycle_announcements();
+        $this->recycle_documents();
+        $this->recycle_forums(); //@todo does not work yet
+        $this->recycle_forum_categories();
+        $this->recycle_quizzes();
+        $this->recycle_surveys();
+        $this->recycle_learnpaths();
+        $this->recycle_cours_description();
+        $this->recycle_wiki();
+        $this->recycle_glossary();
 
-	/**
-	 * Delete wiki
-	 */
-	function recycle_wiki() {
-		if ($this->course->has_resources(RESOURCE_WIKI)) {
-			$table_wiki 		= Database::get_course_table(TABLE_WIKI);
-			$table_wiki_conf 	= Database::get_course_table(TABLE_WIKI_CONF);
-			$table_wiki_discuss = Database::get_course_table(TABLE_WIKI_DISCUSS);
-			$table_wiki_mailcue = Database::get_course_table(TABLE_WIKI_MAILCUE);
 
-			$pages = array();
-			foreach ($this->course->resources[RESOURCE_WIKI] as $resource) {
-				$pages[] = $resource->page_id;
-			}
-			$wiki_ids = implode(',', (array_keys($this->course->resources[RESOURCE_WIKI])));
-			$page_ids = implode(',', $pages);
+        foreach ($this->course->resources as $type => $resources) {
+            foreach ($resources as $id => $resource) {
+                $sql = "DELETE FROM ".$table_linked_resources." WHERE (source_type = '".$type."' AND source_id = '".$id."') OR (resource_type = '".$type."' AND resource_id = '".$id."')  ";
+                Database::query($sql);
+                if(is_numeric($id)) {
+                    $sql = "DELETE FROM ".$table_item_properties." WHERE tool ='".$resource->get_tool()."' AND ref=".$id;
+                    Database::query($sql);
+                } elseif ($type == RESOURCE_TOOL_INTRO) {
+                    $sql = "DELETE FROM $table_tool_intro WHERE id='$id'";
+                    Database::query($sql);
+                }
+            }
+        }
 
-			$sql = "DELETE FROM ".$table_wiki." WHERE id IN(".$wiki_ids.")";
-			Database::query($sql);
-			$sql = "DELETE FROM ".$table_wiki_conf." WHERE page_id IN(".$page_ids.")";
-			Database::query($sql);
-		}
-	}
+    }
+    /**
+     * Delete documents
+     */
+    function recycle_documents()
+    {
+        if ($this->course->has_resources(RESOURCE_DOCUMENT))
+        {
+            $table = Database :: get_course_table(TABLE_DOCUMENT);
+            foreach ($this->course->resources[RESOURCE_DOCUMENT] as $id => $document)
+            {
+                rmdirr($this->course->backup_path.'/'.$document->path);
+            }
+            $ids = implode(',', (array_keys($this->course->resources[RESOURCE_DOCUMENT])));
+            $sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
+            Database::query($sql);
+        }
+    }
 
-	/**
-	 * Delete glossary
-	 */
-	function recycle_glossary() {
-		if ($this->course->has_resources(RESOURCE_GLOSSARY)) {
-			$table_glossary	= Database::get_course_table(TABLE_GLOSSARY);
-			$ids = implode(',', (array_keys($this->course->resources[RESOURCE_GLOSSARY])));
-			$sql = "DELETE FROM ".$table_glossary." WHERE glossary_id IN(".$ids.")";
-			Database::query($sql);
-		}
-	}
+    /**
+     * Delete wiki
+     */
+    function recycle_wiki() {
+        if ($this->course->has_resources(RESOURCE_WIKI)) {
+            $table_wiki 		= Database::get_course_table(TABLE_WIKI);
+            $table_wiki_conf 	= Database::get_course_table(TABLE_WIKI_CONF);
+            $table_wiki_discuss = Database::get_course_table(TABLE_WIKI_DISCUSS);
+            $table_wiki_mailcue = Database::get_course_table(TABLE_WIKI_MAILCUE);
 
-	/**
-	 * Delete links
-	 */
-	function recycle_links()
-	{
-		if ($this->course->has_resources(RESOURCE_LINK))
-		{
-			$table = Database :: get_course_table(TABLE_LINK);
-			$ids = implode(',', (array_keys($this->course->resources[RESOURCE_LINK])));
-			$sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
-			Database::query($sql);
-		}
-	}
-	/**
-	 * Delete forums
-	 */
-	function recycle_forums()
-	{
-		if ($this->course->has_resources(RESOURCE_FORUM))
-		{
-			$table_category = Database :: get_course_table(TABLE_FORUM_CATEGORY);
-			$table_forum = Database :: get_course_table(TABLE_FORUM);
-			$table_thread = Database :: get_course_table(TABLE_FORUM_THREAD);
-			$table_post = Database :: get_course_table(TABLE_FORUM_POST);
-			$table_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT);
-			$table_notification = Database::get_course_table(TABLE_FORUM_NOTIFICATION);
-			$table_mail_queue = Database::get_course_table(TABLE_FORUM_MAIL_QUEUE);
-			$table_thread_qualify = Database::get_course_table(TABLE_FORUM_THREAD_QUALIFY);
-			$table_thread_qualify_log = Database::get_course_table(TABLE_FORUM_THREAD_QUALIFY_LOG);
+            $pages = array();
+            foreach ($this->course->resources[RESOURCE_WIKI] as $resource) {
+                $pages[] = $resource->page_id;
+            }
+            $wiki_ids = implode(',', (array_keys($this->course->resources[RESOURCE_WIKI])));
+            $page_ids = implode(',', $pages);
 
-			$forum_ids = implode(',', (array_keys($this->course->resources[RESOURCE_FORUM])));
+            $sql = "DELETE FROM ".$table_wiki." WHERE id IN(".$wiki_ids.")";
+            Database::query($sql);
+            $sql = "DELETE FROM ".$table_wiki_conf." WHERE page_id IN(".$page_ids.")";
+            Database::query($sql);
+        }
+    }
 
-			$sql = "DELETE FROM ".$table_attachment.
-				" USING ".$table_attachment." INNER JOIN ".$table_post.
-				" WHERE ".$table_attachment.".post_id = ".$table_post.".post_id".
-				" AND ".$table_post.".forum_id IN(".$forum_ids.");";
-			Database::query($sql);
+    /**
+     * Delete glossary
+     */
+    function recycle_glossary() {
+        if ($this->course->has_resources(RESOURCE_GLOSSARY)) {
+            $table_glossary	= Database::get_course_table(TABLE_GLOSSARY);
+            $ids = implode(',', (array_keys($this->course->resources[RESOURCE_GLOSSARY])));
+            $sql = "DELETE FROM ".$table_glossary." WHERE glossary_id IN(".$ids.")";
+            Database::query($sql);
+        }
+    }
 
-			$sql = "DELETE FROM ".$table_mail_queue.
-				" USING ".$table_mail_queue." INNER JOIN ".$table_post.
-				" WHERE ".$table_mail_queue.".post_id = ".$table_post.".post_id".
-				" AND ".$table_post.".forum_id IN(".$forum_ids.");";
-			Database::query($sql);
+    /**
+     * Delete links
+     */
+    function recycle_links()
+    {
+        if ($this->course->has_resources(RESOURCE_LINK))
+        {
+            $table = Database :: get_course_table(TABLE_LINK);
+            $ids = implode(',', (array_keys($this->course->resources[RESOURCE_LINK])));
+            $sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
+            Database::query($sql);
+        }
+    }
+    /**
+     * Delete forums
+     */
+    function recycle_forums()
+    {
+        if ($this->course->has_resources(RESOURCE_FORUM))
+        {
+            $table_category = Database :: get_course_table(TABLE_FORUM_CATEGORY);
+            $table_forum = Database :: get_course_table(TABLE_FORUM);
+            $table_thread = Database :: get_course_table(TABLE_FORUM_THREAD);
+            $table_post = Database :: get_course_table(TABLE_FORUM_POST);
+            $table_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT);
+            $table_notification = Database::get_course_table(TABLE_FORUM_NOTIFICATION);
+            $table_mail_queue = Database::get_course_table(TABLE_FORUM_MAIL_QUEUE);
+            $table_thread_qualify = Database::get_course_table(TABLE_FORUM_THREAD_QUALIFY);
+            $table_thread_qualify_log = Database::get_course_table(TABLE_FORUM_THREAD_QUALIFY_LOG);
 
-			// Just in case, deleting in the same table using thread_id as record-linker.
-			$sql = "DELETE FROM ".$table_mail_queue.
-				" USING ".$table_mail_queue." INNER JOIN ".$table_thread.
-				" WHERE ".$table_mail_queue.".thread_id = ".$table_thread.".thread_id".
-				" AND ".$table_thread.".forum_id IN(".$forum_ids.");";
-			Database::query($sql);
+            $forum_ids = implode(',', (array_keys($this->course->resources[RESOURCE_FORUM])));
 
-			$sql = "DELETE FROM ".$table_thread_qualify.
-				" USING ".$table_thread_qualify." INNER JOIN ".$table_thread.
-				" WHERE ".$table_thread_qualify.".thread_id = ".$table_thread.".thread_id".
-				" AND ".$table_thread.".forum_id IN(".$forum_ids.");";
-			Database::query($sql);
+            $sql = "DELETE FROM ".$table_attachment.
+                " USING ".$table_attachment." INNER JOIN ".$table_post.
+                " WHERE ".$table_attachment.".post_id = ".$table_post.".post_id".
+                " AND ".$table_post.".forum_id IN(".$forum_ids.");";
+            Database::query($sql);
 
-			$sql = "DELETE FROM ".$table_thread_qualify_log.
-				" USING ".$table_thread_qualify_log." INNER JOIN ".$table_thread.
-				" WHERE ".$table_thread_qualify_log.".thread_id = ".$table_thread.".thread_id".
-				" AND ".$table_thread.".forum_id IN(".$forum_ids.");";
-			Database::query($sql);
+            $sql = "DELETE FROM ".$table_mail_queue.
+                " USING ".$table_mail_queue." INNER JOIN ".$table_post.
+                " WHERE ".$table_mail_queue.".post_id = ".$table_post.".post_id".
+                " AND ".$table_post.".forum_id IN(".$forum_ids.");";
+            Database::query($sql);
 
-			$sql = "DELETE FROM ".$table_notification." WHERE forum_id IN(".$forum_ids.")";
-			Database::query($sql);
+            // Just in case, deleting in the same table using thread_id as record-linker.
+            $sql = "DELETE FROM ".$table_mail_queue.
+                " USING ".$table_mail_queue." INNER JOIN ".$table_thread.
+                " WHERE ".$table_mail_queue.".thread_id = ".$table_thread.".thread_id".
+                " AND ".$table_thread.".forum_id IN(".$forum_ids.");";
+            Database::query($sql);
 
-			$sql = "DELETE FROM ".$table_post." WHERE forum_id IN(".$forum_ids.")";
-			Database::query($sql);
+            $sql = "DELETE FROM ".$table_thread_qualify.
+                " USING ".$table_thread_qualify." INNER JOIN ".$table_thread.
+                " WHERE ".$table_thread_qualify.".thread_id = ".$table_thread.".thread_id".
+                " AND ".$table_thread.".forum_id IN(".$forum_ids.");";
+            Database::query($sql);
 
-			$sql = "DELETE FROM ".$table_thread." WHERE forum_id IN(".$forum_ids.")";
-			Database::query($sql);
+            $sql = "DELETE FROM ".$table_thread_qualify_log.
+                " USING ".$table_thread_qualify_log." INNER JOIN ".$table_thread.
+                " WHERE ".$table_thread_qualify_log.".thread_id = ".$table_thread.".thread_id".
+                " AND ".$table_thread.".forum_id IN(".$forum_ids.");";
+            Database::query($sql);
 
-			$sql = "DELETE FROM ".$table_forum." WHERE forum_id IN(".$forum_ids.")";
-			Database::query($sql);
-		}
-	}
-	/**
-	 * Delete forum-categories
-	 * Deletes all forum-categories from current course without forums
-	 */
-	function recycle_forum_categories()
-	{
-		$table_forum = Database :: get_course_table(TABLE_FORUM);
-		$table_forumcat = Database :: get_course_table(TABLE_FORUM_CATEGORY);
-		$sql = "SELECT fc.cat_id FROM ".$table_forumcat." fc LEFT JOIN ".$table_forum." f ON fc.cat_id=f.forum_category WHERE f.forum_id IS NULL";
-		$res = Database::query($sql);
-		while ($obj = Database::fetch_object($res))
-		{
-			$sql = "DELETE FROM ".$table_forumcat." WHERE cat_id = ".$obj->cat_id;
-			Database::query($sql);
-		}
-	}
-	/**
-	 * Delete link-categories
-	 * Deletes all empty link-categories (=without links) from current course
-	 */
-	function recycle_link_categories()
-	{
-		$link_cat_table = Database :: get_course_table(TABLE_LINK_CATEGORY);
-		$link_table = Database :: get_course_table(TABLE_LINK);
-		$sql = "SELECT lc.id FROM ".$link_cat_table." lc LEFT JOIN ".$link_table." l ON lc.id=l.category_id WHERE l.id IS NULL";
-		$res = Database::query($sql);
-		while ($obj = Database::fetch_object($res))
-		{
-			$sql = "DELETE FROM ".$link_cat_table." WHERE id = ".$obj->id;
-			Database::query($sql);
-		}
-	}
-	/**
-	 * Delete events
-	 */
-	function recycle_events() {
-		if ($this->course->has_resources(RESOURCE_EVENT)) {
-			$table = Database :: get_course_table(TABLE_AGENDA);
-			$table_attachment = Database :: get_course_table(TABLE_AGENDA_ATTACHMENT);
-			
-			$ids = implode(',', (array_keys($this->course->resources[RESOURCE_EVENT])));
-			$sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
-			Database::query($sql);
-			
-			$sql = "DELETE FROM ".$table_attachment." WHERE agenda_id IN(".$ids.")";
-			Database::query($sql);			
-		}
-	}
-	/**
-	 * Delete announcements
-	 */
-	function recycle_announcements() {		
-		if ($this->course->has_resources(RESOURCE_ANNOUNCEMENT)) {
-			$table = Database :: get_course_table(TABLE_ANNOUNCEMENT);
-			$table_attachment = Database :: get_course_table(TABLE_ANNOUNCEMENT_ATTACHMENT);
-			
-			$ids = implode(',', (array_keys($this->course->resources[RESOURCE_ANNOUNCEMENT])));
-			$sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
-			Database::query($sql);
-			
-			$sql = "DELETE FROM ".$table_attachment." WHERE announcement_id IN(".$ids.")";
-			Database::query($sql);			
-		}
-	}
-	/**
-	 * Recycle quizzes - doesn't remove the questions and their answers, as they might still be used later
-	 */
-	function recycle_quizzes()
-	{
-		if ($this->course->has_resources(RESOURCE_QUIZ))
-		{
-			$table_qui_que = Database :: get_course_table(TABLE_QUIZ_QUESTION);
-			$table_qui_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER);
-			$table_qui = Database :: get_course_table(TABLE_QUIZ_TEST);
-			$table_rel = Database :: get_course_table(TABLE_QUIZ_TEST_QUESTION);
+            $sql = "DELETE FROM ".$table_notification." WHERE forum_id IN(".$forum_ids.")";
+            Database::query($sql);
 
-			$ids = array_keys($this->course->resources[RESOURCE_QUIZ]);
-			$delete_orphan_questions = in_array(-1, $ids);
-			$ids = implode(',', $ids);
+            $sql = "DELETE FROM ".$table_post." WHERE forum_id IN(".$forum_ids.")";
+            Database::query($sql);
 
-			// Deletion of the normal tests, questions in them are not deleted, they become orphan at this moment.
-			$sql = "DELETE FROM ".$table_qui." WHERE id <> -1 AND id IN(".$ids.")";
-			Database::query($sql);
-			$sql = "DELETE FROM ".$table_rel." WHERE exercice_id <> -1 AND exercice_id IN(".$ids.")";
-			Database::query($sql);
+            $sql = "DELETE FROM ".$table_thread." WHERE forum_id IN(".$forum_ids.")";
+            Database::query($sql);
 
-			// Identifying again and deletion of the orphan questions, if it was desired.
-			if ($delete_orphan_questions)
-			{
-				$sql = 'SELECT questions.id FROM '.$table_qui_que.
-					' as questions LEFT JOIN '.$table_rel.' as quizz_questions ON questions.id=quizz_questions.question_id LEFT JOIN '.$table_qui.
-					' as exercices ON exercice_id=exercices.id WHERE quizz_questions.exercice_id IS NULL OR exercices.active = -1'; // active = -1 means "deleted" test.
-				$db_result = Database::query($sql);
-				if (Database::num_rows($db_result) > 0)
-				{
-					$orphan_ids = array();
-					while ($obj = Database::fetch_object($db_result))
-					{
-						$orphan_ids[] = $obj->id;
-					}
-					$orphan_ids = implode(',', $orphan_ids);
-					$sql = "DELETE FROM ".$table_rel." WHERE question_id IN(".$orphan_ids.")";
-					Database::query($sql);
-					$sql = "DELETE FROM ".$table_qui_ans." WHERE question_id IN(".$orphan_ids.")";
-					Database::query($sql);
-					$sql = "DELETE FROM ".$table_qui_que." WHERE id IN(".$orphan_ids.")";
-					Database::query($sql);
-				}
-			}
-		}
+            $sql = "DELETE FROM ".$table_forum." WHERE forum_id IN(".$forum_ids.")";
+            Database::query($sql);
+        }
+    }
+    /**
+     * Delete forum-categories
+     * Deletes all forum-categories from current course without forums
+     */
+    function recycle_forum_categories()
+    {
+        $table_forum = Database :: get_course_table(TABLE_FORUM);
+        $table_forumcat = Database :: get_course_table(TABLE_FORUM_CATEGORY);
+        $sql = "SELECT fc.cat_id FROM ".$table_forumcat." fc LEFT JOIN ".$table_forum." f ON fc.cat_id=f.forum_category WHERE f.forum_id IS NULL";
+        $res = Database::query($sql);
+        while ($obj = Database::fetch_object($res))
+        {
+            $sql = "DELETE FROM ".$table_forumcat." WHERE cat_id = ".$obj->cat_id;
+            Database::query($sql);
+        }
+    }
+    /**
+     * Delete link-categories
+     * Deletes all empty link-categories (=without links) from current course
+     */
+    function recycle_link_categories()
+    {
+        $link_cat_table = Database :: get_course_table(TABLE_LINK_CATEGORY);
+        $link_table = Database :: get_course_table(TABLE_LINK);
+        $sql = "SELECT lc.id FROM ".$link_cat_table." lc LEFT JOIN ".$link_table." l ON lc.id=l.category_id WHERE l.id IS NULL";
+        $res = Database::query($sql);
+        while ($obj = Database::fetch_object($res))
+        {
+            $sql = "DELETE FROM ".$link_cat_table." WHERE id = ".$obj->id;
+            Database::query($sql);
+        }
+    }
+    /**
+     * Delete events
+     */
+    function recycle_events() {
+        if ($this->course->has_resources(RESOURCE_EVENT)) {
+            $table = Database :: get_course_table(TABLE_AGENDA);
+            $table_attachment = Database :: get_course_table(TABLE_AGENDA_ATTACHMENT);
 
-		// Purge "deleted" tests (active = -1).
-		$sql = "DELETE FROM ".$table_qui." WHERE active = -1";
-		Database::query($sql);
-	}
-	/**
-	 * Recycle surveys - removes everything
-	 */
-	function recycle_surveys()
-	{
-		if ($this->course->has_resources(RESOURCE_SURVEY))
-		{
-			$table_survey = Database :: get_course_table(TABLE_SURVEY);
-			$table_survey_q = Database :: get_course_table(TABLE_SURVEY_QUESTION);
-			$table_survey_q_o = Database :: get_course_table(TABLE_SURVEY_QUESTION_OPTION);
-			$table_survey_a = Database :: get_course_Table(TABLE_SURVEY_ANSWER);
-			$table_survey_i = Database :: get_course_table(TABLE_SURVEY_INVITATION);
-			$ids = implode(',', (array_keys($this->course->resources[RESOURCE_SURVEY])));
-			$sql = "DELETE FROM ".$table_survey_i." ";
-			Database::query($sql);
-			$sql = "DELETE FROM ".$table_survey_a." WHERE survey_id IN(".$ids.")";
-			Database::query($sql);
-			$sql = "DELETE FROM ".$table_survey_q_o." WHERE survey_id IN(".$ids.")";
-			Database::query($sql);
-			$sql = "DELETE FROM ".$table_survey_q." WHERE survey_id IN(".$ids.")";
-			Database::query($sql);
-			$sql = "DELETE FROM ".$table_survey." WHERE survey_id IN(".$ids.")";
-			Database::query($sql);
-		}
-	}
-	/**
-	 * Recycle learnpaths
-	 */
-	function recycle_learnpaths()
-	{
-		if ($this->course->has_resources(RESOURCE_LEARNPATH))
-		{
-			$table_main = Database :: get_course_table(TABLE_LP_MAIN);
-			$table_item = Database :: get_course_table(TABLE_LP_ITEM);
-			$table_view = Database :: get_course_table(TABLE_LP_VIEW);
-			$table_iv   = Database :: get_course_table(TABLE_LP_ITEM_VIEW);
-			$table_iv_int = Database :: get_course_table(TABLE_LP_IV_INTERACTION);
-			$table_tool = Database::get_course_table(TABLE_TOOL_LIST);
-			foreach($this->course->resources[RESOURCE_LEARNPATH] as $id => $learnpath)
-			{
-				//remove links from course homepage
-				$sql = "DELETE FROM $table_tool WHERE link LIKE '%lp_controller.php%lp_id=$id%' AND image='scormbuilder.gif'";
-				Database::query($sql);
-				//remove elements from lp_* tables (from bottom-up) by removing interactions, then item_view, then views and items, then paths
-				$sql_items = "SELECT id FROM $table_item WHERE lp_id=$id";
-				$res_items = Database::query($sql_items);
-				while ($row_item = Database::fetch_array($res_items))
-				{
-					//get item views
-					$sql_iv = "SELECT id FROM $table_iv WHERE lp_item_id=".$row_item['id'];
-					$res_iv = Database::query($sql_iv);
-					while ($row_iv = Database::fetch_array($res_iv))
-					{
-						//delete interactions
-						$sql_iv_int_del = "DELETE FROM $table_iv_int WHERE lp_iv_id = ".$row_iv['id'];
-						$res_iv_int_del = Database::query($sql_iv_int_del);
-					}
-					//delete item views
-					$sql_iv_del = "DELETE FROM $table_iv WHERE lp_item_id=".$row_item['id'];
-					$res_iv_del = Database::query($sql_iv_del);
-				}
-				//delete items
-				$sql_items_del = "DELETE FROM $table_item WHERE lp_id=$id";
-				$res_items_del = Database::query($sql_items_del);
-				//delete views
-				$sql_views_del = "DELETE FROM $table_view WHERE lp_id=$id";
-				$res_views_del = Database::query($sql_views_del);
-				//delete lps
-				$sql_del = "DELETE FROM $table_main WHERE id = $id";
-				$res_del = Database::query($sql_del);
-			}
-		}
-	}
-	/**
-	 * Delete course description
-	 */
-	function recycle_cours_description()
-	{
-		if ($this->course->has_resources(RESOURCE_COURSEDESCRIPTION))
-		{
-			$table = Database :: get_course_table(TABLE_COURSE_DESCRIPTION);
-			$ids = implode(',', (array_keys($this->course->resources[RESOURCE_COURSEDESCRIPTION])));
-			$sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
-			Database::query($sql);
-		}
-	}
+            $ids = implode(',', (array_keys($this->course->resources[RESOURCE_EVENT])));
+            $sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
+            Database::query($sql);
+
+            $sql = "DELETE FROM ".$table_attachment." WHERE agenda_id IN(".$ids.")";
+            Database::query($sql);
+        }
+    }
+    /**
+     * Delete announcements
+     */
+    function recycle_announcements() {
+        if ($this->course->has_resources(RESOURCE_ANNOUNCEMENT)) {
+            $table = Database :: get_course_table(TABLE_ANNOUNCEMENT);
+            $table_attachment = Database :: get_course_table(TABLE_ANNOUNCEMENT_ATTACHMENT);
+
+            $ids = implode(',', (array_keys($this->course->resources[RESOURCE_ANNOUNCEMENT])));
+            $sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
+            Database::query($sql);
+
+            $sql = "DELETE FROM ".$table_attachment." WHERE announcement_id IN(".$ids.")";
+            Database::query($sql);
+        }
+    }
+    /**
+     * Recycle quizzes - doesn't remove the questions and their answers, as they might still be used later
+     */
+    function recycle_quizzes()
+    {
+        if ($this->course->has_resources(RESOURCE_QUIZ))
+        {
+            $table_qui_que = Database :: get_course_table(TABLE_QUIZ_QUESTION);
+            $table_qui_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER);
+            $table_qui = Database :: get_course_table(TABLE_QUIZ_TEST);
+            $table_rel = Database :: get_course_table(TABLE_QUIZ_TEST_QUESTION);
+
+            $ids = array_keys($this->course->resources[RESOURCE_QUIZ]);
+            $delete_orphan_questions = in_array(-1, $ids);
+            $ids = implode(',', $ids);
+
+            // Deletion of the normal tests, questions in them are not deleted, they become orphan at this moment.
+            $sql = "DELETE FROM ".$table_qui." WHERE id <> -1 AND id IN(".$ids.")";
+            Database::query($sql);
+            $sql = "DELETE FROM ".$table_rel." WHERE exercice_id <> -1 AND exercice_id IN(".$ids.")";
+            Database::query($sql);
+
+            // Identifying again and deletion of the orphan questions, if it was desired.
+            if ($delete_orphan_questions)
+            {
+                $sql = 'SELECT questions.id FROM '.$table_qui_que.
+                    ' as questions LEFT JOIN '.$table_rel.' as quizz_questions ON questions.id=quizz_questions.question_id LEFT JOIN '.$table_qui.
+                    ' as exercices ON exercice_id=exercices.id WHERE quizz_questions.exercice_id IS NULL OR exercices.active = -1'; // active = -1 means "deleted" test.
+                $db_result = Database::query($sql);
+                if (Database::num_rows($db_result) > 0)
+                {
+                    $orphan_ids = array();
+                    while ($obj = Database::fetch_object($db_result))
+                    {
+                        $orphan_ids[] = $obj->id;
+                    }
+                    $orphan_ids = implode(',', $orphan_ids);
+                    $sql = "DELETE FROM ".$table_rel." WHERE question_id IN(".$orphan_ids.")";
+                    Database::query($sql);
+                    $sql = "DELETE FROM ".$table_qui_ans." WHERE question_id IN(".$orphan_ids.")";
+                    Database::query($sql);
+                    $sql = "DELETE FROM ".$table_qui_que." WHERE id IN(".$orphan_ids.")";
+                    Database::query($sql);
+                }
+            }
+        }
+
+        // Purge "deleted" tests (active = -1).
+        $sql = "DELETE FROM ".$table_qui." WHERE active = -1";
+        Database::query($sql);
+    }
+    /**
+     * Recycle surveys - removes everything
+     */
+    function recycle_surveys()
+    {
+        if ($this->course->has_resources(RESOURCE_SURVEY))
+        {
+            $table_survey = Database :: get_course_table(TABLE_SURVEY);
+            $table_survey_q = Database :: get_course_table(TABLE_SURVEY_QUESTION);
+            $table_survey_q_o = Database :: get_course_table(TABLE_SURVEY_QUESTION_OPTION);
+            $table_survey_a = Database :: get_course_Table(TABLE_SURVEY_ANSWER);
+            $table_survey_i = Database :: get_course_table(TABLE_SURVEY_INVITATION);
+            $ids = implode(',', (array_keys($this->course->resources[RESOURCE_SURVEY])));
+            $sql = "DELETE FROM ".$table_survey_i." ";
+            Database::query($sql);
+            $sql = "DELETE FROM ".$table_survey_a." WHERE survey_id IN(".$ids.")";
+            Database::query($sql);
+            $sql = "DELETE FROM ".$table_survey_q_o." WHERE survey_id IN(".$ids.")";
+            Database::query($sql);
+            $sql = "DELETE FROM ".$table_survey_q." WHERE survey_id IN(".$ids.")";
+            Database::query($sql);
+            $sql = "DELETE FROM ".$table_survey." WHERE survey_id IN(".$ids.")";
+            Database::query($sql);
+        }
+    }
+    /**
+     * Recycle learnpaths
+     */
+    function recycle_learnpaths()
+    {
+        if ($this->course->has_resources(RESOURCE_LEARNPATH))
+        {
+            $table_main = Database :: get_course_table(TABLE_LP_MAIN);
+            $table_item = Database :: get_course_table(TABLE_LP_ITEM);
+            $table_view = Database :: get_course_table(TABLE_LP_VIEW);
+            $table_iv   = Database :: get_course_table(TABLE_LP_ITEM_VIEW);
+            $table_iv_int = Database :: get_course_table(TABLE_LP_IV_INTERACTION);
+            $table_tool = Database::get_course_table(TABLE_TOOL_LIST);
+            foreach($this->course->resources[RESOURCE_LEARNPATH] as $id => $learnpath)
+            {
+                // See task #875.
+                if ($learnpath->lp_type == 2)
+                {
+                    // This is a learning path of SCORM type.
+                    if (trim($learnpath->path) != '')   // A sanity check for avoiding removal of the parent folder scorm/
+                                                        // when $learnpath->path value is incorrect for some reason.
+                    {
+                        // The directory trat contains files of the SCORM package is to be deleted.
+                        $scorm_package_dir = realpath($this->course->path . 'scorm/' . $learnpath->path);
+                        rmdirr($scorm_package_dir);
+                    }
+                }
+
+                //remove links from course homepage
+                $sql = "DELETE FROM $table_tool WHERE link LIKE '%lp_controller.php%lp_id=$id%' AND image='scormbuilder.gif'";
+                Database::query($sql);
+                //remove elements from lp_* tables (from bottom-up) by removing interactions, then item_view, then views and items, then paths
+                $sql_items = "SELECT id FROM $table_item WHERE lp_id=$id";
+                $res_items = Database::query($sql_items);
+                while ($row_item = Database::fetch_array($res_items))
+                {
+                    //get item views
+                    $sql_iv = "SELECT id FROM $table_iv WHERE lp_item_id=".$row_item['id'];
+                    $res_iv = Database::query($sql_iv);
+                    while ($row_iv = Database::fetch_array($res_iv))
+                    {
+                        //delete interactions
+                        $sql_iv_int_del = "DELETE FROM $table_iv_int WHERE lp_iv_id = ".$row_iv['id'];
+                        $res_iv_int_del = Database::query($sql_iv_int_del);
+                    }
+                    //delete item views
+                    $sql_iv_del = "DELETE FROM $table_iv WHERE lp_item_id=".$row_item['id'];
+                    $res_iv_del = Database::query($sql_iv_del);
+                }
+                //delete items
+                $sql_items_del = "DELETE FROM $table_item WHERE lp_id=$id";
+                $res_items_del = Database::query($sql_items_del);
+                //delete views
+                $sql_views_del = "DELETE FROM $table_view WHERE lp_id=$id";
+                $res_views_del = Database::query($sql_views_del);
+                //delete lps
+                $sql_del = "DELETE FROM $table_main WHERE id = $id";
+                $res_del = Database::query($sql_del);
+            }
+        }
+    }
+    /**
+     * Delete course description
+     */
+    function recycle_cours_description()
+    {
+        if ($this->course->has_resources(RESOURCE_COURSEDESCRIPTION))
+        {
+            $table = Database :: get_course_table(TABLE_COURSE_DESCRIPTION);
+            $ids = implode(',', (array_keys($this->course->resources[RESOURCE_COURSEDESCRIPTION])));
+            $sql = "DELETE FROM ".$table." WHERE id IN(".$ids.")";
+            Database::query($sql);
+        }
+    }
 }

+ 6 - 6
main/exercice/question_list_admin.inc.php

@@ -139,15 +139,15 @@ if ($nbrQuestions) {
             $actions =  Display::tag('div',$edit_link.$delete_link, array('style'=>'float:right'));
 
             echo '<div id="question_id_list_'.$id.'" >';                  
-            $move = Display::return_icon('move.png',get_lang('Move'), array('class'=>'moved'));            
-		    echo Display::tag('h3','<a href="#">'.$move.' '.$objQuestionTmp->selectTitle().'</a>');            
-                echo '<div>';
-                    echo '<p>';			  	
+            $move = Display::return_icon('move.png',get_lang('Move'), array('class'=>'moved', 'style'=>'margin-bottom:-0.5em;'));            
+		    echo Display::tag('h3','<a href="#">'.$move.' '.$objQuestionTmp->selectTitle().' <span style="float: right; padding-top: 0.3em;">['.get_lang('QualificationNumeric').': '.$objQuestionTmp->selectWeighting().']</span></a>');            
+                echo '<div class="question-list-description-block">';
+                    echo '<p>';
                         echo $actions;
                         echo get_lang($question_class.$label);
-                        echo '<br />';                        
+                        echo '<br />';
                         echo get_lang('Level').': '.$objQuestionTmp->selectLevel();
-                        echo '<br />';                        
+                        echo '<br />';
                         showQuestion($id, false, '', '',false, true);                   
                     echo '</p>';
                     

+ 2 - 2
main/inc/lib/fckeditor/toolbars/extended/admin_templates.php

@@ -22,7 +22,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
 	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
@@ -36,7 +36,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 3 - 4
main/inc/lib/fckeditor/toolbars/extended/agenda.php

@@ -8,8 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Doesn't include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, 'asciimath' don't run here.
-//NOTE: Don't include 'JustifyRight','JustifyFull' 'FontSize',into single bar due to reasons of space to display
+//TODO: DocProps doesn`t run here.
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {
@@ -23,7 +22,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter'),
 	array('FontFormat','FontName','Bold','Italic','Underline','TextColor','BGColor'),
@@ -37,7 +36,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 3 - 3
main/inc/lib/fckeditor/toolbars/extended/agenda_student.php

@@ -8,7 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Doesn't include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, 'asciimath' don't run here.
+//TODO: DocProps does not run here.
 //NOTE: Don't include 'JustifyRight','JustifyFull' 'FontSize',into single bar due to reasons of space to display
 //NOTE: ONLY FOR TEACHERS: source, insert html
 
@@ -24,7 +24,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter'),
 	array('FontFormat','FontName','Bold','Italic','Underline','TextColor','BGColor'),
@@ -38,7 +38,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 3 - 4
main/inc/lib/fckeditor/toolbars/extended/announcements.php

@@ -8,7 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Doesn't include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, ASCIIMath don't run ok here. 
+//TODO: DocProps does not run ok here. Care if the page is mailed=>review some buttons
 //NOTE: Doesn't include Save button due to usability reasons in the form.
 
 // Hide/show SpellCheck buttom
@@ -23,7 +23,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
 	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
@@ -37,7 +37,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
@@ -47,7 +47,6 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Style','FontFormat','FontName','FontSize'),	
 	array('PageBreak','ShowBlocks','Source'),
 	array('FitWindow')
-	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 3 - 3
main/inc/lib/fckeditor/toolbars/extended/announcements_student.php

@@ -8,7 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, ASCIIMath don't run ok here. 
+//TODO: DocProps, does not run ok here. 
 //NOTE: ONLY FOR TEACHERS: source, insert html
 //NOTE: Doesn't include Save button due to usability reasons in the form.
 
@@ -24,7 +24,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
 	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
@@ -38,7 +38,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/extended/documents.php

@@ -7,7 +7,7 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
-//NOTE: Does not include Replace because it is redundant, being in the same tab to Find
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find.
 //TODO: DocProps, fckeditor_wiris_openFormulaEditor,fckeditor_wiris_openCAS don't run ok here.
 
 // Hide/show SpellCheck buttom

+ 2 - 2
main/inc/lib/fckeditor/toolbars/extended/documents_student.php

@@ -23,7 +23,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
 	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
@@ -37,7 +37,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/extended/faq.php

@@ -9,7 +9,7 @@
 // This is the visible toolbar set when the editor has "normal" size.
 
 //NOTE: Doesn't include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, asciimath don't run ok here. 
+//TODO: DocProps, 'asciimath','asciisvg' don't run ok here. 
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {

+ 34 - 24
main/inc/lib/fckeditor/toolbars/extended/forum.php

@@ -7,37 +7,47 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find
+
+//TODO: DocProps does not run ok here. Button templates: lost templates styles
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-    array('Save','FitWindow','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink','Anchor'),
-    array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-    array('Table','SpecialChar'),
-    array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'),
-    '/',
-    array('Style','FontFormat','FontName','FontSize'),
-    array('Bold','Italic','Underline'),
-    array('JustifyLeft','JustifyCenter','JustifyRight')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','Save','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('mimetex','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('Save','NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 33 - 24
main/inc/lib/fckeditor/toolbars/extended/forum_student.php

@@ -7,38 +7,47 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find
+
+//TODO: DocProps does not run ok here. Button templates: lost templates styles
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('Save','FitWindow','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink','Anchor'),
-    array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-    array('Table','SpecialChar'),
-    array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',
-    array('Style','FontFormat','FontName','FontSize'),
-    array('Bold','Italic','Underline'),
-    array('JustifyLeft','JustifyCenter','JustifyRight'),
-	array('ShowBlocks')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','Save','NewPage','Preview'),
+	array('Save','NewPage','Templates','-','Preview','Print'),
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('mimetex','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks')
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 3 - 4
main/inc/lib/fckeditor/toolbars/extended/global_agenda.php

@@ -6,8 +6,7 @@
 // Global Agenda
 
 //NOTE: Doesn't include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, 'asciimath' don't run here.
-//NOTE: Don't include ' 'JustifyRight','JustifyFull' 'FontSize',into single bar due to reasons of space to display
+//TODO: DocProps doesn`t run here.
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {
@@ -21,7 +20,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter'),
 	array('FontFormat','FontName','Bold','Italic','Underline','TextColor','BGColor'),
@@ -35,7 +34,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 32 - 24
main/inc/lib/fckeditor/toolbars/extended/glossary.php

@@ -7,37 +7,45 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//TODO: DocProps does not run ok here. 
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('Save','FitWindow','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink','Anchor'),
-    array('Image','mimetex'),
-    array('Table','SpecialChar'),
-    array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-    '/',
-    array('Style','FontFormat','FontName','FontSize'),
-    array('Bold','Italic','Underline'),
-    array('JustifyLeft','JustifyCenter','JustifyRight')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','Save','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('mimetex','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('Save','NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 1 - 1
main/inc/lib/fckeditor/toolbars/extended/introduction.php

@@ -8,7 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps,  asciimath don't run ok here. Templates loses styles
+//TODO: DocProps does not run ok here. Templates loses styles
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {

+ 34 - 16
main/inc/lib/fckeditor/toolbars/extended/learning_path_author.php

@@ -7,29 +7,47 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. To be a sensitive site, do not enable extended bar
+//TODO: DocProps does not run. Many buttons don't run here. needs an overhaul
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+    $VSpellCheck='SpellCheck';
+}
+else{
+    $VSpellCheck='';
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('Link','Unlink','Bold','Italic','TextColor','BGColor','Source')
+    //array('PasteWord'),
+    //array('Link','Image','flvPlayer','mimetex'),
+	//array('Table'),
+    //array('OrderedList','Rule'),
+    //array('JustifyFull'),
+    //array('Bold','Italic','Underline','TextColor','BGColor'),
+    array('Link','Unlink','Bold','Italic','TextColor','BGColor','Source'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks')
+    //array('Save','NewPage','Templates','-','Preview','Print'),
+    //array('Cut','Copy','Paste','PasteText','PasteWord'),
+    //array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+    //array('Link','Unlink','Anchor','Glossary'),
+    //array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg'),
+'/',
+    //array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+    //array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+    //array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
+    //array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+    //array($VSpellCheck),
+    //array('Style','FontFormat','FontName','FontSize'),
+    array('PageBreak','ShowBlocks','Source'),
+    array('FitWindow')
+
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 35 - 23
main/inc/lib/fckeditor/toolbars/extended/learning_path_documents.php

@@ -7,35 +7,47 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find.
+//TODO: DocProps, Save, fckeditor_wiris_openFormulaEditor,fckeditor_wiris_openCAS don't run ok here.
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+    $VSpellCheck='SpellCheck';
+}
+else{
+    $VSpellCheck='';
+}
+
+// This is the visible toolbar set when the editor has "normal" size.
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-    array('PasteWord','-','Undo','Redo'),
-    array('Link','Unlink','Anchor','Glossary'),
-    array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath','asciisvg','Table','SpecialChar'),
-    array('Outdent','Indent','TextColor','BGColor','-','OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight'),
-    '/',
-    array('Style','FontFormat','FontName','FontSize'),
-    array('Bold','Italic','Underline','-','Source'),
-);//save, FitWindow don't run well here
+    array('NewPage','Templates','-','PasteWord'),
+    array('Undo','Redo'),
+    array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+    array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+    array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
+    array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+    array('FitWindow')
+);
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-    array('FitWindow','DocProps','-','Save','NewPage','Preview','-','Templates'),
-    array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-    array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-    array('Link','Unlink','Anchor','Glossary'),
-    '/',
-    array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-    array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-    array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-    array('Rule','SpecialChar','PageBreak'),
-    array('mimetex','asciimath','asciisvg','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'),
-    '/',
-    array('Style','FontFormat','FontName','FontSize'),
-    array('TextColor','BGColor'),
-    array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-    array('ShowBlocks','Source')
+	array('Save','NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')
+	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 33 - 24
main/inc/lib/fckeditor/toolbars/extended/messages.php

@@ -7,37 +7,46 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Doesn't include Replace because it is redundant, being in the same tab to Find
+//TODO: DocProps does not run ok here. Care if the page is mailed=>review some buttons
+//NOTE: Doesn't include Save button due to usability reasons in the form.
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
-$config['ToolbarSets']['Normal'] = array(	
-	array('Link','Unlink'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','Smiley'),
-	array('TextColor','BGColor'),
-	array('Source'),
-	'/',
-	array('FontName','FontSize'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList')	
+$config['ToolbarSets']['Normal'] = array(
+	array('NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+	array('UnorderedList','OrderedList','Rule'),
+	array('JustifyLeft','JustifyCenter'),
+	array('FontFormat','FontName','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','NewPage','Preview'),
+	array('NewPage','Templates','-','Preview','Print'),
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('mimetex','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks')
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 3 - 3
main/inc/lib/fckeditor/toolbars/extended/notebook.php

@@ -8,7 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, ASCIIMath don't run ok here. 
+//TODO: DocProps does not run ok here. 
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {
@@ -22,7 +22,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
 	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
@@ -36,7 +36,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 3 - 3
main/inc/lib/fckeditor/toolbars/extended/notebook_student.php

@@ -8,7 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps, ASCIIMath don't run ok here. 
+//TODO: DocProps does not run ok here. 
 //NOTE: ONLY FOR TEACHERS: source, insert html
 
 // Hide/show SpellCheck buttom
@@ -23,7 +23,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
 	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
@@ -37,7 +37,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 33 - 24
main/inc/lib/fckeditor/toolbars/extended/portal_home_page.php

@@ -7,37 +7,46 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find
+
+//TODO: DocProps does not run ok here. 
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('NewPage','Templates','Save','Print','PageBreak','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','-','Find'),
-	array('Link','Unlink','Anchor'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','Smiley','SpecialChar','googlemaps'),
-	'/',
-	array('FontFormat','FontName','FontSize'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-	array('Source')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','Save','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('Save','NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 33 - 24
main/inc/lib/fckeditor/toolbars/extended/portal_news.php

@@ -7,37 +7,46 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Doesn't include Replace because it is redundant, being in the same tab to Find
+//TODO: DocProps does not run ok here. Care if the page is mailed=>review some buttons
+//NOTE: Doesn't include Save button due to usability reasons in the form.
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('Save','FitWindow','PasteWord','-','Undo','Redo'),
-    array('Link','Unlink','Anchor'),
-    array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-    array('Table','SpecialChar'),
-    array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-    '/',
-    array('Style','FontFormat','FontName','FontSize'),
-    array('Bold','Italic','Underline'),
-    array('JustifyLeft','JustifyCenter','JustifyRight')
+	array('NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','Save','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 33 - 23
main/inc/lib/fckeditor/toolbars/extended/profile.php

@@ -7,37 +7,47 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. Usability: doenst show save buttom
+
+//TODO: DocProps does not run ok here. Also 'asciisvg' buttom (their presence means that not all forms can unfold and refold)
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink','Anchor'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','Smiley'),
-	'/',
-	array('FontName','FontSize'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
-	array('Source')
+	array('NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','NewPage','Preview'),
+	array('NewPage','Templates','-','Preview','Print'),
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks')
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 34 - 23
main/inc/lib/fckeditor/toolbars/extended/project.php

@@ -7,36 +7,47 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find
+
+//TODO: DocProps does not run ok here.  asciisvg' disabled because sometimes lock the toolbar.
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink','Anchor'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','googlemaps'),
-	array('FontName','FontSize'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
-	array('Source')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('UnorderedList','OrderedList','Rule'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','TextColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','-','Save','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('Save','NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 32 - 22
main/inc/lib/fckeditor/toolbars/extended/project_comment.php

@@ -7,35 +7,45 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//TODO: DocProps does not run ok here.  asciisvg' disabled because sometimes lock the toolbar
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','googlemaps'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
-	array('Source')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('UnorderedList','OrderedList','Rule'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','TextColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','-','Save','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('Save','NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 33 - 21
main/inc/lib/fckeditor/toolbars/extended/project_comment_student.php

@@ -7,35 +7,47 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+// This is the visible toolbar set when the editor has "normal" size.
+//TODO: DocProps does not run ok here.  asciisvg' disabled because sometimes lock the toolbar
+//NOTE: ONLY FOR TEACHERS: source, insert html
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','googlemaps'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
-	array('ShowBlocks')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('UnorderedList','OrderedList','Rule'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','TextColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','-','Save','NewPage','Preview'),
+	array('Save','NewPage','Templates','-','Preview','Print'),
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks')
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 32 - 22
main/inc/lib/fckeditor/toolbars/extended/project_student.php

@@ -7,36 +7,46 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//TODO: DocProps does not run ok here.  asciisvg' disabled because sometimes lock the toolbar.
+//NOTE: ONLY FOR TEACHERS: source, insert html
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),
-	array('Link','Unlink','Anchor'),
-	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-	array('Table','googlemaps'),
-	array('FontName','FontSize'),
-	array('Bold','Italic','Underline'),
-	array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
-	array('ShowBlocks')
+	array('Save','NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('UnorderedList','OrderedList','Rule'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','TextColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','-','Save','NewPage','Preview'),
+	array('Save','NewPage','Templates','-','Preview','Print'),
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks')
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 34 - 22
main/inc/lib/fckeditor/toolbars/extended/survey.php

@@ -7,36 +7,48 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+// This is the visible toolbar set when the editor has "normal" size.
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. Usability: Hide save button.
+
+//TODO: DocProps does not run ok here. 
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow'),
-	array('Link','Unlink'),
-	array('Image'),
-	array('Table'),
-	array('FontSize'),
-	array('Bold','Italic'),
-	array('OrderedList','UnorderedList','-','TextColor'),
-	array('Source')
+	array('NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
+	array('UnorderedList','OrderedList','Rule'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','NewPage','Preview'),
+	array('NewPage','Templates','-','Preview','Print'),
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 35 - 10
main/inc/lib/fckeditor/toolbars/extended/test_free_answer.php

@@ -7,23 +7,48 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. Usability: Save button disabled
+//NOTE: ONLY FOR TEACHERS: source, insert html
+
+//TODO: DocProps does not run ok here. Sometime 'asciisvg' lock the tool bar
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-    array('FitWindow','Bold','Image','Link','PasteWord','MP3','mimetex','Table','Subscript','Superscript','ShowBlocks')
+	array('NewPage','Templates','-','PasteText'),
+	array('Undo','Redo'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
+
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow'),
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent'),
-	array('JustifyLeft','JustifyCenter','JustifyRight'),
-	array('Undo','Redo','-','SelectAll','RemoveFormat'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('SpecialChar','mimetex')
+	array('NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 32 - 10
main/inc/lib/fckeditor/toolbars/extended/test_proposed_answer.php

@@ -7,23 +7,45 @@
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. Usability: disabled save button
+//TODO: DocProps, does run ok here.
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
+
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-    array('FitWindow','Bold','Image','Link','PasteWord','MP3','mimetex','Table','Subscript','Superscript','Source')
+    array('Templates'),
+	array('PasteWord'),
+	array('Link'),
+	array('Image','flvPlayer','mimetex','asciimath','asciisvg'),
+	array('Table'),
+	array('Bold'),
+	array('FitWindow')	
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow'),
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent'),
-	array('JustifyLeft','JustifyCenter','JustifyRight'),
-	array('Undo','Redo','-','SelectAll','RemoveFormat'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('SpecialChar','mimetex')
+	array('NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 33 - 24
main/inc/lib/fckeditor/toolbars/extended/test_question_description.php

@@ -6,38 +6,47 @@
 // Test, question description
 
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
+//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. Usability: disabled save button (new test)
+
+//TODO: DocProps, asciimath don't run ok here. Unlink button after link button is mandatory
+
+// Hide/show SpellCheck buttom
+if ((api_get_setting('allow_spellcheck') == 'true')) {
+	$VSpellCheck='SpellCheck';
+}
+else{
+	$VSpellCheck='';	
+}
 
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),
-    array('Link','Unlink'),
-    array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
-    array('Table','SpecialChar'),
-    array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-    '/',
-    array('Style','FontFormat','FontName','FontSize'),
-    array('Bold','Italic','Underline'),
-    array('JustifyLeft','JustifyCenter','JustifyRight')
+	array('NewPage','Templates','-','PasteWord'),
+	array('Undo','Redo'),
+	array('Link','Unlink','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),	
+   	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
+	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
+	array('FitWindow')
 );
 
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('FitWindow','Save','NewPage','Preview'),
-	array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'),
-	array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
-	array('Link','Unlink','Anchor'),
-	'/',
-	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'),
-	array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
-	array('Rule','SpecialChar'),
-	array('mimetex','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','Smiley'),
-	'/',
-	array('Style','FontFormat','FontName','FontSize'),
-	array('TextColor','BGColor'),
-	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'),
-	array('ShowBlocks','Source')
+	array('NewPage','Templates','-','Preview','Print'),
+	array('Cut','Copy','Paste','PasteText','PasteWord'),
+	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
+	array('Link','Unlink','Anchor','Glossary'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+'/',
+	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
+	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
+	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),	
+	array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
+	array($VSpellCheck),	
+	array('Style','FontFormat','FontName','FontSize'),	
+	array('PageBreak','ShowBlocks','Source'),
+	array('FitWindow')
+	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 4 - 5
main/inc/lib/fckeditor/toolbars/extended/training_description.php

@@ -8,7 +8,7 @@
 // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find
-//TODO: DocProps,  asciimath, don't run ok here. Templates loses styles
+//TODO: DocProps, does run ok here. Templates loses styles
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {
@@ -22,7 +22,7 @@ else{
 $config['ToolbarSets']['Normal'] = array(
 	array('Save','NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
-	array('Link','Image','flvPlayer','Table','mimetex'),
+	array('Link','Image','flvPlayer','Table','mimetex','asciimath','asciisvg'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
 	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
 	array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'),
@@ -36,7 +36,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
@@ -45,8 +45,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array($VSpellCheck),	
 	array('Style','FontFormat','FontName','FontSize'),	
 	array('PageBreak','ShowBlocks','Source'),
-	array('FitWindow')
-	
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 2 - 3
main/inc/lib/fckeditor/toolbars/extended/wiki.php

@@ -9,7 +9,7 @@
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find
 
-//TODO: DocProps, asciimath don't run ok here. 
+//TODO: DocProps does not run ok here. 
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {
@@ -47,8 +47,7 @@ $config['ToolbarSets']['Maximized'] = array(
 	array($VSpellCheck),	
 	array('Style','FontFormat','FontName','FontSize'),	
 	array('PageBreak','ShowBlocks','Source'),
-	array('FitWindow')
-	
+	array('FitWindow')	
 );
 
 // Sets whether the toolbar can be collapsed/expanded or not.

+ 2 - 1
main/inc/lib/fckeditor/toolbars/extended/wiki_feedback.php

@@ -9,7 +9,8 @@
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find.
 
-//TODO: DocProps, asciimath don't run ok here. 
+//TODO: DocProps, asciimath don't run ok here
+
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {

+ 2 - 2
main/inc/lib/fckeditor/toolbars/extended/wiki_student.php

@@ -34,11 +34,11 @@ $config['ToolbarSets']['Normal'] = array(
 // This is the visible toolbar set when the editor is maximized.
 // If it has not been defined, then the toolbar set for the "normal" size is used.
 $config['ToolbarSets']['Maximized'] = array(
-	array('Save','NewPage','-','Preview','Print'),
+	array('Save','NewPage','Templates','-','Preview','Print'),
 	array('Cut','Copy','Paste','PasteText','PasteWord'),
 	array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
 	array('Wikilink','Link','Unlink','Anchor','Glossary'),
-	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
+	array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','asciimath','asciisvg','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
 '/',
 	array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),

+ 3 - 3
main/inc/lib/fckeditor/toolbars/extended/wiki_task.php

@@ -9,7 +9,7 @@
 
 //NOTE: Does not include Replace because it is redundant, being in the same tab to Find.
 
-//TODO: DocProps, asciimath don't run ok here. 
+//TODO: DocProps, asciimath, asciisvg don't run ok here. 
 
 // Hide/show SpellCheck buttom
 if ((api_get_setting('allow_spellcheck') == 'true')) {
@@ -21,11 +21,11 @@ else{
 
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
-	array('NewPage','Templates','-','PasteText'),
+	array('NewPage','Templates','-','PasteWord'),
 	array('Undo','Redo'),
 	array('Link','Image','flvPlayer','Table','mimetex'),
 	array('UnorderedList','OrderedList','Rule','-','Outdent','Indent'),
-	array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
+	array('JustifyLeft','JustifyCenter','JustifyFull'),
 	array('FontFormat','FontName','Bold','Italic','Underline','TextColor','BGColor'),
 	array('FitWindow')
 );