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

Feed names are empty in Configuring a Remote form

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.5, 3.1.1, 3.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Blocks, RSS
    • Labels:
    • Testing Instructions:
      Hide

      On oracle and postgres:

      1. As teacher
      2. Add an RSS block to a course
      3. Configure the block
      4. Add/edit feeds to add a couple of rss feeds to the block. One with custom title and another without it
      5. Return to the block configuration
      6. VERIFY: Verify the select list of feeds is shown - titledt one is shown and the not titled with the feed own title.
      7. Select one of the feeds and save the block configuration
      8. VERIFY: the block displays the rss feed
      Show
      On oracle and postgres: As teacher Add an RSS block to a course Configure the block Add/edit feeds to add a couple of rss feeds to the block. One with custom title and another without it Return to the block configuration VERIFY: Verify the select list of feeds is shown - titledt one is shown and the not titled with the feed own title. Select one of the feeds and save the block configuration VERIFY: the block displays the rss feed
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-55886-master

      Description

      If the database is Oracle, the name of the feeds are not displayed if they are haven't preferredtitle. With Oracle, a space (' ') is stored in preferredtitle instead of empty string (''). Thats why the following SQL sentence in /blocks/rss_client/edit_form.php file is not working for us:

      {{
      $titlesql = "CASE WHEN preferredtitle = '' THEN {$DB->sql_compare_text('title', 64)} ELSE preferredtitle END";
      }}

      To make it work with any database it would be necessary to replace the previous line with the following:

      {{
      $titlesql = "CASE WHEN preferredtitle = '' OR TRIM(preferredtitle) IS NULL THEN {$DB->sql_compare_text('title', 64)} ELSE preferredtitle END";
      }}

      With ORACLE the behaviour of TRIM is different from MySQL and returns NULL instead ''. So its necessary to mantein the current check and to add the correct one for Oracle to make code compatible with any database system.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Nov/16