Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.5
    • Fix Version/s: 2.0
    • Component/s: Accessibility, Choice
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      35753

      Description

      The results display for a choice is a table, with answers represented as columns. There are three rows:

      • A header row with the answers.
      • A middle row with image tags displaying a bar graph.
      • A final row showing the results as numbers.

      Why it matters

      For one thing, a blind user must memorize column headers in order to read the table. The middle row is of no user to blind users.

      Possible solution

      The display would be more successful if the answers and results were directly linked, e.g., in a list:

      • Red: 4 answers, 50% of total
      • Blue: 2 answers, 25% of total
      • Green: 2 answers, 25% of total

      A list like this can easily be turned into an attractive bar graph with CSS.

      1. 20100326_MDL-20508_HEAD_antc_2.patch
        41 kB
        Rossiani Wijaya
      2. 20100326_MDL-20508_HEAD_antc.patch
        40 kB
        Rossiani Wijaya
      3. 20100401_MDL-20508_HEAD.patch
        42 kB
        Rossiani Wijaya
      4. 20100505_MDL-20508_HEAD.patch
        43 kB
        Rossiani Wijaya
      5. 20100708_MDL-20508_2.0.patch
        38 kB
        Rossiani Wijaya
      6. 20100719_MDL-20508_2.0.patch
        41 kB
        Rossiani Wijaya
      7. 20100720_MDL-20508_2.0.patch
        42 kB
        Rossiani Wijaya
      1. row.png
        0.2 kB

        Issue Links

          Activity

          Hide
          Rossiani Wijaya added a comment -

          Modified the results display page layout:

          • to eliminate the use of table row.
          • add result summary (as suggested above)
          • add 'skip-block' tag to user responses (results in graph)
          • removed choice_show_results and choice_show_form functions and adding new functions: prepare_choice_show_results and choice_prepare_options (mod/choice/lib.php).
          • add renderer class to display choices and results.

          Note: the patch is created after major commit for theme (yesterday). I also notice the alignment bugs in IE8 and will post the styling patch to fix it.

          This patch also address the label tag issue for MDL-20507.

          Please take a look the patch and provide me with some feedback.

          Thanks
          Rosie

          Show
          Rossiani Wijaya added a comment - Modified the results display page layout: to eliminate the use of table row. add result summary (as suggested above) add 'skip-block' tag to user responses (results in graph) removed choice_show_results and choice_show_form functions and adding new functions: prepare_choice_show_results and choice_prepare_options (mod/choice/lib.php). add renderer class to display choices and results. Note: the patch is created after major commit for theme (yesterday). I also notice the alignment bugs in IE8 and will post the styling patch to fix it. This patch also address the label tag issue for MDL-20507 . Please take a look the patch and provide me with some feedback. Thanks Rosie
          Hide
          Dan Marsden added a comment -

          Hi Rossiani - is your patch missing the renderer.php file?

          Show
          Dan Marsden added a comment - Hi Rossiani - is your patch missing the renderer.php file?
          Hide
          Rossiani Wijaya added a comment -

          Re-attaching the file.

          Thank you Dan

          Show
          Rossiani Wijaya added a comment - Re-attaching the file. Thank you Dan
          Hide
          Rossiani Wijaya added a comment -

          Re-attached patch to fix undefined property error and update the function logic.

          I will perform more testing next week.

          note: site's cache has to be clear from: Admin > Appearance > Themes >Theme selector > Invalidate theme caches

          Show
          Rossiani Wijaya added a comment - Re-attached patch to fix undefined property error and update the function logic. I will perform more testing next week. note: site's cache has to be clear from: Admin > Appearance > Themes >Theme selector > Invalidate theme caches
          Hide
          Rossiani Wijaya added a comment -

          generate new patch to:

          • convert in-line javascript to use output render
          • modified patch to work with themes and enrollment commit.
          • update output layout and style.

          Note: please 'invalidate theme caches' after applying the patch. (Admin > Appearance > Themes >Theme selector > Invalidate theme caches)

          Show
          Rossiani Wijaya added a comment - generate new patch to: convert in-line javascript to use output render modified patch to work with themes and enrollment commit. update output layout and style. Note: please 'invalidate theme caches' after applying the patch. (Admin > Appearance > Themes >Theme selector > Invalidate theme caches)
          Hide
          Ray Lawrence added a comment -

          A screen shot would be useful to visualise this, if possible.

          Invalidate theme cache: What is the wider implication of requiring this?

          Show
          Ray Lawrence added a comment - A screen shot would be useful to visualise this, if possible. Invalidate theme cache: What is the wider implication of requiring this?
          Hide
          Sam Hemelryk added a comment -

          Hi Ray,

          I think the purpose of invalidating the theme caches is because Rossi's latest patch makes CSS changes.
          As Moodle 2.0 combines many of the CSS files required by a page into a single file and caches it in your moodledata directory you would need to invalidate the caches in order to see the changes in the patch. Otherwise the cached file would be served without the new changes.

          Invalidating the theme caches is only required when CSS changes have been made and simply causes Moodle to rebuild the items it has cached in your moodledata directory.

          Hope this helps.

          Show
          Sam Hemelryk added a comment - Hi Ray, I think the purpose of invalidating the theme caches is because Rossi's latest patch makes CSS changes. As Moodle 2.0 combines many of the CSS files required by a page into a single file and caches it in your moodledata directory you would need to invalidate the caches in order to see the changes in the patch. Otherwise the cached file would be served without the new changes. Invalidating the theme caches is only required when CSS changes have been made and simply causes Moodle to rebuild the items it has cached in your moodledata directory. Hope this helps.
          Hide
          Rossiani Wijaya added a comment -

          update patch to apply with the new language modification.

          Show
          Rossiani Wijaya added a comment - update patch to apply with the new language modification.
          Hide
          Rossiani Wijaya added a comment -

          Added Olli, Nick, Chetz and Leena as watchers.

          Your comments / feedback on this issue would be much appreciated.

          Thanks
          Rosie

          Show
          Rossiani Wijaya added a comment - Added Olli, Nick, Chetz and Leena as watchers. Your comments / feedback on this issue would be much appreciated. Thanks Rosie
          Hide
          Rossiani Wijaya added a comment -

          updated patch to works with the current commit of '/moodle/mod/choice/lib.php'

          Show
          Rossiani Wijaya added a comment - updated patch to works with the current commit of '/moodle/mod/choice/lib.php'
          Hide
          Rossiani Wijaya added a comment -

          accessibility qa site is located at http://access.moodle.net/mod/choice/view.php?id=4

          Show
          Rossiani Wijaya added a comment - accessibility qa site is located at http://access.moodle.net/mod/choice/view.php?id=4
          Hide
          Rossiani Wijaya added a comment -

          latest patch is attached.

          please copy row.png file in /mod/choice/

          thanks

          Show
          Rossiani Wijaya added a comment - latest patch is attached. please copy row.png file in /mod/choice/ thanks
          Hide
          Martin Dougiamas added a comment -

          Images need to be in mod/choice/pix

          Show
          Martin Dougiamas added a comment - Images need to be in mod/choice/pix
          Hide
          Dan Marsden added a comment -

          Hi Rossiani,

          just having an initial look at this - few issues when no choices have been selected on the response page:
          Notice: Trying to get property of non-object in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 102

          Notice: Trying to get property of non-object in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 105

          Warning: ksort() expects parameter 1 to be array, null given in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 335

          Warning: Invalid argument supplied for foreach() in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 338

          also I noticed that if a teacher views the responses page it shows an anonymous view when Publish results is set to "do not publish results to students" - this seems incorrect.

          The old version of the choice always showed full results to teachers - even if Privacy of results was set to hide names - If we change this to hide from the teacher view it should probably be an extra setting. eg "hide from students", "hide from everyone" - would be quite nice if we could "lock" that setting for normal teachers via a new capability that prevented them from changing to view full details - we could give that capability to admins so that it could be reversed if needed.

          hope that makes sense - let me know if you need clarification.

          oh - the user I was testing when viewing the responses page was a site admin, but also enrolled as a student in the course. - not sure if that makes any difference.

          Show
          Dan Marsden added a comment - Hi Rossiani, just having an initial look at this - few issues when no choices have been selected on the response page: Notice: Trying to get property of non-object in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 102 Notice: Trying to get property of non-object in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 105 Warning: ksort() expects parameter 1 to be array, null given in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 335 Warning: Invalid argument supplied for foreach() in /home/dan/www/workspace/moodle/mod/choice/renderer.php on line 338 also I noticed that if a teacher views the responses page it shows an anonymous view when Publish results is set to "do not publish results to students" - this seems incorrect. The old version of the choice always showed full results to teachers - even if Privacy of results was set to hide names - If we change this to hide from the teacher view it should probably be an extra setting. eg "hide from students", "hide from everyone" - would be quite nice if we could "lock" that setting for normal teachers via a new capability that prevented them from changing to view full details - we could give that capability to admins so that it could be reversed if needed. hope that makes sense - let me know if you need clarification. oh - the user I was testing when viewing the responses page was a site admin, but also enrolled as a student in the course. - not sure if that makes any difference.
          Hide
          Rossiani Wijaya added a comment -

          Hi Dan,

          Thank you for reviewing the patch.

          I installed the patch to fresh 2.0 install and creating new choice activity, I didn't get any error message.

          Will look into this issue first thing tomorrow.

          Rosie

          Show
          Rossiani Wijaya added a comment - Hi Dan, Thank you for reviewing the patch. I installed the patch to fresh 2.0 install and creating new choice activity, I didn't get any error message. Will look into this issue first thing tomorrow. Rosie
          Hide
          Rossiani Wijaya added a comment -

          Hi Dan,

          I can't reproduce the errors you mention above. I created new choice activity with no choices selected and had my debugger set to true.

          However, I fixed the view responses page to always show in 'full response" to teacher - even if privacy results was set to hide names.

          Posting new patch for the above fix. Please take a look and let me know if you have any question regarding the changes.

          Note:

          • move column.png file from /mod/choice/column.png to /mod/choice/pix/
          • add the attached row.png file to /mod/choice/pix/ folder

          Thanks
          Rosie

          Show
          Rossiani Wijaya added a comment - Hi Dan, I can't reproduce the errors you mention above. I created new choice activity with no choices selected and had my debugger set to true. However, I fixed the view responses page to always show in 'full response" to teacher - even if privacy results was set to hide names. Posting new patch for the above fix. Please take a look and let me know if you have any question regarding the changes. Note: move column.png file from /mod/choice/column.png to /mod/choice/pix/ add the attached row.png file to /mod/choice/pix/ folder Thanks Rosie
          Hide
          Dan Marsden added a comment -

          Hi Rosie,

          still doesn't look right sorry!

          the Main view of the choice has always shown the results depending on the settings made in the choice - if "publish anonymous" is set then the view.php page will always show anonymous detail

          A teacher should be able to select the "view responses" report.php page and see all the actual users responses.

          the report.php page still shows anonymous results to the teacher (incorrect)
          now the view.php page doesn't respect the settings made in the choice (shows full results to teacher even if anonymous set)

          php errors seem to have gone - might have been a local issue or something that's already been fixed in head.

          Show
          Dan Marsden added a comment - Hi Rosie, still doesn't look right sorry! the Main view of the choice has always shown the results depending on the settings made in the choice - if "publish anonymous" is set then the view.php page will always show anonymous detail A teacher should be able to select the "view responses" report.php page and see all the actual users responses. the report.php page still shows anonymous results to the teacher (incorrect) now the view.php page doesn't respect the settings made in the choice (shows full results to teacher even if anonymous set) php errors seem to have gone - might have been a local issue or something that's already been fixed in head.
          Hide
          Dan Marsden added a comment -

          reading my earlier comment - looks like I didn't explain the teachers being able to see full results quite right - they should only be able to see full results on the report.php page.

          Show
          Dan Marsden added a comment - reading my earlier comment - looks like I didn't explain the teachers being able to see full results quite right - they should only be able to see full results on the report.php page.
          Hide
          Rossiani Wijaya added a comment -

          oh! its on report.php file. I've been fixing view.php file.

          fixing the issue right now.

          Thank you for your feedback.

          Rosie

          Show
          Rossiani Wijaya added a comment - oh! its on report.php file. I've been fixing view.php file. fixing the issue right now. Thank you for your feedback. Rosie
          Hide
          Rossiani Wijaya added a comment -

          Hi Dan,

          I fixed the above issues.

          Summarizing the current behavior:
          1/ view responses (report.php) will always display full results for teacher (or user who has capability to read choice responses).
          2/ in view.php page:

          • For teacher: results will always be display.
          • for student: results will be display according to setting value.

          I'm a little bit confuse with your second comment - teacher should only be able to see full results on the report.php page - if privacy of results is set to full results and publish results is set to always show result to student, then the view.php will display the full results, correct?

          attaching the latest patch.

          Rosie

          Show
          Rossiani Wijaya added a comment - Hi Dan, I fixed the above issues. Summarizing the current behavior: 1/ view responses (report.php) will always display full results for teacher (or user who has capability to read choice responses). 2/ in view.php page: For teacher: results will always be display. for student: results will be display according to setting value. I'm a little bit confuse with your second comment - teacher should only be able to see full results on the report.php page - if privacy of results is set to full results and publish results is set to always show result to student, then the view.php will display the full results, correct? attaching the latest patch. Rosie
          Hide
          Dan Marsden added a comment -

          HI Rosie,

          view.php always respects the settings made in the choice - no matter if user is teacher/student - this is how the choice currently operates.

          report.php is for the teachers to view the actual results so should ignore settings and allow full results to be displayed.

          hope that makes sense!

          this is getting very close to 2.0 release - I wonder if this should be shelved for 2.0.1

          Show
          Dan Marsden added a comment - HI Rosie, view.php always respects the settings made in the choice - no matter if user is teacher/student - this is how the choice currently operates. report.php is for the teachers to view the actual results so should ignore settings and allow full results to be displayed. hope that makes sense! this is getting very close to 2.0 release - I wonder if this should be shelved for 2.0.1
          Hide
          Rossiani Wijaya added a comment -

          Hi Dan,

          Thank you for your comment.

          I created a patch to work as you describe above. Please take a look and let me know if there's anything else need to be fix.

          Rosie

          Show
          Rossiani Wijaya added a comment - Hi Dan, Thank you for your comment. I created a patch to work as you describe above. Please take a look and let me know if there's anything else need to be fix. Rosie
          Hide
          Dan Marsden added a comment -

          Hi Roise

          +1 to commit your latest patch

          limits work fine/display of results looks good!

          Show
          Dan Marsden added a comment - Hi Roise +1 to commit your latest patch limits work fine/display of results looks good!
          Hide
          Rossiani Wijaya added a comment -

          Committed patch to 2.0

          Show
          Rossiani Wijaya added a comment - Committed patch to 2.0

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: