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

Conditional availability: Restrictions based on current language

    XMLWordPrintable

Details

    • Improvement
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 2.5.3, 2.8.7, 2.9.1, 3.0.4
    • None
    • MOODLE_25_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE

    Description

      Access to the topic or activity can be restricted based upon user profile field. The language (lang) field is not available. I think this would be a great enhancement to the access restrictions, to be able to restrict access based upon the users' language setting in the user profile field (defaulting to system default language). This would enhance our ability to localize a course to a user, to only display the content that is applicable to the users' language

      To accomplish this I have added 2 lines of code in 2 files.

      1) /lib/conditionlib.php on line 641: 'lang' => get_user_field_name('lang'),
      2) /lib/moodlelib.php on line 3730: case 'language' : return get_string('lang');

      Thanks!

      There is already an implementation of this in plugin database: https://moodle.org/plugins/view/availability_language

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              plamen.vassilev Plamen Ivanov Vassilev
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón
              Votes:
              25 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated: