Fix codeclimate #2

Fix endline whitespaces
pull/2487/head
Satyan JACQUENS 8 years ago
parent e9d3cf68f4
commit 7bc02fbc4b
  1. 3
      main/auth/courses_categories.php
  2. 21
      main/inc/lib/course.lib.php

@ -409,7 +409,8 @@ function return_goto_button($course)
$html = Display::url( $html = Display::url(
Display::returnFontAwesomeIcon('share'), Display::returnFontAwesomeIcon('share'),
api_get_course_url($course['code']), api_get_course_url($course['code']),
array('class' => 'btn btn-default btn-sm', 'title' => $title, 'aria-label' => $title)); array('class' => 'btn btn-default btn-sm', 'title' => $title, 'aria-label' => $title)
);
return $html; return $html;
} }

@ -4852,7 +4852,12 @@ class CourseManager
$my_course['already_register_as'] = Display::tag( $my_course['already_register_as'] = Display::tag(
'button', 'button',
$icon, $icon,
array('id' => 'register', 'class' => 'btn btn-default btn-sm', 'title' => $title, 'aria-label' => $title) array(
'id' => 'register',
'class' => 'btn btn-default btn-sm',
'title' => $title,
'aria-label' => $title
)
); );
} elseif ($userRegisterdInCourseAsTeacher) { } elseif ($userRegisterdInCourseAsTeacher) {
// if user registered as teacher // if user registered as teacher
@ -4861,7 +4866,12 @@ class CourseManager
$my_course['already_register_as'] = Display::tag( $my_course['already_register_as'] = Display::tag(
'button', 'button',
$icon, $icon,
array('id' => 'register', 'class' => 'btn btn-default btn-sm', 'title' => $title, 'aria-label' => $title) array(
'id' => 'register',
'class' => 'btn btn-default btn-sm',
'title' => $title,
'aria-label' => $title
)
); );
} */ } */
@ -4870,7 +4880,8 @@ class CourseManager
$my_course['register_button'] = Display::url( $my_course['register_button'] = Display::url(
get_lang('Subscribe') . ' ' . get_lang('Subscribe') . ' ' .
Display::returnFontAwesomeIcon('sign-in'), Display::returnFontAwesomeIcon('sign-in'),
api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/index.php?action=subscribe&sec_token=' . $stok, api_get_path(WEB_COURSE_PATH) . $course_info['path'] .
'/index.php?action=subscribe&sec_token=' . $stok,
array( array(
'class' => 'btn btn-success btn-sm', 'class' => 'btn btn-success btn-sm',
'title' => get_lang('Subscribe'), 'title' => get_lang('Subscribe'),
@ -4898,8 +4909,8 @@ class CourseManager
$my_course['unsubscribe_button'] = Display::url( $my_course['unsubscribe_button'] = Display::url(
get_lang('Unreg') . ' ' . get_lang('Unreg') . ' ' .
Display::returnFontAwesomeIcon('sign-out'), Display::returnFontAwesomeIcon('sign-out'),
api_get_path(WEB_CODE_PATH) . 'auth/courses.php?action=unsubscribe&unsubscribe=' api_get_path(WEB_CODE_PATH) . 'auth/courses.php?action=unsubscribe&unsubscribe=' . $courseCode
. $courseCode . '&sec_token=' . $stok . '&category_code=' . $categoryCode, . '&sec_token=' . $stok . '&category_code=' . $categoryCode,
array( array(
'class' => 'btn btn-danger btn-sm', 'class' => 'btn btn-danger btn-sm',
'title' => get_lang('Unreg'), 'title' => get_lang('Unreg'),

Loading…
Cancel
Save