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

Quotes mismatch leads to print "$cid" instead of the value of $cid

    Details

    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      While trying to fix MDL-14336 I came across nasty code within mod/data/lib.php that uses a mismatch of single and double quotes like this:

      echo '<option value="$cid">'.$currentfield->name.'</option>';

      which led not to solve $cid into its value, but printing out "$cid" to the HTML source instead. I have cleaned up the whole quotes related code within if (!empty($currentfields) && !empty($newfields)) { } and also added linebreaks after option tags to prevent making kilometers long lines of HTML code. Now the resulting table also displays properly, previously it got cut down somehow.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    15/May/08