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 593: Line 593:
var ratyLayers = "<center>Rate this question!</center><br /><span style='position:relative; float:left;'>Difficulty: <div id='star1'></div></span><span style='position:relative; float:left;left:33%;'>High Yield: <div id='star2'></div></span><span style='position:relative; float:left;left:66%'>Quality: <div id='star3'></div></span><br /><br /><br />"
var ratyLayers = "<center>Rate this question!</center><br /><span style='position:relative; float:left;'>Difficulty: <div id='star1'></div></span><span style='position:relative; float:left;left:33%;'>High Yield: <div id='star2'></div></span><span style='position:relative; float:left;left:66%'>Quality: <div id='star3'></div></span><br /><br /><br />"
$("#examSpace").prepend(ratyLayers);
$("#examSpace").prepend(ratyLayers);
console.log(getRating("difficulty", exam.examQuestions[exam.currentQuestion].PageName));
        exam.examQuestions[exam.currentQuestion].ratings = getRating("difficulty", exam.examQuestions[exam.currentQuestion].PageName));
$("#star1").raty({
$("#star1").raty({
path : 'http://www.wikidoc.org/includes/raty/img/',
path : 'http://www.wikidoc.org/includes/raty/img/',
Line 599: Line 599:
submitRating("difficulty", score, exam.examQuestions[exam.currentQuestion].PageName)
submitRating("difficulty", score, exam.examQuestions[exam.currentQuestion].PageName)
},
},
score : function(){getRating("difficulty", exam.examQuestions[exam.currentQuestion].PageName);},
score : exam.examQuestions[exam.currentQuestion].ratings.d},
hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good']
hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good']
});
});
Line 607: Line 607:
submitRating("yield", score, exam.examQuestions[exam.currentQuestion].PageName)
submitRating("yield", score, exam.examQuestions[exam.currentQuestion].PageName)
},
},
score : function (event) {
score : exam.examQuestions[exam.currentQuestion].ratings.y,
return getRating("yield", exam.examQuestions[exam.currentQuestion].PageName);
},
hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good']
hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good']
});
});
Line 617: Line 615:
submitRating("quality", score, exam.examQuestions[exam.currentQuestion].PageName)
submitRating("quality", score, exam.examQuestions[exam.currentQuestion].PageName)
},
},
score : function (event) {
score : exam.examQuestions[exam.currentQuestion].ratings.q,
return getRating("quality", exam.examQuestions[exam.currentQuestion].PageName);
},
hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good']
hints : ['Very Poor', 'Poor', 'Average', 'Good', 'Very Good']
});
});

Revision as of 21:40, 20 February 2014