diff --git a/main/auth/categories_list.php b/main/auth/categories_list.php index 79855a8f24..ad540f40dd 100755 --- a/main/auth/categories_list.php +++ b/main/auth/categories_list.php @@ -16,7 +16,7 @@ $stok = Security::get_token();
diff --git a/main/auth/courses.php b/main/auth/courses.php index 1b01dad647..f966ac1ac9 100755 --- a/main/auth/courses.php +++ b/main/auth/courses.php @@ -195,7 +195,7 @@ switch ($action) { if (!$user_can_view_page) { api_not_allowed(true); } - header('Location: ' . api_get_self()); + header('Location: '.api_get_self()); exit; /* if (!CoursesAndSessionsCatalog::is(CATALOG_SESSIONS)) { $courses_controller->courses_categories( @@ -283,7 +283,7 @@ switch ($action) { $continueWithSubscription = SequenceResourceManager::checkSequenceAreCompleted($requirementsData); if (!$continueWithSubscription) { - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'auth/courses.php'); + header('Location: '.api_get_path(WEB_CODE_PATH).'auth/courses.php'); exit; } } @@ -301,16 +301,16 @@ switch ($action) { if ($count <= 0) { // no course in session -> return to catalog - $url = api_get_path(WEB_CODE_PATH) . 'auth/courses.php'; + $url = api_get_path(WEB_CODE_PATH).'auth/courses.php'; } elseif ($count == 1) { // only one course, so redirect directly to this course foreach ($coursesList as $course) { - $url = api_get_path(WEB_COURSE_PATH) . $course['directory'] . '/index.php?id_session=' . intval($_GET['session_id']); + $url = api_get_path(WEB_COURSE_PATH).$course['directory'].'/index.php?id_session='.intval($_GET['session_id']); } } else { - $url = api_get_path(WEB_CODE_PATH) . 'session/index.php?session_id=' . intval($_GET['session_id']); + $url = api_get_path(WEB_CODE_PATH).'session/index.php?session_id='.intval($_GET['session_id']); } - header('Location: ' . $url); + header('Location: '.$url); exit; } //else show error message? diff --git a/main/coursecopy/import_backup.php b/main/coursecopy/import_backup.php index 2329108552..e88bf8f515 100755 --- a/main/coursecopy/import_backup.php +++ b/main/coursecopy/import_backup.php @@ -98,21 +98,21 @@ if (Security::check_token('post') && ( $cr->set_file_option($_POST['same_file_name_option']); $cr->restore(); Display::addFlash(Display::return_message(get_lang('ImportFinished'))); - echo '' . get_lang('CourseHomepage') . ''; + echo ''.get_lang('CourseHomepage').''; } else { if (!$error) { Display::addFlash(Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning')); - echo '' . get_lang('TryAgain') . ''; + echo ''.get_lang('TryAgain').''; } elseif ($filename === false) { Display::addFlash(Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error')); - echo '' . get_lang('TryAgain') . ''; + echo ''.get_lang('TryAgain').''; } else { if ($filename == '') { Display::addFlash(Display::return_message(get_lang('SelectBackupFile'), 'error')); - echo '' . get_lang('TryAgain') . ''; + echo ''.get_lang('TryAgain').''; } else { Display::addFlash(Display::return_message(get_lang('UploadError'), 'error')); - echo '' . get_lang('TryAgain') . ''; + echo ''.get_lang('TryAgain').''; } } } @@ -142,10 +142,10 @@ if (Security::check_token('post') && ( CourseSelectForm::display_form($course, $hiddenFields); } elseif ($filename === false) { Display::addFlash(Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error')); - echo '' . get_lang('TryAgain') . ''; + echo ''.get_lang('TryAgain').''; } else { Display::addFlash(Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning')); - echo '' . get_lang('TryAgain') . ''; + echo ''.get_lang('TryAgain').''; } } else { $user = api_get_user_info(); @@ -157,7 +157,7 @@ if (Security::check_token('post') && ( $form = new FormValidator( 'import_backup_form', 'post', - api_get_path(WEB_CODE_PATH) . 'coursecopy/import_backup.php?' . api_get_cidreq(), + api_get_path(WEB_CODE_PATH).'coursecopy/import_backup.php?'.api_get_cidreq(), '', array('enctype' => 'multipart/form-data') ); @@ -189,7 +189,7 @@ if (Security::check_token('post') && ( ); $options['null'] = '-'; foreach ($backups as $index => $backup) { - $options[$backup['file']] = $backup['course_code'] . ' (' . $backup['date'] . ')'; + $options[$backup['file']] = $backup['course_code'].' ('.$backup['date'].')'; } $form->addElement( 'select', @@ -207,7 +207,7 @@ if (Security::check_token('post') && ( 'radio', '', '', - '' . get_lang('NoBackupsAvailable') . '', + ''.get_lang('NoBackupsAvailable').'', '', 'disabled="true"' ); diff --git a/main/exercise/MatchingDraggable.php b/main/exercise/MatchingDraggable.php index 3db5fb0bfb..bed9ed4371 100644 --- a/main/exercise/MatchingDraggable.php +++ b/main/exercise/MatchingDraggable.php @@ -66,12 +66,12 @@ class MatchingDraggable extends Question for ($i = 1; $i <= $answer->nbrAnswers; $i++) { if ($answer->isCorrect($i)) { $nb_matches++; - $defaults['answer[' . $nb_matches . ']'] = $answer->selectAnswer($i); - $defaults['weighting[' . $nb_matches . ']'] = float_format($answer->selectWeighting($i), 1); - $defaults['matches[' . $nb_matches . ']'] = $answer->correct[$i]; + $defaults['answer['.$nb_matches.']'] = $answer->selectAnswer($i); + $defaults['weighting['.$nb_matches.']'] = float_format($answer->selectWeighting($i), 1); + $defaults['matches['.$nb_matches.']'] = $answer->correct[$i]; } else { $nb_options++; - $defaults['option[' . $nb_options . ']'] = $answer->selectAnswer($i); + $defaults['option['.$nb_options.']'] = $answer->selectAnswer($i); } } } @@ -102,10 +102,10 @@ class MatchingDraggable extends Question $html = '' . get_lang('Number') . ' | -' . get_lang('Answer') . ' | -' . get_lang('MatchesTo') . ' | -' . get_lang('Weighting') . ' | +' . get_lang('Number').' | +' . get_lang('Answer').' | +' . get_lang('MatchesTo').' | +' . get_lang('Weighting').' |
---|
' . get_lang('Number') . ' | -' . get_lang('Answer') . ' | +' . get_lang('Number').' | +' . get_lang('Answer').' | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
' . chr(64 + $i) . ' | '); + $form->addHtml(''.chr(64 + $i).' | '); //$form->addText("option[$i]", null); $form->addHtmlEditor( "option[$i]", @@ -273,10 +273,10 @@ class MatchingDraggable extends Question public function return_header($feedback_type = null, $counter = null, $score = null) { $header = parent::return_header($feedback_type, $counter, $score); - $header .= '
' . get_lang('ElementList') . ' | -' . get_lang('CorrespondsTo') . ' | +' . get_lang('ElementList').' | +' . get_lang('CorrespondsTo').' | ' . get_lang('Comment') . ' | '; - $feedbackTitle = '' . get_lang('Scenario') . ' | '; + $commentTitle = ''.get_lang('Comment').' | '; + $feedbackTitle = ''.get_lang('Scenario').' | '; } else { - $commentTitle = '' . get_lang('Comment') . ' | '; + $commentTitle = ''.get_lang('Comment').' | '; } $html = '
---|
' . get_lang('Number') . ' | -' . get_lang('True') . ' | -' . get_lang('Answer') . ' | - ' . $commentTitle . ' - ' . $feedbackTitle . ' -' . get_lang('Weighting') . ' | +' . get_lang('Number').' | +' . get_lang('True').' | +' . get_lang('Answer').' | + ' . $commentTitle.' + ' . $feedbackTitle.' +' . get_lang('Weighting').' | {error} {element} | ',
- 'counter[' . $i . ']'
+ 'counter['.$i.']'
);
$renderer->setElementTemplate(
'{error} {element} | ',
- 'answer[' . $i . ']'
+ 'answer['.$i.']'
);
$renderer->setElementTemplate(
'{error} {element} | ',
- 'comment[' . $i . ']'
+ 'comment['.$i.']'
);
$renderer->setElementTemplate(
'{error} {element} | ',
- 'weighting[' . $i . ']'
+ 'weighting['.$i.']'
);
- $answerNumber = $form->addElement('text', 'counter[' . $i . ']', null, ' value = "' . $i . '"');
+ $answerNumber = $form->addElement('text', 'counter['.$i.']', null, ' value = "'.$i.'"');
$answerNumber->freeze();
$form->addElement('radio', 'correct', null, null, $i, 'class="checkbox"');
- $form->addHtmlEditor('answer[' . $i . ']', null, null, true, $editorConfig);
+ $form->addHtmlEditor('answer['.$i.']', null, null, true, $editorConfig);
- $form->addRule('answer[' . $i . ']', get_lang('ThisFieldIsRequired'), 'required');
+ $form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required');
if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
$form->addHtmlEditor(
@@ -208,22 +208,22 @@ class UniqueAnswerImage extends UniqueAnswer
// Direct feedback
// Adding extra feedback fields
$group = array();
- $group['try' . $i] = $form->createElement('checkbox', 'try' . $i, null, get_lang('TryAgain'));
- $group['lp' . $i] = $form->createElement(
+ $group['try'.$i] = $form->createElement('checkbox', 'try'.$i, null, get_lang('TryAgain'));
+ $group['lp'.$i] = $form->createElement(
'select',
- 'lp' . $i,
- get_lang('SeeTheory') . ': ',
+ 'lp'.$i,
+ get_lang('SeeTheory').': ',
$selectLpId
);
- $group['destination' . $i] = $form->createElement(
+ $group['destination'.$i] = $form->createElement(
'select',
- 'destination' . $i,
- get_lang('GoToQuestion') . ': ',
+ 'destination'.$i,
+ get_lang('GoToQuestion').': ',
$selectQuestion
);
- $group['url' . $i] = $form->createElement(
- 'text', 'url' . $i,
- get_lang('Other') . ': ',
+ $group['url'.$i] = $form->createElement(
+ 'text', 'url'.$i,
+ get_lang('Other').': ',
array(
'class' => 'col-md-2',
'placeholder' => get_lang('Other')
@@ -236,9 +236,9 @@ class UniqueAnswerImage extends UniqueAnswer
'scenario'
);
} else {
- $form->addHtmlEditor('comment[' . $i . ']', null, null, false, $editorConfig);
+ $form->addHtmlEditor('comment['.$i.']', null, null, false, $editorConfig);
}
- $form->addText('weighting[' . $i . ']', null, null, array('class' => "col-md-1", 'value' => '0'));
+ $form->addText('weighting['.$i.']', null, null, array('class' => "col-md-1", 'value' => '0'));
$form->addHtml('');
}
@@ -284,19 +284,19 @@ class UniqueAnswerImage extends UniqueAnswer
$numberAnswers = $form->getSubmitValue('nb_answers');
for ($i = 1; $i <= $numberAnswers; $i++) {
- $answer = trim(str_replace(['
---|
'.get_lang("Answer").' |
---|
- | ' . get_lang('Requirements') . ' | -' . get_lang('YourAnswer') . ' | +' . get_lang('Requirements').' | +' . get_lang('YourAnswer').' | |
' . get_lang('Overlap') . ' | -' . get_lang('Min') . ' ' . $threadhold1 . ' | -' . (($final_overlap < 0) ? 0 : intval($final_overlap)) . ' |
+ ' . get_lang('Overlap').' | +' . get_lang('Min').' '.$threadhold1.' | +'.(($final_overlap < 0) ? 0 : intval($final_overlap)).' |
' . get_lang('Excess') . ' | -' . get_lang('Max') . ' ' . $threadhold2 . ' | -' . (($final_excess < 0) ? 0 : intval($final_excess)) . ' |
+ ' . get_lang('Excess').' | +' . get_lang('Max').' '.$threadhold2.' | +'.(($final_excess < 0) ? 0 : intval($final_excess)).' |
' . get_lang('Missing') . ' | -' . get_lang('Max') . ' ' . $threadhold3 . ' | -' . (($final_missing < 0) ? 0 : intval($final_missing)) . ' |
+ ' . get_lang('Missing').' | +' . get_lang('Max').' '.$threadhold3.' | +'.(($final_missing < 0) ? 0 : intval($final_missing)).' |
' . get_lang('OARHit') . '
'; + $message = ''.get_lang('OARHit').'
'; } else { - $message = '' . get_lang('YourDelineation') . '
'; + $message = ''.get_lang('YourDelineation').'
'; $message .= $table_resume; - $message .= '' . $comment . '
'; + $message .= ''.$comment.'
'; echo $message; } else { - echo '' . $comment . '
'; + echo ''.$comment.'
'; } //showing the score - $queryfree = "SELECT marks from " . $TBL_TRACK_ATTEMPT . " - WHERE exe_id = " . intval($id) . " AND question_id= " . intval($questionId) . ""; + $queryfree = "SELECT marks from ".$TBL_TRACK_ATTEMPT." + WHERE exe_id = " . intval($id)." AND question_id= ".intval($questionId).""; $resfree = Database::query($queryfree); $questionScore = Database::result($resfree, 0, "marks"); $totalScore += $questionScore; @@ -673,8 +673,8 @@ foreach ($questionList as $questionId) { $marksname = ''; if ($isFeedbackAllowed) { - $name = "fckdiv" . $questionId; - $marksname = "marksName" . $questionId; + $name = "fckdiv".$questionId; + $marksname = "marksName".$questionId; if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION, ANNOTATION))) { $url_name = get_lang('EditCommentsAndMarks'); } else { @@ -685,32 +685,32 @@ foreach ($questionList as $questionId) { } } echo '