WeBWorK Main Forum

Score summary for last submit popup on gateway tests

Score summary for last submit popup on gateway tests

by Arturo Portnoy -
Number of replies: 4
Hi, I am using gateway tests on a mobile lab that uses amazon fire tablets. These are 7 in tablets and the score summary for last submit popup that appears after first submission obstructs a good portion of the screen. Is there any way to make this pop up smaller, or to make it movable so students could drag it to another part of the screen? Thanks.
In reply to Arturo Portnoy

Re: Score summary for last submit popup on gateway tests

by Edwin Flórez -
Hello,

my code hack using toggle from jQuery.

1. Add

function toggleDiv(divId) {
$("#"+divId).toggle();
}

in /opt/webwork/webwork2/htdocs/js/apps/GatewayQuiz/gateway.js.

2. Adding Show/Hide and a new div in

/opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm

Find line:
1911: print CGI::start_div({-id=>"gwScoreSummary"}),

and add this three lines:
1912 CGI::a({-href=>"javascript:toggleDiv('gwScoreSummaryContent')"},$r->maketext("Hide/Show")),
1913 CGI::br(),
1914 CGI::start_div({-id=>"gwScoreSummaryContent"}),
.
.
.
Finally, include the close div in line
1922 print CGI::end_table(), CGI::end_div(), CGI::end_div();

Do a WebServer restart.

This works, but I hope someone from WeBWorK Team do a better solution. You will lose it when you do a update (git pull) and if you make some typo, the system will not run.




In reply to Edwin Flórez

Re: Score summary for last submit popup on gateway tests

by Arturo Portnoy -
Thanks Edwin! It works very well. Hopefully it will be officially incorporated in some future release. It is an important feature when using smaller screens.
In reply to Edwin Flórez

Re: Score summary for last submit popup on gateway tests

by Arturo Portnoy -
With Amazon fire tablets at $50, you can set up a 100 station controlled* examination lab with $5,000! 

*with amazon parental controls you can control use of forbidden apps and with a kiosk browser you can restrict browsing to the exam.