xls report gibberish.

xls report gibberish.

by Shane Jeffery -
Number of replies: 6

Hi all.

Is anyone else getting a gibberish xls certificate report?

This is occuring across our whole site.  See attached

Any tips???

Average of ratings: -
In reply to Shane Jeffery

Re: xls report gibberish.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Have you any non-core plugins installed (may seem completely unrelated)? If so, remove and retry. We have had weird problems like this because of wonky characters in language files (that you Microsoft, onc again).
In reply to Howard Miller

Re: xls report gibberish.

by Jean-Michel Védrine -

Hello,

If you open the "xls" file submitted to this forum  as a text file, you will see that at the begining there is some html code for a form with a selector for groups :

<div class="groupselector">
<div class="singleselect">
<form method="get" action="http://swsi.moodle.tafensw.edu.au/mod/certificate/report.php" id="selectgroup">
<div>
<input type="hidden" name="id" value="109396" />
<label for="single_select4f6f882decb391">
Separate groups (Stage 1)</label><select id="single_select4f6f882decb391" class="select menugroup" name="group">
<option selected="selected" value="0">All participants</option>
<option value="1166">1A1</option><option value="1167">1A2</option>
<option value="1168">1A3</option><option value="1169">1A4</option>
<option value="1170">1A5</option><option value="1171">1A6</option>
<option value="2142">1A7</option><option value="3016">1A8</option>
<option value="1172">1B1</option><option value="1173">1B2</option>
<option value="1174">1B3</option><option value="1175">1B4</option>
<option value="1176">1B5</option><option value="1177">1B6</option>
<option value="1286">1B7</option><option value="2249">RPT</option>
</select><noscript style="inline"><div><input type="submit" value="Go" /></div></noscript></div></form></div></div>

So this is the source of the problem.

I will look at the code of the certificate module, the group selector should not be included when we are downloading the report.

What Moodle version and what version of the certificate module are you using ?

In reply to Jean-Michel Védrine

Re: xls report gibberish.

by Jean-Michel Védrine -

Hello Shane,

You have found a bug in mod/certificate/report.php

instructions like

$PAGE->navbar->add($strreport);
$PAGE->set_title(format_string($certificate->name).": $strreport");
$PAGE->set_heading($course->fullname);

and the

// Check to see if groups are being used in this choice
if ($groupmode = groups_get_activity_groupmode($cm)) {
    groups_get_activity_group($cm, true);
    groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/certificate/report.php?id='.$id);
}

block should be enclosed in a if (!$download) block

I will create a tracker issue.

 

 

In reply to Shane Jeffery

Re: xls report gibberish.

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Shane,

Are there any strange characters in any of the users names?

Regards,

Mark