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

Disable text filtering on questiontext in quiz edit page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3, 3.3.6, 3.4.3, 3.5
    • Fix Version/s: None
    • Component/s: Questions, Quiz
    • Labels:
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
      MDL-58945-MOODLE_39_STABLE
    • Pull 3.10 Branch:
      MDL-58945-MOODLE_310_STABLE
    • Pull 3.11 Branch:
      MDL-58945-MOODLE_311_STABLE
    • Testing Instructions:
      Hide
      1. create a quiz
      2. add formulas question
      3. add to the question text in html:

          <jsxgraph height="400" width="400" box="{MB}">
              (function() { let brd = JXG.JSXGraph.initBoard("{MB}", {boundingbox:[{=-W},{W},{W},{=-W}], axis:true, grid:true, showNavigation:false, showCopyright:false }); brd.create('text',[{W}-0.5,0.5,"x"]); brd.create('text',[-0.5,{W}-0.5,"y"]); let pC = brd.create('point',
              [{pointC[0]}, {pointC[1]}],{fixed:true, visible:false}); let pD = brd.create('point', [{pointD[0]}, {pointD[1]}],{fixed:true, visible:false}); let l1= brd.create('line',[pC, pD]); })();    </jsxgraph>

       

      1. save and return to the editing quiz page and try to delete/edit maximum mark
      Show
      create a quiz add formulas question add to the question text in html: <jsxgraph height= "400" width= "400" box= "{MB}" > (function() { let brd = JXG.JSXGraph.initBoard( "{MB}" , {boundingbox:[{=-W},{W},{W},{=-W}], axis: true , grid: true , showNavigation: false , showCopyright: false }); brd.create( 'text' ,[{W}- 0.5 , 0.5 , "x" ]); brd.create( 'text' ,[- 0.5 ,{W}- 0.5 , "y" ]); let pC = brd.create( 'point' , [{pointC[ 0 ]}, {pointC[ 1 ]}],{fixed: true , visible: false }); let pD = brd.create( 'point' , [{pointD[ 0 ]}, {pointD[ 1 ]}],{fixed: true , visible: false }); let l1= brd.create( 'line' ,[pC, pD]); })(); </jsxgraph>   save and return to the editing quiz page and try to delete/edit maximum mark

      Description

      When in quiz edit page, the text filtering runs on the questiontext, and sometimes causes JS errors because it is out of question context. Running the text filters in the question context works just fine.

      It seems unnecessary to use filters on the edit page, especially if they generate JS errors.

      In out case, we are using the Formula question type together with the JSXgraph filter, and this combination was casing JS error only on the edit page.

        Attachments

          Activity

            People

            Assignee:
            avimoto Avi Levy
            Reporter:
            leac Lea Cohen
            Peer reviewer:
            Tim Hunt Tim Hunt
            Participants:
            Component watchers:
            Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: