diff --git a/classes/responsetype/display_support.php b/classes/responsetype/display_support.php
index 9b1dad01..ca89bb2a 100644
--- a/classes/responsetype/display_support.php
+++ b/classes/responsetype/display_support.php
@@ -81,6 +81,7 @@ public static function mkresavg($counts, $total, $question, $showtotals, $sort,
}
$imageurl = $CFG->wwwroot.'/mod/questionnaire/images/';
+ $blankimage = $CFG->wwwroot . '/mod/questionnaire/images/hbartransp.gif';
$llength = $question->length;
if (!$llength) {
$llength = 5;
@@ -104,7 +105,9 @@ public static function mkresavg($counts, $total, $question, $showtotals, $sort,
$str = $j + 1;
}
}
- $out = '
';
+ // Using a hard value so we can have things look right in a PDF as well.
+ $innertablewidth = 450;
+ $out = '';
for ($i = 0; $i <= $llength - 1; $i++) {
if (isset($n[$i])) {
$str = $n[$i];
@@ -155,14 +158,16 @@ public static function mkresavg($counts, $total, $question, $showtotals, $sort,
if ($avg) {
$out = '';
if (($j = $avg * $width) > 0) {
- $marginposition = ($avg - 0.5 ) / ($question->length + $isrestricted) * 100;
+ $marginposition = ($avg - 0.5 ) / ($question->length + $isrestricted);
}
if (!right_to_left()) {
- $out .= '
';
+ $out .= '
' .
+ '
';
} else {
- $out .= '
';
+ $out .= '
' .
+ '
';
}
} else {
$out = '';
diff --git a/images/hbartransp.gif b/images/hbartransp.gif
new file mode 100644
index 00000000..31838a05
Binary files /dev/null and b/images/hbartransp.gif differ
diff --git a/lang/en/questionnaire.php b/lang/en/questionnaire.php
index 59fe5e7f..09a69184 100644
--- a/lang/en/questionnaire.php
+++ b/lang/en/questionnaire.php
@@ -143,6 +143,7 @@
$string['directwarnings'] = 'Direct dependencies to this question will be removed. This will affect:';
$string['displaymethod'] = 'Display method not defined for question.';
$string['download'] = 'Download';
+$string['downloadpdf'] = 'Download PDF';
$string['downloadtextformat'] = 'Download';
$string['downloadtextformat_help'] = 'This feature enables you to save all the responses of a questionnaire to a selectable, supported file format.
You can choose to include extra data items in the export, as well as choose to automatically send the file to selected users.';
diff --git a/questionnaire.class.php b/questionnaire.class.php
index 86378230..4f41b863 100644
--- a/questionnaire.class.php
+++ b/questionnaire.class.php
@@ -1322,7 +1322,7 @@ private function print_survey_start($message, $section, $numsections, $hasrequir
if ($ruser) {
$respinfo = '';
if ($outputtarget == 'html') {
- $linkname = 'Download PDF';
+ $linkname = get_string('downloadpdf', 'mod_questionnaire');
$link = new moodle_url('/mod/questionnaire/report.php',
['action' => 'vresp', 'instance' => $this->id, 'target' => 'pdf', 'individualresponse' => 1, 'rid' => $rid]);
$downpdficon = new pix_icon('b/pdfdown', $linkname, 'mod_questionnaire');