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

Invalid get_string call

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.0
    • Assignment (2.2)
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE
    • Easy

    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

              nebgor Aparup Banerjee
              bushido Mark Nielsen
              Nobody Nobody
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                24/Nov/10