If there is a bug in the existing code then I would recommend reporting
it in the Github repository.
Stephen
On 08/02/19 09:58, Tom Salyers wrote:
> On Thu, Feb 7, 2019 at 5:07 PM Bruce, Stephen <[log in to unmask]
> <mailto:[log in to unmask]>> wrote:
>
> Should have tested before sending!
> I can get the student IDs matching as that's an LTI setting in
> Moodle, but the export csv still concatenates the names and IDs in a
> single cell. Grateful for any suggestions on how the export format
> can be changed.
> Stephen
>
>
> Hi, Stephen.
>
> I don't know how comfortable you might be with PHP (I'm a novice at best
> myself), but it looks like the code responsible for generating the CSV
> files is all in \tutors\assessments\reports\. For instance, there's this
> bit in report_student_grades.php that starts around line 228:
>
> echo("\"{$member['lastname']}, {$member['forename']} (");
> if (!empty($member['id_number'])) {
> echo($member['id_number']);
> } else {
> echo($member['username']);
> }
>
> echo(")\",\"$score\",\"$intermediate_grade\",\"$penalty_str\",\"$grade\"\n");
>
> ...where it's just tacking the ID number or username onto the end of the
> name, which is of course what you're seeing. You'd need to change it to
> insert a comma and quotes around the number/name, and add the field to
> the header (which gets generated about fifteen lines before). There are
> a couple of other files where it does something similar, but that's the
> first one I came across. As an alternative, though, you /might /be able
> to use a regular expression to separate the IDs from the names. I'd have
> to see a sample/test CSV to be sure, though.
>
> I hope that helps you out at least a bit.
> --
> Tom Salyers
> VLE Developer
>
> The University of Sheffield
> Corporate Information & Computing Services (CiCS)
> 10-12 Brunswick Street
> Sheffield, S10 2FN
> Tel: 0114 222 1141
> [log in to unmask] <mailto:[log in to unmask]>
>
>
> ------------------------------------------------------------------------
>
> To unsubscribe from the WEBPA list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=WEBPA&A=1
>
########################################################################
To unsubscribe from the WEBPA list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=WEBPA&A=1
|