ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


resultsallphp changing username to firstname and lastname


  • 2008-04-11 03:14:11

    resultsallphp changing username to firstname and lastname

    operating system - Server 2003
    version of ATutor - 1.5.5
    versions of php - 5.2.3
    version of mysq l - 5.0
    webserver & version - Apache 2.2.6
    web browser being used - firefox and I.E.

    As posted in the subject, what I'm trying to do is to change the username to the first and last name of said user or at least add 1 column besides the username that shows the first and last name.

    I want to add this function to the down loadable csv, the idea is to have a .csv with the results for each user, but that besides the username I have the first/lastname of said user. This will help instructors evaluate results faster.

    Included is a picture of the username seen under (login name) in the table.

    ----

    If you see the picture included, I want to add the first/lastname of the person between the login name and date taken columns and that the same table shown can be exported as a csv (like the default one does).

    I know I must modify results_all_csv.php and results_all.php to make it happen, but I'm having trouble doing so.

    Any help will be appreciated.

    Rem.

  • 2008-04-11 10:56:08

    Re: results_all.php changing username to first_name and last_name

    There's a few ways you could implement this. You could use the get_display_name() function in the login column, which takes as an argument a member id. It will use what ever setting it set in system preference for the Display Name property.

    You can see how thats done in tools/tests/result.php.

    You might build the changes into a patch using the Patcher module, so it can be included in the public source code, and be available for future versions so you don't loose your changes when you upgrade.

    Or, we can be hired to make the changes if you're unable to yourself.