`// Translators: %(earned)s is the number of points earned. %(possible)s is the total number of points (examples: 0/1, 1/1, 2/3, 5/10). The total number of points will always be at least 1. We pluralize based on the total number of points (example: 0/1 point; 1/2 points)`
};
progress_template=ngettext('%(earned)s/%(possible)s point (graded)','%(earned)s/%(possible)s points (graded)',possible)
`// Translators: %(earned)s is the number of points earned. %(possible)s is the total number of points (examples: 0/1, 1/1, 2/3, 5/10). The total number of points will always be at least 1. We pluralize based on the total number of points (example: 0/1 point; 1/2 points)`
this.focus_on_notification=function(type){
progress_template=ngettext('%(earned)s/%(possible)s point (ungraded)','%(earned)s/%(possible)s points (ungraded)',possible)
# TODO add hooks for problem types here by inspecting response.html and doing
earned=parseFloat(a[0]);
# stuff if a div w a class is found
possible=parseFloat(a[1]);
if(graded==="True"&&possible!==0){
setupInputTypes: =>
// Translators: %(earned)s is the number of points earned. %(possible)s is the total number of points (examples: 0/1, 1/1, 2/3, 5/10). The total number of points will always be at least 1. We pluralize based on the total number of points (example: 0/1 point; 1/2 points);
@inputtypeDisplays = {}
progress_template=ngettext('%(earned)s/%(possible)s point (graded)','%(earned)s/%(possible)s points (graded)',possible);
// Translators: %(earned)s is the number of points earned. %(possible)s is the total number of points (examples: 0/1, 1/1, 2/3, 5/10). The total number of points will always be at least 1. We pluralize based on the total number of points (example: 0/1 point; 1/2 points);
id = $(inputtype).attr('id')
progress_template=ngettext('%(earned)s/%(possible)s point (ungraded)','%(earned)s/%(possible)s points (ungraded)',possible);
for cls in classes
}
setupMethod = @inputtypeSetupMethods[cls]
progress=interpolate(progress_template,{
if setupMethod?
'earned':earned,
@inputtypeDisplays[id] = setupMethod(inputtype)
'possible':possible
},true);
# If some function wants to be called before sending the answer to the
alert"Submission aborted! Sorry, your browser does not support file uploads. If you can, please use Chrome or Safari which have been verified to support file uploads."
}else{
@enableSubmitButtontrue
new_timeout=prev_timeout*2;
return
if(new_timeout>=60000){
deletewindow.queuePollerID;
timeout_id=@enableSubmitButtonAfterTimeout()
return_this.gentle_alert(gettext("The grading process is still running. Refresh the page to see updates."));
alert("Submission aborted! Sorry, your browser does not support file uploads. If you can, please use Chrome or Safari which have been verified to support file uploads.");
"Used to check available answers and if something is checked (or the answer is set in some textbox)\n\"Submit\" button becomes enabled. Otherwise it is disabled by default.\n\nArguments:\n bind (bool): used on the first check to attach event handlers to input fields\n to change \"Submit\" enable status in case of some manipulations with answers";