diff --git a/main/exercise/exercise_report.php b/main/exercise/exercise_report.php
index dc43ec48c0..46aa439724 100755
--- a/main/exercise/exercise_report.php
+++ b/main/exercise/exercise_report.php
@@ -39,7 +39,6 @@ $_course = api_get_course_info();
// document path
$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path']."/document";
$origin = isset($origin) ? $origin : null;
-$gradebook = isset($gradebook) ? $gradebook : null;
$path = isset($_GET['path']) ? Security::remove_XSS($_GET['path']) : null;
/* Constants and variables */
@@ -330,10 +329,9 @@ if (($is_allowedToEdit || $is_tutor || api_is_coach()) &&
}
}
-
if ($is_allowedToEdit || $is_tutor) {
$interbreadcrumb[] = array(
- "url" => "exercise.php?gradebook=$gradebook",
+ "url" => "exercise.php?".api_get_cidreq(),
"name" => get_lang('Exercises')
);
$objExerciseTmp = new Exercise();
@@ -346,7 +344,7 @@ if ($is_allowedToEdit || $is_tutor) {
}
} else {
$interbreadcrumb[] = array(
- "url" => "exercise.php?gradebook=$gradebook",
+ "url" => "exercise.php?".api_get_cidreq(),
"name" => get_lang('Exercises')
);
$objExerciseTmp = new Exercise();
diff --git a/main/exercise/overview.php b/main/exercise/overview.php
index 959e3f3d45..2a535f09b1 100755
--- a/main/exercise/overview.php
+++ b/main/exercise/overview.php
@@ -30,14 +30,13 @@ if (!$result) {
api_not_allowed(true);
}
-$gradebook = isset($_GET['gradebook']) ? Security::remove_XSS($_GET['gradebook']) : null;
$learnpath_id = isset($_REQUEST['learnpath_id']) ? intval($_REQUEST['learnpath_id']) : null;
$learnpath_item_id = isset($_REQUEST['learnpath_item_id']) ? intval($_REQUEST['learnpath_item_id']) : null;
$learnpathItemViewId = isset($_REQUEST['learnpath_item_view_id']) ? intval($_REQUEST['learnpath_item_view_id']) : null;
$origin = api_get_origin();
$interbreadcrumb[] = array(
- "url" => "exercise.php?".api_get_path(),
+ "url" => "exercise.php?".api_get_cidreq(),
"name" => get_lang('Exercises')
);
$interbreadcrumb[] = array("url" => "#", "name" => $objExercise->selectTitle(true));
diff --git a/main/exercise/stats.php b/main/exercise/stats.php
index be44ba7f6a..b721e1e6a5 100755
--- a/main/exercise/stats.php
+++ b/main/exercise/stats.php
@@ -6,8 +6,6 @@ require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
$exercise_id = isset($_GET['exerciseId']) && !empty($_GET['exerciseId']) ? intval($_GET['exerciseId']) : 0;
-$gradebook = isset($gradebook) ? $gradebook : null;
-
$objExercise = new Exercise();
$result = $objExercise->read($exercise_id);
@@ -291,7 +289,7 @@ foreach ($data as $row_table) {
$content .= $table->toHtml();
$interbreadcrumb[] = array(
- "url" => "exercise.php?gradebook=$gradebook&".api_get_cidreq(),
+ "url" => "exercise.php?".api_get_cidreq(),
"name" => get_lang('Exercises'),
);
$interbreadcrumb[] = array(
diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php
index 5743021aa3..08e0bfc9e4 100755
--- a/main/forum/forumfunction.inc.php
+++ b/main/forum/forumfunction.inc.php
@@ -1088,7 +1088,12 @@ function return_lock_unlock_icon($content, $id, $current_lock_status, $additiona
//check if the forum is blocked due
if ($content == 'thread') {
if (api_resource_is_locked_by_gradebook($id, LINK_FORUM_THREAD)) {
- $html .= Display::return_icon('lock_na.png', get_lang('ResourceLockedByGradebook'), array(), ICON_SIZE_SMALL);
+ $html .= Display::return_icon(
+ 'lock_na.png',
+ get_lang('ResourceLockedByGradebook'),
+ array(),
+ ICON_SIZE_SMALL
+ );
return $html;
}
@@ -2588,8 +2593,6 @@ function store_thread(
$em = Database::getManager();
$table_threads = Database::get_course_table(TABLE_FORUM_THREAD);
-
- $gradebook = isset($_GET['gradebook']) ? Security::remove_XSS($_GET['gradebook']) : '';
$upload_ok = 1;
$has_attachment = false;
@@ -2651,19 +2654,15 @@ function store_thread(
1 == $values['thread_qualify_gradebook']
) {
// Add function gradebook.
- $resourcetype = 5;
- $resourceid = $lastThread->getIid();
$resourcename = stripslashes($values['calification_notebook_title']);
- $maxqualify = $values['numeric_calification'];
- $weigthqualify = $values['weight_calification'];
GradebookUtils::add_resource_to_course_gradebook(
$values['category_id'],
$courseCode,
- $resourcetype,
- $resourceid,
+ 5,
+ $lastThread->getIid(),
$resourcename,
- $weigthqualify,
- $maxqualify,
+ $values['weight_calification'],
+ $values['numeric_calification'],
'',
0,
$sessionId
@@ -2819,7 +2818,7 @@ function store_thread(
} else {
$message .= get_lang('ReturnTo').' '.
get_lang('Forum').'
';
- $message .= get_lang('ReturnTo').' '.
+ $message .= get_lang('ReturnTo').' '.
get_lang('Message').'';
}
$reply_info['new_post_id'] = $lastPostId;
@@ -2868,12 +2867,10 @@ function show_add_post_form($current_forum, $forum_setting, $action, $id = '', $
$myThread = isset($_GET['thread']) ? (int) $_GET['thread'] : '';
$forumId = isset($_GET['forum']) ? (int) $_GET['forum'] : '';
$my_post = isset($_GET['post']) ? (int) $_GET['post'] : '';
- $my_gradebook = isset($_GET['gradebook']) ? Security::remove_XSS($_GET['gradebook']) : '';
$url = api_get_self().'?'.http_build_query([
'action' => $action,
'forum' => $forumId,
- 'gradebook' => $my_gradebook,
'thread' => $myThread,
'post' => $my_post
]).'&'.api_get_cidreq();
@@ -2889,7 +2886,6 @@ function show_add_post_form($current_forum, $forum_setting, $action, $id = '', $
// Setting the form elements.
$form->addElement('hidden', 'forum_id', $forumId);
$form->addElement('hidden', 'thread_id', $myThread);
- $form->addElement('hidden', 'gradebook', $my_gradebook);
$form->addElement('hidden', 'action', $action);
// If anonymous posts are allowed we also display a form to allow the user to put his name or username in.
@@ -3698,7 +3694,6 @@ function store_edit_post($forumInfo, $values)
{
$threadTable = Database::get_course_table(TABLE_FORUM_THREAD);
$table_posts = Database::get_course_table(TABLE_FORUM_POST);
- $gradebook = Security::remove_XSS($_GET['gradebook']);
$course_id = api_get_course_int_id();
//check if this post is the first of the thread
@@ -3779,7 +3774,7 @@ function store_edit_post($forumInfo, $values)
$message = get_lang('EditPostStored').'
';
$message .= get_lang('ReturnTo').' '.get_lang('Forum').'
';
- $message .= get_lang('ReturnTo').' '.get_lang('Message').'';
+ $message .= get_lang('ReturnTo').' '.get_lang('Message').'';
Session::erase('formelements');
Session::erase('origin');
@@ -4183,11 +4178,10 @@ function send_mail($user_info = array(), $thread_information = array())
*/
function move_thread_form()
{
- $gradebook = Security::remove_XSS($_GET['gradebook']);
$form = new FormValidator(
'movepost',
'post',
- api_get_self().'?forum='.intval($_GET['forum']).'&gradebook='.$gradebook.'&thread='.intval($_GET['thread']).'&action='.Security::remove_XSS($_GET['action']).'&'.api_get_cidreq()
+ api_get_self().'?forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&action='.Security::remove_XSS($_GET['action']).'&'.api_get_cidreq()
);
// The header for the form
$form->addElement('header', get_lang('MoveThread'));
@@ -4243,12 +4237,10 @@ function move_thread_form()
*/
function move_post_form()
{
- $gradebook = Security::remove_XSS($_GET['gradebook']);
- // initiate the object
$form = new FormValidator(
'movepost',
'post',
- api_get_self().'?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&gradebook='.$gradebook.'&post='.Security::remove_XSS($_GET['post']).'&action='.Security::remove_XSS($_GET['action']).'&post='.Security::remove_XSS($_GET['post'])
+ api_get_self().'?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&post='.Security::remove_XSS($_GET['post']).'&action='.Security::remove_XSS($_GET['action']).'&post='.Security::remove_XSS($_GET['post'])
);
// The header for the form
$form->addElement('header', '', get_lang('MovePost'));
@@ -4566,7 +4558,6 @@ function display_forum_search_results($search_term)
$table_posts = Database::get_course_table(TABLE_FORUM_POST);
$table_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
$session_id = api_get_session_id();
- $gradebook = Security::remove_XSS($_GET['gradebook']);
$course_id = api_get_course_int_id();
// Defining the search strings as an array.
@@ -4648,7 +4639,7 @@ function display_forum_search_results($search_term)
prepare4display($categoryName).' > ';
$search_results_item .= ''.
prepare4display($forum_list[$row['forum_id']]['forum_title']).' > ';
- $search_results_item .= ''.
+ $search_results_item .= ''.
prepare4display($row['post_title']).'';
$search_results_item .= '
';
if (api_strlen($row['post_title']) > 200) {
diff --git a/main/forum/forumqualify.php b/main/forum/forumqualify.php
index a0abaa4a06..19b1236850 100755
--- a/main/forum/forumqualify.php
+++ b/main/forum/forumqualify.php
@@ -147,21 +147,16 @@ if ($origin == 'learnpath') {
);
if ($message <> 'PostDeletedSpecial') {
- if (isset($_GET['gradebook']) && $_GET['gradebook'] == 'view') {
- $info_thread = get_thread_information($currentForum['forum_id'], $_GET['thread']);
- $interbreadcrumb[] = array(
- "url" => "viewthread.php?".api_get_cidreq()."&forum=".$info_thread['forum_id']."&thread=".intval($_GET['thread']),
- "name" => prepare4display($currentThread['thread_title'])
- );
- } else {
- $interbreadcrumb[] = array(
- "url" => "viewthread.php?".api_get_cidreq()."&forum=".intval($_GET['forum'])."&thread=".intval($_GET['thread']),
- "name" => prepare4display($currentThread['thread_title'])
- );
- }
+ $interbreadcrumb[] = array(
+ "url" => "viewthread.php?".api_get_cidreq()."&forum=".$info_thread['forum_id']."&thread=".intval($_GET['thread']),
+ "name" => prepare4display($currentThread['thread_title'])
+ );
}
// the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string
- $interbreadcrumb[] = array("url" => "#", "name" => get_lang('QualifyThread'));
+ $interbreadcrumb[] = array(
+ "url" => "#",
+ "name" => get_lang('QualifyThread')
+ );
Display::display_header('');
}
}
@@ -311,16 +306,13 @@ $form->display();
// Show past data
if (api_is_allowed_to_edit() && $counter > 0) {
- if (isset($_GET['gradebook'])) {
- $view_gradebook = '&gradebook=view';
- }
echo '