Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2741

If the lesson has an apostrophe in it, then we can't open marks pop-up

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: General
    • Labels:
      None

      Description

      Marcin, this is a close cousin of LDEV-2738.

      if a lesson name contains a apostrophe ('), then the javascript method that opens the window fails.

      To reproduce:

      1) Enable gradebook for monitors for the course (see course settings)
      2) create a lesson with name "Polish's fascination with potatoes" ;-)
      3) start the lesson

      Try to click on the Mark button and kaboom... javascript error.

      We need to escape the lesson name so it doesn't clash with the parameters in the javascript method call

      Javascript error:
      Error: missing ) after argument list
      openGradebookCourseMonitorPopup('Polish's eternal love with potatoes','http://137.111.246.19:8080/lams//gradebook/gradebookMonitoring.do?dispatch=courseMonitor&organisationID=9',850,400,0,0);

        Activity

        Hide
        marcin Marcin Cieslak added a comment -
        Fixed by encoding Organisation name before adding them as a javascript function parameter.
        Show
        marcin Marcin Cieslak added a comment - Fixed by encoding Organisation name before adding them as a javascript function parameter.
        Hide
        ernieg Ernie Ghiglione added a comment -
        Thanks Marcin

        i've just committed this missing bit http://lamscvs.melcoe.mq.edu.au:8060/fisheye/changelog/lams?cs=MAIN:ernieg:20111216132058

        Now we are all good.

        Cheers!

        Ernie
        Show
        ernieg Ernie Ghiglione added a comment - Thanks Marcin i've just committed this missing bit http://lamscvs.melcoe.mq.edu.au:8060/fisheye/changelog/lams?cs=MAIN:ernieg:20111216132058 Now we are all good. Cheers! Ernie

          People

          • Assignee:
            marcin Marcin Cieslak
            Reporter:
            ernieg Ernie Ghiglione
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development