diff --git a/main/exercise/hotspot_actionscript_admin.as.php b/main/exercise/hotspot_actionscript_admin.as.php index b0c002080c..3775e8a41a 100755 --- a/main/exercise/hotspot_actionscript_admin.as.php +++ b/main/exercise/hotspot_actionscript_admin.as.php @@ -59,11 +59,9 @@ $data['image_height'] = $pictureHeight; $data['courseCode'] = $_course['path']; $data['hotspots'] = []; -// Init $i = 0; $nmbrTries = 0; $answer_type = $objQuestion->type; - $answers = Session::read('tmp_answers'); $nbrAnswers = count($answers['answer']); diff --git a/main/inc/ajax/document.ajax.php b/main/inc/ajax/document.ajax.php index eb38c533a6..108ffa0f6e 100755 --- a/main/inc/ajax/document.ajax.php +++ b/main/inc/ajax/document.ajax.php @@ -20,16 +20,10 @@ switch ($action) { $courseQuota = DocumentManager::get_course_quota(); // Calculating the total space - $already_consumed_space_course = DocumentManager::documents_total_space( - api_get_course_int_id() - ); + $total = DocumentManager::documents_total_space(api_get_course_int_id()); // Displaying the quota - echo DocumentManager::displaySimpleQuota( - $courseQuota, - $already_consumed_space_course - ); - + echo DocumentManager::displaySimpleQuota($courseQuota, $total); break; case 'upload_file': api_protect_course_script(true); diff --git a/main/inc/lib/link.lib.php b/main/inc/lib/link.lib.php index 7dc9ae447f..b87d4b550c 100755 --- a/main/inc/lib/link.lib.php +++ b/main/inc/lib/link.lib.php @@ -1100,7 +1100,7 @@ class Link extends Model false ); - $url .= api_get_self().'?'.api_get_cidreq().'&sec_token='.$token.'&action=deletelink&id='.$linkId.'&category_id='.$categoryId; + $url = api_get_self().'?'.api_get_cidreq().'&sec_token='.$token.'&action=deletelink&id='.$linkId.'&category_id='.$categoryId; $event = "javascript: if(!confirm('".get_lang('LinkDelconfirm')."'))return false;"; $title = get_lang('Delete'); diff --git a/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php b/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php index 2efe4a67dc..44ed6dc6b6 100755 --- a/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php +++ b/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php @@ -334,6 +334,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer } else { $html = preg_replace("/([ \t\n\r]*)?.*([ \t\n\r]*)?/isU", '', $html); } + if (isset($error)) { $html = str_replace('{error}', $error, $html); $html = str_replace('{error_class}', 'error has-error', $html); diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php index f2d807a992..3975687b8a 100644 --- a/tests/behat/features/bootstrap/FeatureContext.php +++ b/tests/behat/features/bootstrap/FeatureContext.php @@ -21,7 +21,7 @@ class FeatureContext extends MinkContext */ public function iAmAPlatformAdministrator() { - $this->visit('/index.php?logout=logout'); + $this->visit('/index.php?logout=logout&uid=1'); $this->iAmOnHomepage(); $this->fillField('login', 'admin'); $this->fillField('password', 'admin');