Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14743

Allow user to change language of help article to english and back directly in help window

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.5
    • Component/s: General
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      This improvement add at bottom of help page link to english version and back to current language version. This is very good for translators and other users for compare english original and translated version. Because translated version not always up to date this feature allows to read actual english version.

        Gliffy Diagrams

        1. help.php.patch
          1 kB
          Dmitry Pupinin
        2. MDL-14743.patch.txt
          2 kB
          David Mudrak
        3. v194_help.php.patch
          1 kB
          Dmitry Pupinin

          Issue Links

            Activity

            Hide
            dlnsk Dmitry Pupinin added a comment -

            Patch for Moodle 1.9.4+ added

            Show
            dlnsk Dmitry Pupinin added a comment - Patch for Moodle 1.9.4+ added
            Hide
            dlnsk Dmitry Pupinin added a comment -

            Assigned to Eloy because by default this was assign to Nobody.

            Show
            dlnsk Dmitry Pupinin added a comment - Assigned to Eloy because by default this was assign to Nobody.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited

            Adding some people here...

            I think it's a good idea to offer that "switch to/from English" feature in help files.

            Just thinking if that should be showed only to admins or, at least, be enable/disable it by some $CFG setting... any comment will be welcome.

            Thanks for the idea and patch, Dmitry!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited Adding some people here... I think it's a good idea to offer that "switch to/from English" feature in help files. Just thinking if that should be showed only to admins or, at least, be enable/disable it by some $CFG setting... any comment will be welcome. Thanks for the idea and patch, Dmitry!
            Hide
            mudrd8mz David Mudrak added a comment -

            My +0x00000001 to have this in both the STABLE and HEAD.

            IMO there is no additional setting needed to allow this because:

            1) remember the Basic Rule of Help Files - they don't read it
            2) all users should be able to easily get actual and full help - not just admins, teachers or some privileged roles
            3) this does not influence UI too much so I do not expect objections

            I am going to test and patch tomorrow so it can be reviewed and QA'ed during the tuesday

            Thanks for the patch, Dmitry!

            Show
            mudrd8mz David Mudrak added a comment - My +0x00000001 to have this in both the STABLE and HEAD. IMO there is no additional setting needed to allow this because: 1) remember the Basic Rule of Help Files - they don't read it 2) all users should be able to easily get actual and full help - not just admins, teachers or some privileged roles 3) this does not influence UI too much so I do not expect objections I am going to test and patch tomorrow so it can be reviewed and QA'ed during the tuesday Thanks for the patch, Dmitry!
            Hide
            aav Artem Andreev added a comment -

            +1 for visibility of link to all

            Show
            aav Artem Andreev added a comment - +1 for visibility of link to all
            Hide
            mudrd8mz David Mudrak added a comment -

            I have slightly modified the Dmitry's patch:

            • now it displays "Show this help in language: English" text link instead of the plain shortcut "en" (replaces English with the corresponding current language name if offering a backward link) - this needs new string in moodle.php
            • it does not offer a link to the English help file if such one is already displayed due to "fallback to English" feature
            Show
            mudrd8mz David Mudrak added a comment - I have slightly modified the Dmitry's patch: now it displays "Show this help in language: English" text link instead of the plain shortcut "en" (replaces English with the corresponding current language name if offering a backward link) - this needs new string in moodle.php it does not offer a link to the English help file if such one is already displayed due to "fallback to English" feature
            Hide
            mudrd8mz David Mudrak added a comment -

            This is the patch I am going to use against the MOODLE_19_STABLE

            Show
            mudrd8mz David Mudrak added a comment - This is the patch I am going to use against the MOODLE_19_STABLE
            Hide
            mudrd8mz David Mudrak added a comment -

            Fixed in MOODLE_19_STABLE and merged into HEAD

            Show
            mudrd8mz David Mudrak added a comment - Fixed in MOODLE_19_STABLE and merged into HEAD
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Hi David,

            just looking your patch... what happens if the currentlang help file doesn't exist and moodle defaults to the en_utf8 one? Will the link to the (un-existing) currentlang file be showed? Reading help.php it seems that it always set $helpfound to true, no matter if it's the currentlang or the fallback (en_utf8). Just one case for testing...ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Hi David, just looking your patch... what happens if the currentlang help file doesn't exist and moodle defaults to the en_utf8 one? Will the link to the (un-existing) currentlang file be showed? Reading help.php it seems that it always set $helpfound to true, no matter if it's the currentlang or the fallback (en_utf8). Just one case for testing...ciao
            Hide
            mudrd8mz David Mudrak added a comment -

            > Will the link to the (un-existing) currentlang file be showed?
            no

            $helpfound is checked just for cases when the help file does not exists even in the English pack

            Show
            mudrd8mz David Mudrak added a comment - > Will the link to the (un-existing) currentlang file be showed? no $helpfound is checked just for cases when the help file does not exists even in the English pack
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Tested and working ok. Closing. Thanks David! B-)

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Tested and working ok. Closing. Thanks David! B-)

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/09