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

Error message 'invalidcourseid' not being passed course id

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: General
    • Labels:

      Description

      Whenever the error message 'invalidcourseid' is used, either via print_error or moodle_exception or get_string, never seems to pass the courseid variable. Even though the string is defined as:

      'You are trying to use an invalid course ID: ({$a})'

      One way to solve the problem would be to just remove the {$id} from the string, but we actually would like to have the string since we want to have a friendlier error message.

      For example,

      "The course you are trying access is not located on this server. Please try finding it on our archive server: https://archive.server/course/view.php?id={$a}"

      I am submitting a patch to fix all instances of the 'invalidcourseid' to also pass in the courseid.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              rex Rex Lorenzo
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: