diff --git a/question/editlib.php b/question/editlib.php
index a598942ae9e..a51eae87c9e 100644
--- a/question/editlib.php
+++ b/question/editlib.php
@@ -625,9 +625,16 @@ class question_bank_preview_action_column extends question_bank_action_column_ba
protected function display_content($question, $rowclasses) {
global $OUTPUT;
if (question_has_capability_on($question, 'use')) {
- link_to_popup_window($this->qbank->preview_question_url($question->id), 'questionpreview',
- ' ',
- 0, 0, $this->strpreview, QUESTION_PREVIEW_POPUP_OPTIONS);
+ parse_str(QUESTION_PREVIEW_POPUP_OPTIONS, $options);
+ $image = new html_image();
+ $image->src = $OUTPUT->old_icon_url('t/preview');
+ $image->add_class('iconsmall');
+ $image->alt = $this->strpreview;
+
+ $link = html_link::make($this->qbank->preview_question_url($question->id), $this->strpreview);
+ $link->add_action(new popup_action('click', $link->url, 'questionpreview', $options));
+ $link->title = $this->strpreview;
+ echo $OUTPUT->link_to_popup($link, $image);
}
}
diff --git a/question/type/questiontype.php b/question/type/questiontype.php
index 845e11599fc..cb9146680cb 100644
--- a/question/type/questiontype.php
+++ b/question/type/questiontype.php
@@ -910,7 +910,7 @@ class default_questiontype {
provided the member functions it calls are overridden where required.
The layout is determined by the template question.html */
- global $CFG;
+ global $CFG, $OUTPUT;
$isgraded = question_state_is_graded($state->last_graded);
if (isset($question->randomquestionid)) {
@@ -945,10 +945,11 @@ class default_questiontype {
if (!empty($options->questioncommentlink)) {
$strcomment = get_string('commentorgrade', 'quiz');
- $commentlink = link_to_popup_window($options->questioncommentlink .
- '?attempt=' . $state->attempt . '&question=' . $actualquestionid,
- 'commentquestion', $strcomment, 480, 750, $strcomment, 'none', true);
- $commentlink = '