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

Choice activity now loads responses as a pop-up without option

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.0.1
    • Fix Version/s: 2.0.4
    • Component/s: Choice
    • Labels:
      None
    • Environment:
      2.0 RC1 daily build 12112010

      Description

      When responding to a choice activity, the responses now appear to automatically load in a pop-up window, unlike 1.9 where it would just load the responses screen in the same window. I've classed this as a bug as it seems to be inconsistent with Moodle's usual behaviour and also there is no option to choose whether you want it in a pop up or not (that I can see anyway).

      Apologies if its meant to be like this! Thoughts welcome

        Gliffy Diagrams

          Activity

          Hide
          danmarsden Dan Marsden added a comment -

          Hi Mark,

          I'm having trouble reproducing this - is it still behaving like this with the latest code?

          thanks,

          Dan

          Show
          danmarsden Dan Marsden added a comment - Hi Mark, I'm having trouble reproducing this - is it still behaving like this with the latest code? thanks, Dan
          Hide
          ray Ray Lawrence added a comment -

          Yes. This behaviour is still present in 2.0.1. Chrome, FF, IE8.

          Show
          ray Ray Lawrence added a comment - Yes. This behaviour is still present in 2.0.1. Chrome, FF, IE8.
          Hide
          ray Ray Lawrence added a comment -

          Upgrading to Major.

          Show
          ray Ray Lawrence added a comment - Upgrading to Major.
          Hide
          danmarsden Dan Marsden added a comment -

          Ray/Mark - can you please provide details of the settings you are using in the choice? - possibly also a screenshot of the pop-up so I can try and reproduce this?

          Show
          danmarsden Dan Marsden added a comment - Ray/Mark - can you please provide details of the settings you are using in the choice? - possibly also a screenshot of the pop-up so I can try and reproduce this?
          Hide
          jrh18 Jason Hardin added a comment -

          I found theis same problem. It is due to like 43 in mod/choice/renderer.php

          $attributes = array('method'=>'POST', 'target'=>$target, 'class'=> $layoutclass);

          those attributes are being added to a form and when you do target instead of action in an html form it causes a new window to popup.

          The fix is
          $attributes = array('method'=>'POST', 'action'=>$target, 'class'=> $layoutclass);

          Show
          jrh18 Jason Hardin added a comment - I found theis same problem. It is due to like 43 in mod/choice/renderer.php $attributes = array('method'=>'POST', 'target'=>$target, 'class'=> $layoutclass); those attributes are being added to a form and when you do target instead of action in an html form it causes a new window to popup. The fix is $attributes = array('method'=>'POST', 'action'=>$target, 'class'=> $layoutclass);
          Hide
          jrh18 Jason Hardin added a comment -

          This is still occurring in 2.0.2+

          Show
          jrh18 Jason Hardin added a comment - This is still occurring in 2.0.2+
          Hide
          jrh18 Jason Hardin added a comment -

          This patch should fix the issue.

          Show
          jrh18 Jason Hardin added a comment - This patch should fix the issue.
          Hide
          danmarsden Dan Marsden added a comment -

          I'm guessing as component maintainer I'm allowed to flag this as ok? - esp as I'm peer reviewing the code too? - the patch was provided externally.

          I guess someone else will tell me if not...

          Show
          danmarsden Dan Marsden added a comment - I'm guessing as component maintainer I'm allowed to flag this as ok? - esp as I'm peer reviewing the code too? - the patch was provided externally. I guess someone else will tell me if not...
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Hi guys this has been integrated now.

          Jason - thanks for creating the patch - this is certainly a bug given that we aim to be xhtml compliant and target is a deprecated attribute.

          Dan thank you as well, you did the right thing here.
          As component lead we want you to review and put forward changes.

          Cheers
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Hi guys this has been integrated now. Jason - thanks for creating the patch - this is certainly a bug given that we aim to be xhtml compliant and target is a deprecated attribute. Dan thank you as well, you did the right thing here. As component lead we want you to review and put forward changes. Cheers Sam
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Only one thing was missed here - the testing instructions

          Show
          samhemelryk Sam Hemelryk added a comment - Only one thing was missed here - the testing instructions
          Hide
          rajeshtaneja Rajesh Taneja added a comment -

          Choice activity response is now visible in the same window.
          Thanks for fixing bug.

          Show
          rajeshtaneja Rajesh Taneja added a comment - Choice activity response is now visible in the same window. Thanks for fixing bug.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          And this is now part of Moodle upstream, many thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - And this is now part of Moodle upstream, many thanks!

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                1/Aug/11