Widget:Sandbox: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
Line 282: Line 282:
function removeDuplicates(obj) {
function removeDuplicates(obj) {
                 if(res.Count > 45){
                 if(res.Count > 45){
                         event.data.maxQ = 45;
                         obj.maxQ = 45;
                 } else {
                 } else {
                         event.data.maxQ = res.Count;
                         obj.maxQ = res.Count;
                 }
                 }
var output = "<div id='removeNum'><b>Choose the number of questions you would like to answer. The maximum number of questions you can select is <span id='countShow'>" + event.data.maxQ + "</span>.</b><br /><br /><br />Number of questions:<input type='text' id='numQues' /><br /><br /><div id='Go' class='noSelect WBRButton'>Click here to begin the exam</div></div>";
var output = "<div id='removeNum'><b>Choose the number of questions you would like to answer. The maximum number of questions you can select is <span id='countShow'>" + obj.maxQ + "</span>.</b><br /><br /><br />Number of questions:<input type='text' id='numQues' /><br /><br /><div id='Go' class='noSelect WBRButton'>Click here to begin the exam</div></div>";
if ($("#exam").find('#numQues').length == 0) {
if ($("#exam").find('#numQues').length == 0) {
$("#exam").append(output);
$("#exam").append(output);

Revision as of 15:23, 18 March 2014