Minor - flint fixes

pull/2837/head
Julio Montoya 6 years ago
parent 63a35d3305
commit 1e67be6550
  1. 10
      config/packages/liip_imagine.yaml
  2. 4
      main/exercise/exercise.php
  3. 2
      main/exercise/question.class.php
  4. 10
      main/exercise/question_list_admin.inc.php
  5. 20
      main/inc/ajax/course_home.ajax.php
  6. 1
      main/inc/lib/fileUpload.lib.php
  7. 26
      main/inc/lib/template.lib.php

@ -1,6 +1,6 @@
# The LiipImagineBundle can be used if you want to convert on demand an image
# to a specific format. (ie a controller render the file)
# more information can be found here : https://github.com/liip/LiipImagineBundle
# more information can be found here : https://github.com/liip/LiipImagineBundle
liip_imagine:
resolvers:
@ -16,19 +16,19 @@ liip_imagine:
hotspot_question:
quality: 75
filters:
relative_resize: { widen: 800 } # keep aspect ratio to width
relative_resize: {widen: 800} # keep aspect ratio to width
# Sonata thumbnails
default_small:
quality: 75
filters:
thumbnail: { size: [100, 100], mode: outbound }
thumbnail: {size: [100, 100], mode: outbound}
default_medium:
quality: 75
filters:
thumbnail: { size: [500, 200], mode: outbound }
thumbnail: {size: [500, 200], mode: outbound}
default_big:
quality: 75
filters:
thumbnail: { size: [820, 70], mode: outbound }
thumbnail: {size: [820, 70], mode: outbound}

@ -1010,8 +1010,8 @@ if (!empty($exerciseList)) {
'',
[
'href' => 'exercise.php?'.api_get_cidreq().'&choice=delete&sec_token='.$token.'&exerciseId='.$row['id'],
'title' => addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'),ENT_QUOTES, $charset))." ".addslashes($exercise->getUnformattedTitle())."?",
'class' => 'delete-swal'
'title' => addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'), ENT_QUOTES, $charset))." ".addslashes($exercise->getUnformattedTitle())."?",
'class' => 'delete-swal',
]
);
} else {

@ -751,7 +751,6 @@ abstract class Question
* @param array $picture - picture to upload
*
* @return bool - true if uploaded, otherwise false
*
*/
public function uploadPicture($picture)
{
@ -2380,6 +2379,5 @@ abstract class Question
public function getHotSpotData()
{
}
}

@ -230,7 +230,7 @@ if (!$inATest) {
api_get_self().'?'.api_get_cidreq().'&clone_question='.$id,
[
'class' => 'btn btn-outline-secondary btn-sm',
'title' => get_lang('Copy')
'title' => get_lang('Copy'),
]
);
$edit_link = $objQuestionTmp->type == CALCULATED_ANSWER && $objQuestionTmp->isAnswered()
@ -239,7 +239,7 @@ if (!$inATest) {
[
'class' => 'btn btn-outline-secondary btn-sm',
'title' => get_lang('QuestionEditionNotAvailableBecauseItIsAlreadyAnsweredHoweverYouCanCopyItAndModifyTheCopy'),
'disabled'
'disabled',
]
)
: Display::url(
@ -252,7 +252,7 @@ if (!$inATest) {
]),
[
'class' => 'btn btn-outline-secondary btn-sm',
'title' => get_lang('Modify')
'title' => get_lang('Modify'),
]
);
$delete_link = null;
@ -292,7 +292,7 @@ if (!$inATest) {
1,
true),
[
'class' => 'btn-moved moved'
'class' => 'btn-moved moved',
]
);
}
@ -305,7 +305,7 @@ if (!$inATest) {
// Question type
list($typeImg, $typeExpl) = $objQuestionTmp->get_type_icon_html();
$questionType = Display::return_icon($typeImg, $typeExpl,[],ICON_SIZE_MEDIUM);
$questionType = Display::return_icon($typeImg, $typeExpl, [], ICON_SIZE_MEDIUM);
// Question category
$txtQuestionCat = Security::remove_XSS(

@ -142,28 +142,28 @@ switch ($action) {
$course_info = api_get_course_info($_GET['code']);
$content = get_lang('NoDescription');
if (!empty($course_info)) {
if (api_get_setting('course_catalog_hide_private') === 'true' &&
if (api_get_setting('course_catalog_hide_private') === 'true' &&
$course_info['visibility'] == COURSE_VISIBILITY_REGISTERED
) {
echo get_lang('PrivateAccess');
break;
}
echo get_lang('PrivateAccess');
break;
}
$table = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
$sql = "SELECT * FROM $table
WHERE c_id = ".$course_info['real_id']." AND session_id = 0
ORDER BY id";
$result = Database::query($sql);
if (Database::num_rows($result) > 0) {
while ($description = Database::fetch_object($result)) {
$descriptions[$description->id] = $description;
}
$result = Database::query($sql);
if (Database::num_rows($result) > 0) {
while ($description = Database::fetch_object($result)) {
$descriptions[$description->id] = $description;
}
$content = CourseManager::get_details_course_description_html(
$descriptions,
api_get_system_encoding(),
false
);
}
}
}
echo $content;
break;

@ -1439,7 +1439,6 @@ function create_unexisting_directory(
return $document;
}
return false;
}

@ -231,19 +231,6 @@ class Template
$this->assign('actions', $actions);
}
/**
* Load legacy params
*/
private function loadLegacyParams()
{
// Set legacy breadcrumb
global $interbreadcrumb;
$this->params['legacy_breadcrumb'] = $interbreadcrumb;
global $htmlHeadXtra;
$this->params['legacy_javascript'] = $htmlHeadXtra;
}
/**
* Render the template.
*
@ -1225,6 +1212,19 @@ class Template
return true;
}
/**
* Load legacy params.
*/
private function loadLegacyParams()
{
// Set legacy breadcrumb
global $interbreadcrumb;
$this->params['legacy_breadcrumb'] = $interbreadcrumb;
global $htmlHeadXtra;
$this->params['legacy_javascript'] = $htmlHeadXtra;
}
/**
* Prepare the _c array for template files. The _c array contains
* information about the current course.

Loading…
Cancel
Save