Minor - Fixes from master, format code

pull/3173/head
Julio Montoya 7 years ago
parent 19d9ae06b4
commit 485b7be0f0
  1. 2
      main/exercise/hotspot_actionscript_admin.as.php
  2. 10
      main/inc/ajax/document.ajax.php
  3. 2
      main/inc/lib/link.lib.php
  4. 1
      main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php
  5. 2
      tests/behat/features/bootstrap/FeatureContext.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']);

@ -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);

@ -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');

@ -334,6 +334,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
} else {
$html = preg_replace("/([ \t\n\r]*)?<!-- BEGIN required -->.*<!-- END required -->([ \t\n\r]*)?/isU", '', $html);
}
if (isset($error)) {
$html = str_replace('{error}', $error, $html);
$html = str_replace('{error_class}', 'error has-error', $html);

@ -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');

Loading…
Cancel
Save