kimwoods
var months = [];
months.push(“Jan”,”Feb”,”Mar”,”Apr”,”May”,”Jun”,”Jul”,”Aug”,”Sep”,”Oct”,”Nov”,”Dec”);
function viewRubrics(assignmentId, assessmentUserId){
Boxy.load(“assignment.html;jsessionid=9E1675E24AEEA8D621298338641CD088.tc1_node7070?operation=applyRubrics&assignmentId=”+assignmentId+”&assessmentUserId=”+assessmentUserId+””,{options:{ STRING: {
remove: “remove”}}, unloadOnHide:true, afterShow: function() {
jQuery(‘.radio’).attr(‘disabled’, ‘disabled’);
jQuery(‘#rubric-save’).hide();
jQuery(‘#ok’).val(‘Ok’);
totalDen = jQuery(‘#max-point’).attr(‘point’);
jQuery(‘#grand-grade’).text( “0/” + parseInt(totalDen));
jQuery(‘.rubric-criteria input:checked’).each(function() {
calculateGrade(jQuery(this));
});
jQuery(‘.rubric-criteria input’).change(function() {
calculateGrade(jQuery(this));
});
}});
}
function calculateGrade(element) {
var totalNum = 0;
var rubricCriteriaID = jQuery(element).attr(‘name’);
var rubricCriteriaPct = jQuery(‘#criteria-‘ + rubricCriteriaID).attr(‘percentage’);
var rubricParameterID = jQuery(element).attr(‘value’);
var rubricParameterPct = jQuery(‘#th-‘ + jQuery(element).attr(‘place’)).attr(‘percentage’);
var rubricDen = (totalDen * rubricCriteriaPct) / 100;
var rubricNum = (rubricDen * rubricParameterPct) / 100;
jQuery(‘#criteria-‘ + rubricCriteriaID + ‘ td’).removeClass(‘selected’);
jQuery(element).parents(‘td’).addClass(‘selected’);
jQuery(‘#points-‘ + rubricCriteriaID ).text(rubricNum + “/” + rubricDen);
jQuery(‘#points-‘ + rubricCriteriaID ).attr(‘grade’, rubricCriteriaID + “|” + rubricParameterID + “|” + rubricNum + “|” + rubricDen);
jQuery(‘#grand-grade’).text(calculateGrandGrade() + “/” + parseInt(totalDen) );
}
function calculateGrandGrade() {
var totalNum = 0;
jQuery(‘.rubric-criteria td.last div’).each(function() {
var rubricCriteriaString = jQuery(this).attr(‘grade’);
if(rubricCriteriaString != null) {
rubricCriteriaArray = rubricCriteriaString.split(“|”);
var rubricParameterID = rubricCriteriaArray[1];
var rubricNum = rubricCriteriaArray[2];
if(!isNaN(parseInt(rubricNum))) {
totalNum = parseInt(rubricNum) + parseInt(totalNum);
}
}
});
var totalCount = jQuery(‘.rubric-criteria’).length;
var selectedItem = jQuery(‘.rubric-criteria input:checked’).length;
if(totalCount == selectedItem) {
jQuery(‘#rubric-save’).attr(“disabled”, false);
}
else {
jQuery(‘#rubric-save’).attr(“disabled”, true);
}
return parseInt(totalNum);
}
function createNewAttempt(assignmentId, assessmentUserId,userID)
{
Boxy.load(“assignment.html;jsessionid=9E1675E24AEEA8D621298338641CD088.tc1_node7070?operation=newAttempt&assignmentId=”+assignmentId+”&assessmentUserId=”+assessmentUserId+”&turnitinFlag=”+1+””,{options:{ STRING: {
remove: “remove”}}, unloadOnHide:true, afterShow: function() {
//jQuery(“.ui-dialog-title”).focus();
jQuery(“#attemptTitle”).focus();
jQuery(‘.uploadSave’).attr(‘disabled’,false);
if(jQuery(“#assignmentType”).val()== 2)
{
jQuery(“#submitToInstructor”).attr(“title”,”This will submit the files and share your originality score with the instructor. If you are uploading your individual portion to share with the group, do not click submit. Other group members will be able to view your files under ‘Group Attempts’. You will still be able to make more submissions.”)
}
else{
jQuery(“#submitToInstructor”).attr(“title”,”You’re about to submit files and share your originality score with the instructor. You will still be able to make more submissions.”)
}
jQuery(‘#newAttempt’).MultiFile({
STRING: {
file: ‘$file‘,
remove:’Remove
‘},
list: ‘#submitted-file-list’,
onFileSelect: function(element, value, master_element){
// jQuery(“.uploadDocBox”).attr(‘tabindex’,’-1′).focus();
jQuery(‘.uploadSave’).focus();
var uploadedFile = value;
uploadedFile = uploadedFile.split(‘.’).pop().toLowerCase();
jQuery(“#error-msg”).hide();
//jQuery(“newAttempt”).val(“”);
/* if(uploadedFile != “docx” && uploadedFile != “pdf” && uploadedFile != “doc” && uploadedFile != “jpeg”
&& uploadedFile != “jpg” && uploadedFile != “gif” && uploadedFile != “png” && uploadedFile != “tif”
&& uploadedFile != “xls” && uploadedFile != “xlsx” && uploadedFile != “txt” && uploadedFile != “ppt”
&& uploadedFile != “pptx” && uploadedFile != “rtf” && uploadedFile != “mpp” && uploadedFile != “wp”
&& uploadedFile != “wpd” && uploadedFile != “wp7” && uploadedFile != “mpp” && uploadedFile != “htm”
&& uploadedFile != “html” && uploadedFile != “swf” && uploadedFile != “avi” && uploadedFile != “mp3”
&& uploadedFile != “mp4” && uploadedFile != “wmv” && uploadedFile != “3gp” && uploadedFile != “mpg”
&& uploadedFile != “mpeg” && uploadedFile != “vob” && uploadedFile != “rm” && uploadedFile != “mov”
&& uploadedFile != “flv” && uploadedFile != “asf” && uploadedFile != “asx” && uploadedFile != “3g2”
&& uploadedFile != “zip” && uploadedFile != “rar” && uploadedFile != “rp” )
{
jQuery(“#error-msg”).html(“Enter a value with a valid extension.”);
jQuery(“#error-msg”).show();
return false;
}
else
{
return true;
} */
},
onFileAppend: function(element, value, master_element){
jQuery(element).attr(‘tabindex’,”-1″);
}
});
/*jQuery(“#upload”).validate({
rules: {
attemptTitle: {
required : {
check: function(value) {
alert(“here in check “+value);
if(value) {
return true;
}
else {
return false;
}
},
messages: {
attemptTitle: “Enter Title before saving attempt”
}
}}}}); */
jQuery(‘.uploadSave’).click(function() {
submitValidation();
if((jQuery.trim(jQuery(“#attemptTitle”).val()).length)>0){
if(fileUploadValidation())
{ if(jQuery(“#submitDirectlyToInstructor”).val() == ‘0’){
jQuery(“#submitted-file-list div span.atchmnt”).each(function(){
var fileName = jQuery(this).html();
activityData.createUploadDownloadActivity(“UploadFile”,’cd0dd9c2-0af7-4305-8d9a-f4bceb3f5672′,’f91d3697-fff6-4d21-ab72-2eea5ea612af’,fileName,new Date().getTime().toString());
});
activityData.createActivityData(‘NewAttempt’,userID,assignmentId,’bf00456f-af4e-49be-b41f-d3e38653e9ec’);
}
else{
activityData.createActivityData(‘AssignmentFinalSubmit’,’cd0dd9c2-0af7-4305-8d9a-f4bceb3f5672′,’f91d3697-fff6-4d21-ab72-2eea5ea612af’,’bf00456f-af4e-49be-b41f-d3e38653e9ec’);
}
var iframe = jQuery(‘”);
}
jQuery.post(actionUrl, {assignmentId: data[0], assignmentSubmissionId: data[1]},
function(data){
if(data != null) {
reponse = eval(“(” + data + “)”);
if(reponse.status == ‘success’ ) {
jQuery(‘.remover_button’).html(“”);
var now = new Date();
var date = months[now.getMonth()] + ” ” + now.getDate() + “, ” + now.getFullYear();
jQuery(‘#’ + id).html(“
” + date);
jQuery(“#reassignBox”).hide();
}
else {
alert(“Unable to submit”);
return false;
}
}
else {
alert(“Unable to process your request”);
return false;
}
});
disablePopup2();
}
jQuery(function() {
jQuery(“.allAttempts”).click(function() {
//Set Parent IFrame Height
updateParentIFrameHeight( true, 2000 );
});
jQuery(‘.allAttempts’).toggle(function() {
jQuery(“.divAllAttempts”).slideDown(“slow”);
jQuery(‘.allAttempts’).html(“Hide All Attempts”);
}, function() {
jQuery(“.divAllAttempts”).slideUp(“slow”);
jQuery(‘.allAttempts’).html(“View All Attempts”);
});
/* jQuery(‘.actionSubmit’).click(function() {
}); */
jQuery(‘.submitRequest’).click(function() {
activityData.createActivityData(‘AssignmentTIISubmit’,’cd0dd9c2-0af7-4305-8d9a-f4bceb3f5672′,’f91d3697-fff6-4d21-ab72-2eea5ea612af’,’bf00456f-af4e-49be-b41f-d3e38653e9ec’);
jQuery(this).parent(‘td’).addClass(‘remover’);
jQuery(‘.remover’).html(“”);
//jQuery(‘.submitRequest’).parent().html(“”);
jQuery.post(“assignment.html;jsessionid=9E1675E24AEEA8D621298338641CD088.tc1_node7070?operation=turnitinSubmit&assessmentSubmissionId=” + jQuery(this).attr(‘rel’), null, function(response) {
});
});
});
// ]]>
Details:
Please submit your assignment.
For assistance with your assignment, please use your text, Web resources, and all course materials.
Leave a Reply
Want to join the discussion?Feel free to contribute!