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

Invalid get_string call

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      In 2.0, this produces debugging error:

      $typetitle = get_string('type'.$type, 'assignment');
       
      // hack to support pluggable assignment type titles
      if ($typetitle === '[[type'.$type.']]') {
          $typetitle  = get_string('type'.$type, 'assignment_'.$type);
      }

      Should probably be replaced with:

      if (get_string_manager()->string_exists('type'.$type, 'assignment')) {
          $typetitle = get_string('type'.$type, 'assignment');
      } else {
          $typetitle  = get_string('type'.$type, 'assignment_'.$type);
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10