diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php
index 82f2cd3654..230aba38b6 100755
--- a/main/forum/forumfunction.inc.php
+++ b/main/forum/forumfunction.inc.php
@@ -66,12 +66,31 @@
* -- Patrick Cool
**************************************************************************
*/
+require_once '../inc/global.inc.php';
require_once(api_get_path(LIBRARY_PATH).'mail.lib.inc.php');
require_once(api_get_path(LIBRARY_PATH).'text.lib.php');
require_once(api_get_path(INCLUDE_PATH).'/conf/mail.conf.php');
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'text.lib.php');
get_notifications_of_user();
+
+/*
+-----------------------------------------------------------
+ Javascript
+-----------------------------------------------------------
+*/
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
+
+
+
/**
* This function handles all the forum and forumcategories actions. This is a wrapper for the
* forum and forum categories. All this code code could go into the section where this function is
@@ -152,7 +171,7 @@ function show_add_forumcategory_form($inputvalues=array()) {
// settting the form elements
$form->addElement('header', '', get_lang('AddForumCategory'));
- $form->addElement('text', 'forum_category_title', get_lang('Title'),'class="input_titles"');
+ $form->addElement('text', 'forum_category_title', get_lang('Title'),'class="input_titles" id="title"');
//$form->applyFilter('forum_category_title', 'html_filter');
$form->addElement('html_editor', 'forum_category_comment', get_lang('Comment'), null, array('ToolbarSet' => 'Forum', 'Width' => '98%', 'Height' => '200'));
//$form->applyFilter('forum_category_comment', 'html_filter');
@@ -206,7 +225,7 @@ function show_add_forum_form($inputvalues=array()) {
$form->addElement('hidden', 'forum_id', $my_forum_id);
}
// The title of the forum
- $form->addElement('text', 'forum_title', get_lang('Title'),'class="input_titles"');
+ $form->addElement('text', 'forum_title', get_lang('Title'),'class="input_titles" id="title"');
//$form->applyFilter('forum_title', 'html_filter');
// The comment of the forum
$form->addElement('html_editor', 'forum_comment', get_lang('Comment'), null, array('ToolbarSet' => 'Forum', 'Width' => '98%', 'Height' => '200'));
@@ -1847,7 +1866,7 @@ function store_thread($values) {
$message.=get_lang('ReturnTo').' '.get_lang('Forum').' ';
} else {
$message.=get_lang('ReturnTo').' '.get_lang('Forum').' ';
- $message.=get_lang('ReturnTo').' '.get_lang('Message').' ';
+ $message.=get_lang('ReturnTo').' '.get_lang('Message').' ';
}
$reply_info['new_post_id'] = $last_post_id;
$my_post_notification=isset($values['post_notification']) ? $values['post_notification'] : null;
@@ -2302,9 +2321,9 @@ function store_reply($values) {
if ($current_forum['approval_direct_post']=='1' AND !api_is_allowed_to_edit(null,true)) {
$message.=' '.get_lang('MessageHasToBeApproved').' ';
}
-
- $message.=' '.get_lang('ReturnTo').' '.get_lang('Forum').' ';
- $message.=get_lang('ReturnTo').' '.get_lang('Message').' ';
+
+ $message.=' '.get_lang('ReturnTo').' '.get_lang('Forum').' ';
+ $message.=get_lang('ReturnTo').' '.get_lang('Message').' ';
// setting the notification correctly
$my_post_notification=isset($values['post_notification']) ? $values['post_notification'] :null;
@@ -3204,7 +3223,7 @@ function forum_search() {
// settting the form elements
$form->addElement('header', '', get_lang('ForumSearch'));
- $form->addElement('text', 'search_term', get_lang('SearchTerm'),'class="input_titles"');
+ $form->addElement('text', 'search_term', get_lang('SearchTerm'),'class="input_titles" id="title"');
$form->applyFilter('search_term', 'html_filter');
$form->addElement('static', 'search_information', '', get_lang('ForumSearchInformation')/*, $dissertation[$_GET['opleidingsonderdeelcode']]['code']*/);
$form->addElement('style_submit_button', null, get_lang('Search'), 'class="search"');
diff --git a/main/glossary/index.php b/main/glossary/index.php
index 00359263de..4159d0e28c 100755
--- a/main/glossary/index.php
+++ b/main/glossary/index.php
@@ -23,7 +23,15 @@ require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'
// additional javascript
$htmlHeadXtra[] = javascript_glossary();
-
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
// setting the tool constants
$tool = TOOL_GLOSSARY;
@@ -58,7 +66,7 @@ if (api_is_allowed_to_edit(null,true)) {
$form = new FormValidator('glossary','post', api_get_self().'?action='.Security::remove_XSS($_GET['action']));
// settting the form elements
$form->addElement('header', '', get_lang('TermAddNew'));
- $form->addElement('text', 'glossary_title', get_lang('TermName'), array('size'=>'95'));
+ $form->addElement('text', 'glossary_title', get_lang('TermName'), array('size'=>'95', 'id'=>'glossary_title'));
//$form->applyFilter('glossary_title', 'html_filter');
$form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Width' => '100%', 'Height' => '300'));
$form->addElement('style_submit_button', 'SubmitGlossary', get_lang('TermAddButton'), 'class="save"');
diff --git a/main/gradebook/lib/fe/evalform.class.php b/main/gradebook/lib/fe/evalform.class.php
index b2539cc2e2..8d0299b09a 100755
--- a/main/gradebook/lib/fe/evalform.class.php
+++ b/main/gradebook/lib/fe/evalform.class.php
@@ -32,6 +32,18 @@ require_once (api_get_path(LIBRARY_PATH) . 'formvalidator/FormValidator.class.ph
* @author Stijn Konings
* @package dokeos.gradebook
*/
+
+ $htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
+
+
class EvalForm extends FormValidator
{
const TYPE_ADD= 1;
@@ -313,7 +325,8 @@ class EvalForm extends FormValidator
$this->addElement('hidden', 'hid_course_code');
$this->add_textfield('name', get_lang('EvaluationName'), true, array (
'size' => '54',
- 'maxlength' => '50'
+ 'maxlength' => '50',
+ 'id' => 'title'
));
$this->add_textfield('weight', get_lang('Weight'), true, array (
'size' => '4',
diff --git a/main/group/group_creation.php b/main/group/group_creation.php
index 4f7bbcd924..6d8e243baf 100755
--- a/main/group/group_creation.php
+++ b/main/group/group_creation.php
@@ -282,7 +282,7 @@ EOT;
$form->addGroup($group_el, 'group_'.$group_number, null, '', false);
}
$defaults['action'] = 'create_groups';
- $defaults['number_of_groups'] = $_POST['number_of_groups'];
+ $defaults['number_of_groups'] = intval($_POST['number_of_groups']);
$form->setDefaults($defaults);
$form->addElement('style_submit_button', 'submit', get_lang('CreateGroup'), 'class="save"');
$form->display();
diff --git a/main/inc/global_error_message.inc.php b/main/inc/global_error_message.inc.php
index aa9e2791a9..486bbade73 100755
--- a/main/inc/global_error_message.inc.php
+++ b/main/inc/global_error_message.inc.php
@@ -12,7 +12,7 @@
*/
$Organisation = 'Dokeos Homepage ';
-$PoweredBy = 'Platform Dokeos © 2009';
+$PoweredBy = 'Platform Dokeos © '.date('Y');
/**
* English language variables.
diff --git a/main/inc/lib/group_portal_manager.lib.php b/main/inc/lib/group_portal_manager.lib.php
index 6da9b63355..65f3e38e4f 100755
--- a/main/inc/lib/group_portal_manager.lib.php
+++ b/main/inc/lib/group_portal_manager.lib.php
@@ -863,7 +863,7 @@ class GroupPortalManager
*/
public static function show_group_column_information($group_id, $user_id, $show = '') {
- global $relation_group_title;
+ global $relation_group_title, $my_group_role;
$group_info = GroupPortalManager::get_group_data($group_id);
$picture = GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],160,'medium_');
diff --git a/main/inc/lib/message.lib.php b/main/inc/lib/message.lib.php
index 669a494802..8677e93e81 100755
--- a/main/inc/lib/message.lib.php
+++ b/main/inc/lib/message.lib.php
@@ -827,6 +827,8 @@ class MessageManager
* @param int group id
*/
public static function display_messages_for_group($group_id) {
+
+ global $my_group_role;
$rows = self::get_messages_by_group($group_id);
$rows = self::calculate_children($rows);
@@ -884,10 +886,12 @@ class MessageManager
$html .= ' ';
$html.= '';
$html.= '
';
$html.= '
';
$html.= '
';
@@ -913,7 +917,8 @@ class MessageManager
$html_items.= '
';
diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php
index 43aff2198d..9a11a3b72f 100755
--- a/main/newscorm/learnpath.class.php
+++ b/main/newscorm/learnpath.class.php
@@ -12,6 +12,20 @@
* Defines the learnpath parent class
* @package dokeos.learnpath
*/
+
+// including the global file
+require_once '../inc/global.inc.php';
+
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
+
class learnpath {
var $attempt = 0; //the number for the current ID view
diff --git a/main/newscorm/lp_add.php b/main/newscorm/lp_add.php
index 2efcbae8a9..f5d1dc655d 100755
--- a/main/newscorm/lp_add.php
+++ b/main/newscorm/lp_add.php
@@ -65,6 +65,15 @@ $currentstyle = api_get_setting('stylesheets');
//$htmlHeadXtra[] = '
';
//$htmlHeadXtra[] = '
'; //will be a merged with original learnpath.css
$htmlHeadXtra[] = '
'; //will be moved
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
/*
-----------------------------------------------------------
Constants and variables
diff --git a/main/notebook/index.php b/main/notebook/index.php
index 981396a022..e04d22a5be 100755
--- a/main/notebook/index.php
+++ b/main/notebook/index.php
@@ -26,6 +26,16 @@ require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
// additional javascript
$htmlHeadXtra[] = javascript_notebook();
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
+
// setting the tool constants
$tool = TOOL_NOTEBOOK;
@@ -70,7 +80,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'addnote')
$form = new FormValidator('note','post', api_get_self().'?action='.Security::remove_XSS($_GET['action']));
// settting the form elements
$form->addElement('header', '', get_lang('NoteAddNew'));
- $form->addElement('text', 'note_title', get_lang('NoteTitle'),array('size'=>'95'));
+ $form->addElement('text', 'note_title', get_lang('NoteTitle'),array('size'=>'95', 'id'=> 'notetitle'));
//$form->applyFilter('note_title', 'html_filter');
$form->addElement('html_editor', 'note_comment', get_lang('NoteComment'), null, api_is_allowed_to_edit()
? array('ToolbarSet' => 'Notebook', 'Width' => '100%', 'Height' => '300')
diff --git a/main/social/groups.php b/main/social/groups.php
index 68bed59d14..ba0f227f78 100755
--- a/main/social/groups.php
+++ b/main/social/groups.php
@@ -184,7 +184,7 @@ if (isset($_POST['token']) && $_POST['token'] === $_SESSION['sec_token']) {
// getting group information
$group_id = intval($_GET['id']);
$relation_group_title = '';
-
+$my_group_role = 0;
if ($group_id != 0 ) {
$user_leave_message = false;
$user_added_group_message = false;
diff --git a/main/survey/create_new_survey.php b/main/survey/create_new_survey.php
index de284267a6..7e14b856f7 100755
--- a/main/survey/create_new_survey.php
+++ b/main/survey/create_new_survey.php
@@ -34,21 +34,9 @@
$language_file = 'survey';
// including the global dokeos file
-require_once ('../inc/global.inc.php');
-$this_section=SECTION_COURSES;
-
-$htmlHeadXtra[] = '';
+$this_section=SECTION_COURSES;
// including additional libraries
/** @todo check if these are all needed */
@@ -63,6 +51,26 @@ require_once (api_get_path(LIBRARY_PATH)."/groupmanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
+
// Database table definitions
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
@@ -147,7 +155,7 @@ if ($_GET['action'] == 'edit' AND isset($survey_id) AND is_numeric($survey_id))
$form->addElement('hidden', 'survey_id');
}
-$survey_code = $form->addElement('text', 'survey_code', get_lang('SurveyCode'), array('size' => '20','maxlength'=>'20'));
+$survey_code = $form->addElement('text', 'survey_code', get_lang('SurveyCode'), array('size' => '20','maxlength'=>'20', 'id'=>'SurveyCode'));
//$form->applyFilter('survey_code', 'html_filter');
if ($_GET['action'] == 'edit') {
diff --git a/main/survey/survey.lib.php b/main/survey/survey.lib.php
index f8f2418f88..269e58dcda 100755
--- a/main/survey/survey.lib.php
+++ b/main/survey/survey.lib.php
@@ -30,7 +30,20 @@
* @todo use consistent naming for the functions (save vs store for instance)
*/
$config['survey']['debug'] = false;
+//require_once '../inc/global.inc.php';
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
+
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
+
+
class survey_manager
{
/******************************************************************************************************
@@ -4383,7 +4396,7 @@ class SurveyUtil {
'.get_lang('Title').'
-
+
';
echo '
diff --git a/main/survey/survey_list.php b/main/survey/survey_list.php
index 8bfc40aa66..3fc3f267a1 100755
--- a/main/survey/survey_list.php
+++ b/main/survey/survey_list.php
@@ -39,7 +39,7 @@ if (!isset ($_GET['cidReq'])){
$cidReset = true;
}
// including the global dokeos file
-require ('../inc/global.inc.php');
+require_once '../inc/global.inc.php';
$this_section=SECTION_COURSES;
// including additional libraries
diff --git a/main/user/userInfo.php b/main/user/userInfo.php
index 57c0d73266..a8b3334b61 100755
--- a/main/user/userInfo.php
+++ b/main/user/userInfo.php
@@ -501,7 +501,7 @@ elseif ($displayMode == "viewContentList") // default display
"
\n",
"",get_lang('Name')," \n",
- "",get_lang('Description')," \n",
+ "",get_lang('Description')," \n",
//"",get_lang('Tutor')," \n",
"",get_lang('CourseManager')," \n",
($allowedToEditDef?"".get_lang('Edit')." \n":""),
@@ -515,6 +515,7 @@ elseif ($displayMode == "viewContentList") // default display
//DISPLAY TABLE CONTENT
+
// deprecated feature
if ($mainUserInfo['tutor_id'] == 1)
{
@@ -522,7 +523,7 @@ elseif ($displayMode == "viewContentList") // default display
}
else
{
- echo " - \n";
+ //echo " - \n";
}
if ($mainUserInfo['status'] == 1)
diff --git a/main/wiki/index.php b/main/wiki/index.php
index c2f2e8e6e1..94e69155f7 100755
--- a/main/wiki/index.php
+++ b/main/wiki/index.php
@@ -64,6 +64,7 @@ require_once 'wiki.inc.php';
$htmlHeadXtra[] =' ';
// javascript for advanced parameters menu
+$htmlHeadXtra[] = ''; //jQuery
$htmlHeadXtra[] = '';
@@ -1032,7 +1040,7 @@ if ($_GET['action']=='searchpages')
// settting the form elements
- $form->addElement('text', 'search_term', get_lang('SearchTerm'),'class="input_titles"');
+ $form->addElement('text', 'search_term', get_lang('SearchTerm'),'class="input_titles" id="search_term"');
$form->addElement('checkbox', 'search_content', null, get_lang('AlsoSearchContent'));
$form->addElement('style_submit_button', 'SubmitWikiSearch', get_lang('Search'), 'class="search"');
diff --git a/main/wiki/wiki.inc.php b/main/wiki/wiki.inc.php
index fa1cb503e1..56474165b8 100755
--- a/main/wiki/wiki.inc.php
+++ b/main/wiki/wiki.inc.php
@@ -32,6 +32,16 @@
* @package dokeos.wiki
*/
+$htmlHeadXtra[] = ''; //jQuery
+$htmlHeadXtra[] = '';
+
/*
==============================================================================
FUNCTIONS FOR WIKI
@@ -598,7 +608,7 @@ return true;
//form
echo '