ATutor

Learning Management Tools







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


Upgrade problem LanguageManager related Atutor 21


  • 2012-10-07 12:46:15

    Upgrade problem LanguageManager related Atutor 21

    When upgrading an ATutor 2.0.3 installation, I ended up getting these warnings when trying to log in:

    .... [ 5-6 similar looking lines are deleted] .....
    Warning: Invalid argument supplied for foreach() in /atutor/skolen/mods/_core/languages/classes/LanguageManager.class.php on line 173
    Warning: reset() expects parameter 1 to be array, null given in /atutor/mods/_core/languages/classes/LanguageManager.class.php on line 201
    Warning: current() expects parameter 1 to be array, null given in /atutor/mods/_core/languages/classes/LanguageManager.class.php on line 203
    There are no languages installed!

    I suspect that the reason could be related to the fact that I have removed the English translation/localization. Can any one confirm this? Or could it be another reason?

    PS: The reason I removed the English translation was that otherwise, users would be served the English translation by default - which is not something we are interested in.

    PPS: I rolledback to the backed up installation for now, so I am still running ATutor 2.0.3

  • 2012-10-07 12:51:17

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    I forgot to say that one of the languages, Norwegian Bokml, is my own updated of the existing, uncomplete Norwegian Bokml translation. Also, the language tag for Norwegian Bokml was incorrect, so I changed that too. I don't know if this could play a role.

  • 2012-10-07 13:12:46

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    It should have reinstalled the English when you updated. I'll take a closer look when I'm back in the office Tuesday.

    For now you can manually add the English to the db, attached. Edit each statement with the appropriate prefix, then run the sql file.

    eg. 'AT_language_text'

  • 2012-10-09 14:02:10

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    Found the problem and fixed it. You can download the new 2.1 bundle that was just posted to Sourceforge with the fix. It might take a couple hours for all the mirror sites to update, so wait a little while before downloading.

    http://atutor.ca/atutor/download.php


    Be sure to export a copy of your no-nb language from the old site before upgrading, then reinstall it once the upgrade is complete.

  • 2012-10-10 10:41:22

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    Thanks, will come in hand next time. For now I chose to add the English language back first before upgrading.

    (In theory Softaculous might have gotten the upgraded version - especially if you also upgraded the version number. I rely on Softacuolus for installing and upgrading - it relieves my brain from stress ...)

  • 2012-10-10 11:24:14

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    We decided against a new version number, so hopefully Softaculous got the new one.

    If not, my guess is this is a fairly rare case, that is a softaculaous users who has deleted English. Otherwise this thread can describe the solution.

  • 2012-10-10 12:42:07

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    Would it be possible to get of the *reason* why I removed English? See the first message. (But to repeat: The reason is that when English is included, then it sets itself as the default language. I cannot have my users always switch from English to Norwegian, manually.)

  • 2012-10-10 13:09:29

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    Maybe we can add an option to enable/disable installed languages.

    The way it works now the language defaults to the browser's set language if no language preference is set (e.g. on the login screen). When a user sets the language the first time through the links in the footer area, that becomes their default language there after. They should not need to switch each time.

    In any case, removing English should no longer be a problem beyond ATutor 2.1.

  • 2012-10-10 13:38:25

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    Aha, now I understand the problem. To solve that problem, I would propose that ATutor should have an option to define what the default language should be. Currently the default language aparently is English. But I need to be able to pick a Norwegian variant as the default.

    Background: Our situation in Norway is that there are 3 language tags which each could be interpreted as 'Norwegian', namely


    'no', - Norwegian
    'nb' - Norwegian Bokmal
    'nn' - Norwegian Nynorsk

    (There are many language contexts which are similar - e.g. in Yugoslavia therare 5 variants of what formerly was known as Serbo-Croat but which today are consiered distinct langauges, and there are also 10 or so languages that could each claim the name Chinese etc. And all this is refleced in the langauge tags.)

    The trouble is that, although 'no' covers both 'nb' and 'nn', linguistically, a user who has his or her browser set up to to prefer 'no' will not get 'nb' or 'nn' if 'no' is not available. Instead, the user will get "the default language". So this is probably the reason why I got English. As you can see, it is backwards to get "English" just because ATutor offers "nb" instead of "no" - for instance..

    SOLUTION: So one way to improve the situation could be to add a preference inside Atutor whereby I can define what the default language should be - the language that gets served if there is no match between the preference of the user and the options in ATutor. Since I live in Norway and our customers are use to get some form of Norwegian as the default in most contexts of life her around, I would then like to be able to pick e.g. Norwegian Bokmal s the default language.

    By the way: Some Web browsers allows users to pick a secondary default. Thus, if you prefer 'Nynorsk' but Nynorsk is not available, then the suer can set her browser to prefer 'Bokml' as the second best option. And this work fine in e.g. Firefox. But in Safari, the situation is that it does not operate with secondary language preferences. Which is an additional reason why there should be an option whereby the ATutor administrator can define what the default langauge should be whenever there is no match.

  • 2012-10-10 14:02:36

    Re: Upgrade problem, LanguageManager related, Atutor 2.1

    For what it is worth, may be this page is helpful http://www.w3.org/QA/2006/02/content_negotiation.html