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

\external_settings::__construct checks for "defined" variables which are always defined

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.1.6, 3.2.3
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      On Master

      1. Turn on autolink filter for all content and heading.
      2. Go to a course and edit coursename. Something like this -

        <span class="multilang" lang="en">your_content_in English</span>
              <span class="multilang" lang="ar">your_content_in_arabic_here</span>
        

      3. Go to your dashboard and make sure when you switch languages between English and Arabic, correct content is shown in courses summary tab.

      On all branches

      1. Run all test suites (behat + phpunit), this patch can possibly expose other existing bugs.
      2. Create a file called test.php with content -

        define('AJAX_SCRIPT', true);
        require_once(__DIR__ . '/config.php');
        require_once("lib/externallib.php");
        $settings = external_settings::get_instance();
        print_object((int)$settings->get_filter());
        

      3. Load it on browser and see the value should be 0
      4. Create another file with code -

        require_once(__DIR__ . '/config.php');
        require_once("lib/externallib.php");
        $settings = external_settings::get_instance();
        print_object((int)$settings->get_filter());
        

      5. Load it and check value, should be 1
      Show
      On Master Turn on autolink filter for all content and heading. Go to a course and edit coursename. Something like this - <span class="multilang" lang="en">your_content_in English</span> <span class="multilang" lang="ar">your_content_in_arabic_here</span> Go to your dashboard and make sure when you switch languages between English and Arabic, correct content is shown in courses summary tab. On all branches Run all test suites (behat + phpunit), this patch can possibly expose other existing bugs. Create a file called test.php with content - define('AJAX_SCRIPT', true); require_once(__DIR__ . '/config.php'); require_once("lib/externallib.php"); $settings = external_settings::get_instance(); print_object((int)$settings->get_filter()); Load it on browser and see the value should be 0 Create another file with code - require_once(__DIR__ . '/config.php'); require_once("lib/externallib.php"); $settings = external_settings::get_instance(); print_object((int)$settings->get_filter()); Load it and check value, should be 1
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-58691-master

      Description

      \external_settings::__construct checks for "defined" variables which are always defined

      The variables are always defined in setup.php

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ankit_frenz Ankit Agarwal
              Reporter:
              ankit_frenz Ankit Agarwal
              Peer reviewer:
              John Okely
              Integrator:
              Andrew Nicols
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/May/17