#13 Multiple fixes

closed-accepted
nobody
None
5
2014-10-21
2006-11-17
No

in admin/include/function/survey_render.inc:
Old:
<font size="-1" class="surveyPage"><?php echo(_('Page')); ?> <?php echo($section+1); ?> <?php echo(_('of')); ?> <?php echo($num_sections); ?></font><br>

New:
<font size="-1" class="surveyPage"><?php printf(_('Page %d of %d'), $section+1, $num_sections); ?></font><br />

in public/handler.php, I fixed the button languages:
Old:
<input type="submit" name="prev" value="Previous Page">
...
<input type="submit" name="submit" value="Submit Survey">
...
<input type="submit" name="next" value="Next Page">
New:
<input type="submit" name="prev" value="<?php echo _("Previous Page"); ?>">
...
<input type="submit" name="submit" value="<?php echo _("Submit Survey"); ?>">
...
<input type="submit" name="next" value="<?php echo _("Next Page"); ?>">

I also added the possibility to choose the language in handler.php, either by GET option or by setting a $lang parameter. To do this, I added below the line

> require_once(ESP_BASE . '/admin/phpESP.ini.php');
the next lines:
< if (isset($_REQUEST['lang'])) {
< esp_setlocale_ex($_REQUEST['lang']);
< }
< if (isset($lang)) {
< esp_setlocale_ex($lang);
< }

So now handler.php?lang=nl_NL works, as well as setting $lang="nl_NL" and including handler.php as always.

Discussion

  • Logged In: YES
    user_id=109671
    Originator: YES

    And some more fixes:

    file admin/include/lib/espresponse.inc
    If the last question was a rate question, the result wasn't mailed in human readbale format.
    Old:

    return $hmn;

    New:

    if (!empty($tmpk) || count($tmpv)) {
    array_push($hmn, array($tmpk, $tmpv));
    $tmpk = null;
    $tmpv = array();
    }
    return $hmn;

    and in the same file, in the function response_select_human(), comment out the lines that say

    else {
    $arr[3]++;
    }

    Otherwise the rate results are off by one.

     
  • Logged In: NO

    Hi,

    I'm systems administrator at the 'Vrije Universiteit Amsterdam'. I'm deploying phpESP with ldap for more than a year now, and I am happy to see the changes you've made. Do you know if it is possible to add ldap users to different groups?

     
  • Logged In: YES
    user_id=109671
    Originator: YES

    Please post this message on the mailing list. This has nothing to do with this patch.

     
    • status: open --> closed-accepted