Moodle
  1. Moodle
  2. MDL-25177

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
    • Rank:
      6401

      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

        Activity

        Hide
        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
        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 Lawrence added a comment -

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

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

        Upgrading to Major.

        Show
        Ray Lawrence added a comment - Upgrading to Major.
        Hide
        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
        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
        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
        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
        Jason Hardin added a comment -

        This is still occurring in 2.0.2+

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

        This patch should fix the issue.

        Show
        Jason Hardin added a comment - This patch should fix the issue.
        Hide
        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
        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
        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
        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
        Sam Hemelryk added a comment -

        Only one thing was missed here - the testing instructions

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

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

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

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

        Show
        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: