Skip to content

Commit

Permalink
If question was not added to a exercise send to exercise link BT#15231
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 18, 2019
1 parent 1ed22b3 commit 26c76f2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions main/admin/questions.php
Expand Up @@ -87,6 +87,7 @@
/** @var CQuizQuestion $question */
if ($pagination) {
$url = api_get_path(WEB_CODE_PATH).'exercise/admin.php?';
$exerciseUrl = api_get_path(WEB_CODE_PATH).'exercise/exercise.php?';
foreach ($pagination as $question) {
// Creating empty exercise
$exercise = new Exercise();
Expand Down Expand Up @@ -127,12 +128,20 @@
'exerciseId' => $exerciseId,
'type' => $question->getType(),
'editQuestion' => $question->getId()
])
]),
['target' => '_blank']
);
}
$question->questionData .= '<br />'. $exerciseData;
} else {
$question->questionData .= get_lang('Course').': '.Display::url(
$courseInfo['name'],
$exerciseUrl.http_build_query([
'cidReq' => $courseCode
]),
['target' => '_blank']
);
}

ob_end_clean();
}
}
Expand Down

0 comments on commit 26c76f2

Please sign in to comment.