Minor - format code

pull/2487/head
jmontoyaa 7 years ago
parent ed07af1580
commit 22e4af5140
  1. 6
      main/exercise/stats.php
  2. 10
      main/survey/preview.php

@ -1,12 +1,14 @@
<?php
/* See license terms in /license.txt */
$this_section = SECTION_COURSES;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
api_protect_course_script(true, false, true);
$showPage = false;
if (api_is_platform_admin() || api_is_course_admin() ||
api_is_course_tutor() || api_is_session_general_coach() || api_is_allowed_to_edit(null, true)
) {

@ -60,7 +60,6 @@ if (empty($survey_data)) {
true,
Display::return_message(get_lang('InvallidSurvey'), 'error', false)
);
exit;
}
$urlname = strip_tags($survey_data['title']);
@ -86,7 +85,7 @@ if ($surveyAnonymous == 0 && api_is_anonymous()) {
}
}
// Header
Display :: display_header(get_lang('SurveyPreview'));
Display::display_header(get_lang('SurveyPreview'));
// We exit here is the first or last question is a pagebreak (which causes errors)
SurveyUtil::check_first_last_question($survey_id, false);
@ -98,7 +97,6 @@ if (api_is_course_admin() ||
) {
// Survey information
echo '<div class="page-header"><h2>'.$survey_data['survey_title'].'</h2></div>';
if (!empty($survey_data['survey_subtitle'])) {
echo '<div id="survey_subtitle">'.$survey_data['survey_subtitle'].'</div>';
}
@ -193,8 +191,8 @@ if (api_is_course_admin() ||
$sql = "SELECT * FROM $table_survey_question
WHERE
c_id = $course_id AND
type='".Database::escape_string('pagebreak')."' AND
survey_id='".$survey_id."'";
type = '".Database::escape_string('pagebreak')."' AND
survey_id = '".$survey_id."'";
$result = Database::query($sql);
$numberofpages = Database::num_rows($result) + 1;
@ -271,4 +269,4 @@ if (api_is_course_admin() ||
echo Display::return_message(get_lang('NotAllowed'), 'error', false);
}
Display :: display_footer();
Display::display_footer();

Loading…
Cancel
Save