From ce7f39631cb20fb2273400b1ce033a45173a7207 Mon Sep 17 00:00:00 2001 From: David Winn Date: Fri, 26 Oct 2018 14:33:40 +0100 Subject: [PATCH] Release v2018102601 --- CHANGELOG.md | 17 +++++++++++++++-- classes/v1migration/v1migration.php | 2 +- jquery/plugins.php | 8 ++++---- jquery/turnitintooltwo-2018082301.min.js | 3 --- ...8082301.js => turnitintooltwo-2018102601.js} | 0 jquery/turnitintooltwo-2018102601.min.js | 3 +++ jquery/turnitintooltwo_extra-2018082301.min.js | 2 -- ...1.js => turnitintooltwo_extra-2018102601.js} | 0 jquery/turnitintooltwo_extra-2018102601.min.js | 2 ++ ...itintooltwo_migration_tool-2018082301.min.js | 2 -- ...urnitintooltwo_migration_tool-2018102601.js} | 0 ...itintooltwo_migration_tool-2018102601.min.js | 2 ++ .../turnitintooltwo_settings-2018082301.min.js | 2 -- ...s => turnitintooltwo_settings-2018102601.js} | 0 .../turnitintooltwo_settings-2018102601.min.js | 2 ++ lib.php | 4 ++-- mod_form.php | 2 +- version.php | 2 +- 18 files changed, 33 insertions(+), 20 deletions(-) delete mode 100755 jquery/turnitintooltwo-2018082301.min.js rename jquery/{turnitintooltwo-2018082301.js => turnitintooltwo-2018102601.js} (100%) create mode 100755 jquery/turnitintooltwo-2018102601.min.js delete mode 100644 jquery/turnitintooltwo_extra-2018082301.min.js rename jquery/{turnitintooltwo_extra-2018082301.js => turnitintooltwo_extra-2018102601.js} (100%) create mode 100644 jquery/turnitintooltwo_extra-2018102601.min.js delete mode 100644 jquery/turnitintooltwo_migration_tool-2018082301.min.js rename jquery/{turnitintooltwo_migration_tool-2018082301.js => turnitintooltwo_migration_tool-2018102601.js} (100%) create mode 100644 jquery/turnitintooltwo_migration_tool-2018102601.min.js delete mode 100755 jquery/turnitintooltwo_settings-2018082301.min.js rename jquery/{turnitintooltwo_settings-2018082301.js => turnitintooltwo_settings-2018102601.js} (100%) create mode 100755 jquery/turnitintooltwo_settings-2018102601.min.js diff --git a/CHANGELOG.md b/CHANGELOG.md index bcbfe9d3..bc77ee36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,17 @@ -### Date: 2018-October-19 +### Date: 2018-October-26 +### Release: v2018102601 + +#### Fixes and enhancements + +--- + +#### The course restoration tool has now been restored for use! + +Were you previously using Turnitin.com or TurnitinUK.com before making the switch over to Moodle? The course restoration tool allows you to take your old classes and assignments with you by recreating them within Moodle. Previously, a bug had prevented this functionality from working as intended. Want to learn more? [Check out our guide](https://help.turnitin.com/Feedback_Studio/Moodle/Direct%20V2/Administrator/Administrator%20Category.htm#Turnitinclassrestoration). + +--- + +### Date: 2018-October-19 ### Release: v2018101901 #### Fixes and enhancements @@ -19,7 +32,7 @@ We've received some invaluable bug fixes, in the form of pull requests, to help --- -### Date: 2018-August-28 +### Date: 2018-August-28 ### Release: v2018082801 ### :wrench: Fixes and enhancements diff --git a/classes/v1migration/v1migration.php b/classes/v1migration/v1migration.php index 59958a64..59adaa7f 100644 --- a/classes/v1migration/v1migration.php +++ b/classes/v1migration/v1migration.php @@ -568,7 +568,7 @@ private function log_success_migration_event($turnitintooltwoid, $course_id, $v1 } /** - * Get assignments for migrated data table. Called from ajax.php via turnitintooltwo_extra-2018082301.min.js. + * Get assignments for migrated data table. Called from ajax.php via turnitintooltwo_extra-2018102601.min.js. * * @global type $DB * @return array return array of assignments to display diff --git a/jquery/plugins.php b/jquery/plugins.php index 8c392d7b..f9f49b64 100644 --- a/jquery/plugins.php +++ b/jquery/plugins.php @@ -19,14 +19,14 @@ $plugins = array( 'turnitintooltwo-dataTables' => array('files' => array('jquery.dataTables.js', 'jquery.dataTables.css')), 'turnitintooltwo-dataTables_plugins' => array('files' => array('jquery.dataTables.plugins.js')), - 'turnitintooltwo-turnitintooltwo' => array('files' => array('turnitintooltwo-2018082301.min.js')), - 'turnitintooltwo-turnitintooltwo_extra' => array('files' => array('turnitintooltwo_extra-2018082301.min.js')), - 'turnitintooltwo-turnitintooltwo_settings' => array('files' => array('turnitintooltwo_settings-2018082301.min.js')), + 'turnitintooltwo-turnitintooltwo' => array('files' => array('turnitintooltwo-2018102601.min.js')), + 'turnitintooltwo-turnitintooltwo_extra' => array('files' => array('turnitintooltwo_extra-2018102601.min.js')), + 'turnitintooltwo-turnitintooltwo_settings' => array('files' => array('turnitintooltwo_settings-2018102601.min.js')), 'turnitintooltwo-datatables_columnfilter' => array('files' => array('jquery.dataTables.columnFilter.js')), 'turnitintooltwo-cookie' => array('files' => array('jquery.cookie.js')), 'turnitintooltwo-colorbox' => array('files' => array('jquery.colorbox.js', 'colorbox.css')), 'turnitintooltwo-uieditable' => array('files' => array('jqueryui-editable.js', 'jqueryui-editable.css')), 'turnitintooltwo-moment' => array('files' => array('moment.js')), 'turnitintooltwo-tooltipster' => array('files' => array('tooltipster.js', 'tooltipster.css')), - 'turnitintooltwo-migration_tool' => array('files' => array('turnitintooltwo_migration_tool-2018082301.js')) + 'turnitintooltwo-migration_tool' => array('files' => array('turnitintooltwo_migration_tool-2018102601.js')) ); diff --git a/jquery/turnitintooltwo-2018082301.min.js b/jquery/turnitintooltwo-2018082301.min.js deleted file mode 100755 index b2f04178..00000000 --- a/jquery/turnitintooltwo-2018082301.min.js +++ /dev/null @@ -1,3 +0,0 @@ -!function($){$(window).on("load",function(){function enableEditingText(i){$("#tabs-"+i+" .editable_date, #tabs-"+i+" .editable_text").editable("enable")}function disableEditingText(i){$("#tabs-"+i+" .editable_date, #tabs-"+i+" .editable_text").editable("disable")}function getLoadingGif(){var i='
';$("#cboxOverlay").after(i);var e=$(window).scrollTop()+$(window).height()/2;$(".loading_gif").css("top",e+"px")}function hideLoadingGif(){$(".loading_gif").remove()}function getSubmissions(table,assignment_id,part_id,start,refresh_requested,total){$.ajax({dataType:"json",type:"POST",url:"ajax.php",async:!0,data:{action:"get_submissions",assignment:assignment_id,part:part_id,start:start,refresh_requested:refresh_requested[part_id],sesskey:M.cfg.sesskey,total:total},success:function(result){if(eval(result),start=result.end,result.aaData.length>0&&table.fnAddData(result.aaData),result.end0&&$(".nonsubmitters_link").attr("style","display: block")}},error:function(i,e){$("#"+part_id+"_processing").attr("style","visibility: hidden"),$(".dataTables_empty").html(M.str.turnitintooltwo.tiisubmissionsgeterror)}})}function submitVisibility(){1==$(".upload_box").data("user-type")||1==$(".upload_box").data("eula")?$(".upload_box").show():$(".upload_box").hide()}function refreshRubricSelect(){var i=$("#id_rubric").length?"#id_rubric":"#id_plagiarism_rubric",e=$(i).val();$.ajax({dataType:"json",type:"POST",url:"../mod/turnitintooltwo/ajax.php",data:{action:"refresh_rubric_select",assignment:$('input[name="instance"]').val(),modulename:$('input[name="modulename"]').val(),course:$('input[name="course"]').val()},success:function(t){$($(i)).empty();var s=t;$.each(s,function(e,t){if($.isNumeric(e)||""===e)$($(i)).append($("");s.attr("label",e),$.each(t,function(i,e){var t=$("");t.val(i),t.text(e),s.append(t)}),$(i).append(s)}}),$(i+' option[value="'+e+'"]').attr("selected","selected")}})}function refreshUserMessages(){$(".messages_loading").show(),$(".messages_amount").html(""),$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"refresh_user_messages",assignment:$("#assignment_id").html()},success:function(i){$(".messages_loading").hide(),$(".messages_amount").html(i)}})}function resetPeermarkSection(i){$("#tabs-"+i+" .toggle_peermarks").hide(),$("#tabs-"+i+" .peermark_count").html(""),$("#tabs-"+i+" .peermark-loading").show(),$("#tabs-"+i+" .peermark_assignments_container").hide()}function refreshPeermarkAssignments(part_id,refresh_requested){var user_role=$(".tii_peermark_manager_launch").length>0?"Instructor":"Learner";$("#tabs-"+part_id+" .peermark_assignments_container").length>0&&(resetPeermarkSection(part_id),$.ajax({dataType:"json",type:"POST",url:"ajax.php",data:{action:"refresh_peermark_assignments",assignment:$("#assignment_id").html(),part:part_id,refresh_requested:refresh_requested,sesskey:M.cfg.sesskey},success:function(data){eval(data),$("#tabs-"+part_id+" .peermark_assignments_container").html(data.peermark_table),$("#tabs-"+part_id+" .peermark-loading").hide(),$("#tabs-"+part_id+" .peermark_count").html(data.no_of_peermarks),data.no_of_peermarks>0?$("#tabs-"+part_id+" .toggle_peermarks").show():$("#tabs-"+part_id+" .toggle_peermarks").hide(),(data.no_of_peermarks>0&&"Instructor"==user_role||data.peermarks_active&&"Learner"==user_role)&&$("#tabs-"+part_id+" .row_peermark_reviews").show(),"true"==$.cookie("show_peermarks_"+$("#assignment_id").html())&&data.no_of_peermarks>0?($(".show_peermarks_"+$("#assignment_id").html()).hide(),$(".hide_peermarks_"+$("#assignment_id").html()).show(),$(".peermark_assignments_container").slideDown()):($(".show_peermarks_"+$("#assignment_id").html()).show(),$(".hide_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideUp())}}))}function initialiseUnanoymiseForm(scope,assignment_id,submission_id){var identifier="a.unanonymise";"row"==scope&&(identifier="#submission_"+submission_id),$(identifier).colorbox({inline:!0,width:"50%",top:"100px",height:"260px",opacity:"0.7",className:"tii_unanonymise_reveal_form",onComplete:function(){var idStr=$(this).attr("id").split("_");if(0==submission_id||void 0==submission_id)var submission_id=idStr[1];0==assignment_id&&(assignment_id=$("#assignment_id").html()),$("#submission_id").html(submission_id),$("#cboxLoadedContent .unanonymise_form").show(),$("#id_reveal").unbind("click"),$("#id_reveal").click(function(){$.ajax({dataType:"json",type:"POST",url:"ajax.php",data:{action:"reveal_submission_name",assignment:assignment_id,submission_id:submission_id,reason:encodeURIComponent($("#id_anonymous_reveal_reason").val()),sesskey:M.cfg.sesskey},success:function(data){if(eval(data),"success"==data.status)$.colorbox.close(),$("#submission_"+submission_id).attr("href",M.cfg.wwwroot+"/user/view.php?id="+data.userid+"&course="+data.courseid),$("#submission_"+submission_id).html(data.name),$("#submission_"+submission_id).removeClass("unanonymise cboxElement");else{var current_msg=$("#unanonymise_desc").html;$("#unanonymise_desc").html(current_msg+" "+data.msg)}}})})},onCleanup:function(){$(".unanonymise_form").hide()}})}function initialiseUploadBox(i,e,t,s){var a=".upload_box";"row"==i&&(a="#upload_"+e+"_"+t+"_"+s);var n="80%",o="80%";$(a).colorbox({onLoad:function(){getLoadingGif(),lightBoxCloseButton(),$(this).hide()},onClosed:function(){hideLoadingGif()},onCleanup:function(){hideLoadingGif();var i=$(this).attr("id").split("_");refreshInboxRow("upload",i[1],i[2],i[3]),$("#tii_close_bar").remove()},iframe:!0,width:n,height:o,opacity:"0.7",className:"upload",transition:"none"})}function initialiseZipDownloads(i){$("#tabs-"+i+" .orig_zip_open, #tabs-"+i+" .pdf_zip_open, #tabs-"+i+" .xls_inbox_open").unbind("click"),$("#tabs-"+i+" .orig_zip_open, #tabs-"+i+" .pdf_zip_open, #tabs-"+i+" .xls_inbox_open").click(function(){var i=$(this).attr("id").split("_");downloadZipFile(i[0]+"_"+i[1],i[2])}),$("#tabs-"+i+" .downloadpdf_box").colorbox({iframe:!0,width:"40%",height:"60%",opacity:"0.7",className:"downloadpdf_window",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()},onClosed:function(){refreshUserMessages()}}),$(document).on("click","#tabs-"+i+" .gmpdfzip_box",function(e){return $(this).colorbox({open:!0,iframe:!0,width:"786px",height:"300px",opacity:"0.7",className:"gmpdfzip_window",transition:"none",href:function(){var e="";return $("#tabs-"+i+" .inbox_checkbox:checked").each(function(i){e+="&submission_id"+i+"="+$(this).val(),i++}),$(this).attr("href")+e},onLoad:function(){getLoadingGif()},onCleanup:function(){hideLoadingGif()},onClosed:function(){refreshUserMessages()}}),!1})}function lightBoxCloseButton(){$("body").append('")}function initialiseDigitalReceipt(){$(".tii_digital_receipt").length>0&&$(".tii_digital_receipt").colorbox({iframe:!0,width:"832px",height:"482px",opacity:"0.7",className:"rubric_view",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}})}function initialiseHiddenZipDownloads(i){$("#tabs-"+i+" .origchecked_zip_open").unbind("click"),$("#tabs-"+i+" .origchecked_zip_open").click(function(){var e=$(this).attr("id").split("_");return downloadZipFile(e[0]+"_"+e[1],i),!1})}function initialiseRefreshRow(i,e,t,s){var a=".refresh_row .fa-refresh";"row"==i&&(a="#refreshrow_"+e+"_"+t+"_"+s+" .fa-refresh"),$(a).unbind("click"),$(a).click(function(){$(this).hide(),$(this).siblings(".fa-spinner").css("display","inline-block").addClass("fa-lg");var i=$(this).parent().attr("id").split("_");refreshInboxRow(i[0],i[1],i[2],i[3])})}function initialiseDVLaunchers(i,e,t,s){var a="#"+t+" .download_original_open";"row"==i&&(a="#downloadoriginal_"+e+"_"+t+"_"+s),$(a).unbind("click"),$(a).click(function(){var i=$(this).attr("id").split("_");$(this).children(".score_colour").hasClass("score_colour_")||downloadOriginalFile(i[0],i[1],i[2],i[3])})}function downloadZipFile(i,e){var t=[];"origchecked_zip"!=i&&"gmpdf_zip"!=i||$("#tabs-"+e+" .inbox_checkbox:checked").each(function(i){t[i]=$(this).val()}),$.ajax({type:"POST",url:"ajax.php",dataType:"html",data:{action:i,assignment:$("#assignment_id").html(),part:e,submission_ids:t},success:function(t){$("#"+i+"_form_"+e).html(t),$("#"+i+"_form_"+e).children("form").submit(),$("#"+i+"_form_"+e).html("")}})}function downloadOriginalFile(i,e,t,s){$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"html",data:{action:i,submission:e,assignment:$("#assignment_id").html()},success:function(t){$("#"+i+"_form_"+e).html(t),$("#"+i+"_form_"+e).children("form").submit(),$("#"+i+"_form_"+e).html("")}})}function checkDVClosed(i){window.dvWindow.closed?$("#refresh_"+i).click():setTimeout(function(){checkDVClosed(i)},500)}function submitNothing(user_id,part_id){$("#submitnothing_0_"+part_id+"_"+user_id+" i").attr("class","fa fa-spin fa-spinner fa-lg"),$.ajax({type:"POST",url:"ajax.php",dataType:"json",data:{action:"submit_nothing",assignment:$("#assignment_id").html(),part:part_id,user:user_id,sesskey:M.cfg.sesskey},success:function(data){eval(data),$.cookie("submitnothingaccept",!0,{expires:365}),$("table#"+part_id+" .select_all_checkbox").attr("checked",!1)},error:function(i){$("#submitnothing_0_"+part_id+"_"+user_id+" i").attr("class","fa fa-pencil fa-lg"),$("#submitnothing_0_"+part_id+"_"+user_id).removeClass("disabled"),alert(i.responseText)},complete:function(){refreshInboxRow("submitnothing",0,part_id,user_id)}})}function refreshInboxRow(link,submission_id,part_id,user_id){$.ajax({type:"POST",url:"ajax.php",dataType:"json",data:{action:"refresh_submission_row",assignment:$("#assignment_id").html(),part:part_id,user:user_id,sesskey:M.cfg.sesskey},success:function(data){$("table#"+part_id+" .select_all_checkbox").attr("checked",!1),eval(data);var i=0;0==submission_id?(link+="_0",submission_id=data.submission_id):link=null==data.submission_id&&0!=submission_id?link+"_"+submission_id:link+"_"+data.submission_id,0!=submission_id&&$("#export_links").removeClass("hidden_class"),oTable=$("table#"+part_id).dataTable();var tr=$("#"+link+"_"+part_id+"_"+user_id).parent().parent(),rowindex=tr.index();oTable.fnDeleteRow(tr),oTable.fnAddData(data.row),submitVisibility(),initialiseUploadBox("row",data.submission_id,part_id,user_id),initialiseDVLaunchers("row",data.submission_id,part_id,user_id),initialiseRefreshRow("row",data.submission_id,part_id,user_id),initialiseCheckboxes(data.submission_id,part_id),initialiseUnanoymiseForm("row",$("#assignment_id").html(),data.submission_id)}})}function initialiseCheckboxes(i,e){var t="#tabs-"+e+" .inbox_checkbox";0!=i&&(t="check_"+i),$("#tabs-"+e+" .inbox_checkbox").click(function(){$("table#"+e+" .select_all_checkbox").attr("checked",!1)}),$(document).on("click",t+", .select_all_checkbox",function(){$("#tabs-"+e+" .inbox_checkbox:checked").length>0?($("#tabs-"+e+" .zip_downloads").slideDown(),initialiseHiddenZipDownloads(e)):($("#tabs-"+e+" .origchecked_zip_open").unbind("click"),$("#tabs-"+e+" .zip_downloads").slideUp())})}function showPartDatesBoxes(){for(var i=0;i<=5;i++)i<=$("#id_numparts").val()?$('fieldset[id$="partdates'+i+'"]').slideDown():$('fieldset[id$="partdates'+i+'"]').slideUp()}if($(".js_required").show(),$(".js_hide").hide(),1==$("#id_submissiontype").val()&&$("#id_submissiontext").parent().parent().hide(),2==$("#id_submissiontype").val()&&$("#id_submissionfile").parent().parent().hide(),$("#id_submissionagreement").length&&$("#id_submitbutton").attr("disabled","disabled"),$("#id_submissionagreement").on("click",function(){$(this).is(":checked")?$("#id_submissionagreement").each(function(){$("#id_submitbutton").removeAttr("disabled")}):$("#id_submissionagreement").each(function(){$("#id_submitbutton").attr("disabled","disabled")})}),$(document).on("click",".delete_paper",function(){var i=$(this).data("confirm"),e=M.str.turnitintooltwo[i].replace(/\\n/g,"\n"),t=confirm(e);t&&$.ajax({type:"POST",url:"ajax.php",dataType:"html",data:{action:"deletesubmission",sesskey:M.cfg.sesskey,paper:$(this).data("paper"),part:$(this).data("part"),assignment:$(this).data("assignment")},success:function(){window.location.href=window.location.href}})}),$(document).on("click",".submit_nothing",function(){if(!$(this).hasClass("disabled")){$(this).addClass("disabled");var i=$(this).prop("id").split("_")[2],e=$(this).prop("id").split("_")[3],t=M.str.turnitintooltwo.submitnothingwarning.replace(/
/g,"\n").replace(/'/g,"'"),s=$.cookie("submitnothingaccept");s||confirm(t)?submitNothing(e,i):$(this).removeClass("disabled")}}),$(document).on("change","#id_submissiontype",function(){1==$("#id_submissiontype").val()&&($("#id_submissiontext").parent().parent().hide(),$("#id_submissionfile").parent().parent().show()),2==$("#id_submissiontype").val()&&($("#id_submissionfile").parent().parent().hide(),$("#id_submissiontext").parent().parent().show())}),$(document).on("submit",".submission_form_container form",function(){return $("#id_submissiontitle").val().length>0&&($("#general").slideUp("slow"),$(".mod_turnitintooltwo .noticebox").slideUp("slow"),$(".submission_form_container form").slideUp("slow"),$("#submitting_loader").slideDown("slow"),!0)}),$(".toggle_summary").length>0&&($.cookie("show_summary_"+$("#assignment_id").html())||$.cookie("show_summary_"+$("#assignment_id").html(),!0,{expires:30}),"true"==$.cookie("show_summary_"+$("#assignment_id").html())?($(".hide_summary_"+$("#assignment_id").html()).show(),$(".show_summary_"+$("#assignment_id").html()).hide(),$(".introduction").slideDown()):($(".show_summary_"+$("#assignment_id").html()).show(),$(".hide_summary_"+$("#assignment_id").html()).hide(),$(".introduction").slideUp()),$(".toggle_summary i").click(function(){$(this).hasClass("show_summary_"+$("#assignment_id").html())?($.cookie("show_summary_"+$("#assignment_id").html(),!0,{expires:30}),$(".show_summary_"+$("#assignment_id").html()).hide(),$(".hide_summary_"+$("#assignment_id").html()).show(),$(".introduction").slideDown()):($.cookie("show_summary_"+$("#assignment_id").html(),!1,{expires:30}),$(".show_summary_"+$("#assignment_id").html()).show(),$(".hide_summary_"+$("#assignment_id").html()).hide(),$(".introduction").slideUp())})),$(".toggle_peermarks").length>0&&($.cookie("show_peermarks_"+$("#assignment_id").html())||$.cookie("show_peermarks_"+$("#assignment_id").html(),!0,{expires:30}),"true"==$.cookie("show_peermarks_"+$("#assignment_id").html())?($(".hide_peermarks_"+$("#assignment_id").html()).show(),$(".show_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideDown()):($(".show_peermarks_"+$("#assignment_id").html()).show(),$(".hide_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideUp()),$(".toggle_peermarks i").click(function(){$(this).hasClass("show_peermarks_"+$("#assignment_id").html())?($.cookie("show_peermarks_"+$("#assignment_id").html(),!0,{expires:30}),$(".show_peermarks_"+$("#assignment_id").html()).hide(),$(".hide_peermarks_"+$("#assignment_id").html()).show(),$(".peermark_assignments_container").slideDown()):($.cookie("show_peermarks_"+$("#assignment_id").html(),!1,{expires:30}),$(".show_peermarks_"+$("#assignment_id").html()).show(),$(".hide_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideUp())})),$(document).on("click",".show_peermark_instructions, .hide_peermark_instructions",function(){var i=$(this).attr("id").split("_");"show"==i[0]?($("#show_peermark_instructions_"+i[3]).hide(),$("#hide_peermark_instructions_"+i[3]).show(),$("#peermark_instructions_"+i[3]).slideDown()):($("#show_peermark_instructions_"+i[3]).show(),$("#hide_peermark_instructions_"+i[3]).hide(),$("#peermark_instructions_"+i[3]).slideUp())}),showPartDatesBoxes(),$(document).on("change","#id_numparts",function(){showPartDatesBoxes()}),$(document).on("click",".splitter-lastname, .splitter-firstname",function(i){var e=$(i.target),t=e.hasClass("sorting_asc"),s="asc",a="desc",n=e.attr("data-col");t||(s="desc",a="asc"),e.closest(".submissionsDataTable").DataTable().order([n,a]).draw(),e.addClass("sorting_"+a).removeClass("sorting sorting_"+s),e.parent().removeClass("sorting sorting_asc sorting_desc"),e.siblings().removeClass("sorting_asc sorting_desc").addClass("sorting")}),$("#dataTable").length>0&&$("#dataTable").dataTable(),"undefined"!=typeof M.str.turnitintooltwo)var dataTablesLang={sProcessing:''+M.str.turnitintooltwo.sprocessing+"",sZeroRecords:M.str.turnitintooltwo.szerorecords,sInfo:M.str.turnitintooltwo.sinfo,sSearch:M.str.turnitintooltwo.ssearch,sLengthMenu:M.str.turnitintooltwo.slengthmenu,oPaginate:{sNext:M.str.turnitintooltwo.snext,sPrevious:M.str.turnitintooltwo.sprevious}};if($("#tabs").length>0){var activeTab=0;$("#tab_position").length>0&&(activeTab=$("#tab_position").text()),$("#tabs").tabs({active:activeTab,show:function(){var i=$.fn.dataTable.fnTables(!0);i.length>0&&$(i).dataTable().fnAdjustColumnSizing()}})}$(".enrolledMembers").length>0&&$(".enrolledMembers").dataTable({bProcessing:!0,sAjaxSource:"ajax.php",aoColumnDefs:[{bSortable:!1,sClass:"centered_cell",aTargets:[0]},{sClass:"left",aTargets:[1]}],oLanguage:dataTablesLang,fnServerData:function(i,e,t){$.ajax({dataType:"json",type:"POST",url:i,data:{action:"get_members",assignment:$("#assignment_id").html(),role:$("#user_role").html()},success:function(i){t(i)},error:function(i,e){$(".dataTables_processing").attr("style","visibility: hidden"),$(".dataTables_empty").html(M.str.turnitintooltwo.membercheckerror)}})}});var submissionsDataTableColumns=[],visibleCols=[],noOfColumns=$("table.submissionsDataTable th").length/$("table.submissionsDataTable").length,notStudentView=$("table.submissionsDataTable th.sorting_name").length>0,showOrigReport=$("table.submissionsDataTable th.creport").length>0,useGradeMark=$("table.submissionsDataTable th.cgrade").length>0,multipleParts=$("table.submissionsDataTable th.coverallgrade").length>0;if(notStudentView)for(var i=0;i=9&&!showOrigReport&&!useGradeMark||i>=11&&(!showOrigReport&&useGradeMark||showOrigReport&&!useGradeMark)||i>=13&&showOrigReport&&useGradeMark?(submissionsDataTableColumns.push({sClass:"center",bSortable:!1}),visibleCols.push(!0)):(0==i||4==i||7==i||9==i&&showOrigReport||9==i&&!showOrigReport||11==i&&useGradeMark)&&(submissionsDataTableColumns.push({bVisible:!1}),visibleCols.push(!1));else for(var i=0;i=8&&!showOrigReport&&!useGradeMark||i>=10&&(!showOrigReport&&useGradeMark||showOrigReport&&!useGradeMark)||i>=12&&showOrigReport&&useGradeMark?(submissionsDataTableColumns.push({sClass:"center",bSortable:!1}),visibleCols.push(!0)):(0==i||3==i||6==i||8==i&&showOrigReport||8==i&&!showOrigReport||10==i&&useGradeMark)&&(submissionsDataTableColumns.push({bVisible:!1}),visibleCols.push(!1));var partTables=[],refreshRequested=[];$("table.submissionsDataTable").each(function(){var i=$(this).attr("id");refreshRequested[i]=0,partTables[i]=$("table#"+i).dataTable({bProcessing:!0,aoColumns:submissionsDataTableColumns,aLengthMenu:[[10,25,50,100,-1],[10,25,50,100,"All"]],aaSorting:[[2,"asc"],[4,"asc"]],sAjaxSource:"ajax.php",oLanguage:dataTablesLang,sDom:'r<"listbar-container"<"top listbar clearfix"lf>><"dt_pagination clearfix"pi>t<"bottom"><"dt_pagination clearfix"pi>',fnServerData:function(e,t,s){$.ajax({dataType:"json",type:"POST",url:e,data:{action:"initialise_redraw"},success:function(e){disableEditingText(i),s(e),$("#"+i+"_processing").attr("style","visibility: visible"),getSubmissions(partTables[i],$("#assignment_id").html(),i,0,refreshRequested,0)}})},bStateSave:!0,fnStateSave:function(e,t){try{localStorage.setItem(i+"DataTables",JSON.stringify(t))}catch(s){}},fnStateSaveParams:function(i,e){e.abVisCols=visibleCols},fnStateLoad:function(e){try{return JSON.parse(localStorage.getItem(i+"DataTables"))}catch(t){}},fnStateLoadParams:function(i,e){e.abVisCols=visibleCols},fnDrawCallback:function(e){initialiseDigitalReceipt(),initialiseDVLaunchers("all",0,i,0),initialiseRefreshRow("all",0,i,0),initialiseUploadBox("all",0,0,0),initialiseZipDownloads(i),initialiseCheckboxes(0,i),initialiseUnanoymiseForm("all",0,0)}})}),$("table.submissionsDataTable").each(function(){var i=$(this).attr("id");refreshPeermarkAssignments(i,0)}),$(".messages_amount").length>0&&refreshUserMessages(),$(".tii_table_functions").each(function(){var i=$(this).attr("id").split("tii_table_functions_")[1],e=$("#tii_table_functions_"+i).html();$("#tii_table_functions_"+i).remove(),$("#"+i+"_length").after(e),$(".messages_inbox").show(),$("#refresh_"+i).show(),$("#refreshing_"+i).hide()});var zip_downloads=$(".zip_downloads");if($.each(zip_downloads,function(){var i=$(this).attr("id").split("_")[1];$(this).remove(),$("#"+i+"_length").after($(this))}),"Learner"==$("#user_role").html()&&$(".dataTables_length, .dataTables_filter, .dt_pagination").hide(),$(".refresh_link").click(function(){return $(this).is(":visible")&&($(".refresh_link").hide(),$(".refreshing_link").show(),$("table.submissionsDataTable").each(function(){refreshRequested[$(this).attr("id")]=1,partTables[$(this).attr("id")].fnReloadAjax(),partTables[$(this).attr("id")].fnStandingRedraw()})),!1}),$("#turnitin_sync_all_grades").length>0&&$(".turnitin_sync_grades").click(function(){$(".turnitin_sync_grades").hide(),$(".turnitin_syncing_grades").show(),$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:"sync_all_submissions",assignment:$("#turnitin_sync_all_grades").data("turnitintooltwoid"),sesskey:M.cfg.sesskey},success:function(i){$(".turnitin_sync_grades").show(),$(".turnitin_syncing_grades").hide()}})}),$(".submission_failure_msg").length>0&&window.parent.$(".upload_box").colorbox.resize({width:"800px",height:"240px"}),$(".enrol_link").click(function(){$("#enrolling_error").hide(),$(".enrol_link").hide(),$(".enrolling_container").show(),$.ajax({type:"POST",url:"ajax.php",dataType:"html",data:{action:"enrol_all_students",assignment:$("#assignment_id").html(),sesskey:M.cfg.sesskey},success:function(i){window.location.href=window.location.href},error:function(i,e){$(".enrol_link").show(),$(".enrolling_container").hide(),$("#enrolling_error").show()}})}),$(".rubric_manager_launch").length>0&&$(".rubric_manager_launch").colorbox({iframe:!0,width:"832px",height:"682px",opacity:"0.7",className:"rubric_manager",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){hideLoadingGif(),"rubric_manager_inbox_launch"!=$(this).attr("id")&&refreshRubricSelect(),$("#tii_close_bar").remove()}}),$(".rubric_view_launch").length>0&&$(".rubric_view_launch").colorbox({iframe:!0,width:"832px",height:"682px",opacity:"0.7",className:"rubric_view",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$("#id_rubric, #id_plagiarism_rubric").mousedown(function(){""!=$('input[name="instance"]').val()&&"Y"!=$('input[name="rubric_warning_seen"]').val()&&confirm(M.str.turnitintooltwo.changerubricwarning)&&$('input[name="rubric_warning_seen"]').val("Y")}),($(".quickmark_manager_launch").length>0||$(".plagiarism_turnitin_quickmark_manager_launch").length>0)&&$(".quickmark_manager_launch, .plagiarism_turnitin_quickmark_manager_launch").colorbox({iframe:!0,width:"770px",height:"600px",opacity:"0.7",className:"quickmark_manager",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".tii_peermark_manager_launch").length>0&&$(".tii_peermark_manager_launch").colorbox({iframe:!0,width:"802px",height:"772px",opacity:"0.7",className:"peermark_manager",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()},onClosed:function(){var i=$(this).attr("id").split("_");refreshPeermarkAssignments(i[2],1)}}),$(".tii_peermark_reviews_launch").length>0&&$(".tii_peermark_reviews_launch").colorbox({iframe:!0,width:"802px",height:"772px",opacity:"0.7",className:"peermark_reviews",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".messages_inbox").length>0&&$(".messages_inbox").colorbox({iframe:!0,width:"772px",height:"772px",opacity:"0.7",className:"messages",transition:"none",closeButton:!1,onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".nonsubmitters_link").length>0&&$(".nonsubmitters_link").colorbox({iframe:!0,width:"740px",height:"540px",opacity:"0.7",className:"nonsubmitters",transition:"none",closeButton:!1,onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".nonsubmittersformsuccessmsg").length>0&&(hideLoadingGif(),window.parent.$(".nonsubmitters").colorbox.resize({width:"740px",height:"120px"})),$(".rubric_view_launch").length>0&&$(".rubric_view_launch").colorbox({iframe:!0,width:"832px",height:"682px",opacity:"0.7",className:"rubric_view",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(document).on("click",".default_open, .origreport_open, .grademark_open",function(){var i=!0,e=$(this).attr("id").split("_"),t=$("#date_due_"+e[2]).html(),s=moment(t).unix(),a=e[0],n=e[1],o=e[2];if(s>moment().unix()&&$(this).hasClass("graded_warning")&&(confirm(M.str.turnitintooltwo.resubmissiongradewarn)||(i=!1)),i){dvWindow=window.open("","_blank");var r='
';r+='',r+='

'+M.str.turnitintooltwo.loadingdv+"

",r+="
",$(dvWindow.document.body).html(r),$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:a,submission:n,assignment:$("#assignment_id").html()},success:function(i){$(dvWindow.document.body).html(r+i),dvWindow.document.forms[0].submit(),dvWindow.document.close(),checkDVClosed(o)}})}}),$("#id_rubric").length>0&&refreshRubricSelect(),self!=top&&"box"==$("#view_context").html()?$("html").css("background","none"):self!=top&&"box_solid"==$("#view_context").html()&&$("html").css("background","#FFF"),$(".editable_postdue").on("click",function(){1==$(this).data("anon")&&alert(M.str.turnitintooltwo.postdate_warning)}),$(".editable_text").length>0){$.fn.editable.defaults.mode="inline",$.fn.editable.defaults.url="ajax.php",$.fn.editable.defaults.onblur="submit",$.fn.editable.defaults.showbuttons=!1,$.fn.editable.defaults.ajaxOptions={dataType:"json"},$(".editable_text").editable({validate:function(i){if($(this).attr("id").indexOf("marks_")>=0&&(Math.floor(i)!=i||!$.isNumeric(i)||i.indexOf(".")!=-1))return M.str.turnitintooltwo.maxmarkserror},success:function(i,e){if(!i.success)return i.msg;if("maxmarks"==i.field)$("#refresh_"+i.partid).click(),$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:"sync_all_submissions",assignment:$("#assignment_id").html(),sesskey:M.cfg.sesskey}});else if("partname"==i.field){var t=$(this).parentsUntil(".ui-tabs-panel").parent().attr("aria-labelledby");$("#"+t).text(e)}}}),$("#export_options").hasClass("tii_export_options_hide")&&($("#export_options").hide(),$(".export_data").html('--')),$(".editable_postdue").on("click",function(){var i=$(this);$.ajax({type:"POST",url:"ajax.php",dataType:"json",data:{action:"check_anon",part:i.data("pk"),assignment:$("#assignment_id").html()},success:function(e){i.data("anon",e.anon),i.data("unanon",e.unanon),i.data("submitted",e.submitted)}})});var theDate=new Date;$(".editable_date").editable({type:"combodate",format:"YYYY-MM-DD HH:mm",viewformat:"D MMM YYYY, HH:mm",template:"D MMM YYYY HH:mm",combodate:{minuteStep:1,minYear:2e3,maxYear:theDate.getFullYear()+2,smartDays:!0},validate:function(i){if(i.format("X")--')):($(".empty-dash").remove(),$("#export_options").show()))):i.msg}}),$(".editable_date").click(function(){if($(this).hasClass("editable-disabled"))return!1}),$(".editable_date, .editable_text").on("shown",function(i,e){var t=$(this).prop("id");$(".editable_date, .editable_text").not("#"+t).editable("disable"),$(".submit_nothing").addClass("disabled")}),$(".editable_date, .editable_text").on("hidden",function(){var i=$(this).prop("id");$(".editable_date, .editable_text").not("#"+i).editable("enable"),$(".submit_nothing").removeClass("disabled")})}$("#inbox_form form, .launch_form form").submit(),$(".turnitin_eula_link").length>0&&$(".turnitin_eula_link").colorbox({iframe:!0,width:"766px",height:"596px",opacity:"0.7",className:"eula_view",scrolling:"false",onLoad:function(){getLoadingGif()},onComplete:function(){$(window).on("message",function(i){var e="undefined"==typeof i.data?i.originalEvent.data:i.data;"turnitin_eula_declined"!=e&&"turnitin_eula_accepted"!=e||$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:"acceptuseragreement",message:e,sesskey:M.cfg.sesskey},success:function(i){window.location.reload()},error:function(i){window.location.reload()}})})},onCleanup:function(){hideLoadingGif()}}),$("#tii_receipt_print").click(function(){window.print()}),$(".select_all_checkbox").on("click",function(){var i=$(this).parent().parent().parent().parent().attr("id");$(this).is(":checked")?($("#"+i+" .inbox_checkbox").length&&$("#tabs-"+i+" .zip_downloads").slideDown(), -$("#"+i+" .inbox_checkbox").each(function(){$(this).prop("checked",!0)})):($("#"+i+" .inbox_checkbox").each(function(){$(this).prop("checked",!1)}),$("#"+i+" .inbox_checkbox").length&&$("#tabs-"+i+" .zip_downloads").slideUp())}),$("[id^=fitem_id_dtpost] select").change(function(){var i=$(this).parent().parent().parent(),e=buildUnixDate("#fitem_id_dtpost",i.data("partId"));e0&&table.fnAddData(result.aaData),result.end0&&$(".nonsubmitters_link").attr("style","display: block")}},error:function(i,e){$("#"+part_id+"_processing").attr("style","visibility: hidden"),$(".dataTables_empty").html(M.str.turnitintooltwo.tiisubmissionsgeterror)}})}function submitVisibility(){1==$(".upload_box").data("user-type")||1==$(".upload_box").data("eula")?$(".upload_box").show():$(".upload_box").hide()}function refreshRubricSelect(){var i=$("#id_rubric").length?"#id_rubric":"#id_plagiarism_rubric",e=$(i).val();$.ajax({dataType:"json",type:"POST",url:"../mod/turnitintooltwo/ajax.php",data:{action:"refresh_rubric_select",assignment:$('input[name="instance"]').val(),modulename:$('input[name="modulename"]').val(),course:$('input[name="course"]').val()},success:function(t){$($(i)).empty();var s=t;$.each(s,function(e,t){if($.isNumeric(e)||""===e)$($(i)).append($("");s.attr("label",e),$.each(t,function(i,e){var t=$("");t.val(i),t.text(e),s.append(t)}),$(i).append(s)}}),$(i+' option[value="'+e+'"]').attr("selected","selected")}})}function refreshUserMessages(){$(".messages_loading").show(),$(".messages_amount").html(""),$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"refresh_user_messages",assignment:$("#assignment_id").html()},success:function(i){$(".messages_loading").hide(),$(".messages_amount").html(i)}})}function resetPeermarkSection(i){$("#tabs-"+i+" .toggle_peermarks").hide(),$("#tabs-"+i+" .peermark_count").html(""),$("#tabs-"+i+" .peermark-loading").show(),$("#tabs-"+i+" .peermark_assignments_container").hide()}function refreshPeermarkAssignments(part_id,refresh_requested){var user_role=$(".tii_peermark_manager_launch").length>0?"Instructor":"Learner";$("#tabs-"+part_id+" .peermark_assignments_container").length>0&&(resetPeermarkSection(part_id),$.ajax({dataType:"json",type:"POST",url:"ajax.php",data:{action:"refresh_peermark_assignments",assignment:$("#assignment_id").html(),part:part_id,refresh_requested:refresh_requested,sesskey:M.cfg.sesskey},success:function(data){eval(data),$("#tabs-"+part_id+" .peermark_assignments_container").html(data.peermark_table),$("#tabs-"+part_id+" .peermark-loading").hide(),$("#tabs-"+part_id+" .peermark_count").html(data.no_of_peermarks),data.no_of_peermarks>0?$("#tabs-"+part_id+" .toggle_peermarks").show():$("#tabs-"+part_id+" .toggle_peermarks").hide(),(data.no_of_peermarks>0&&"Instructor"==user_role||data.peermarks_active&&"Learner"==user_role)&&$("#tabs-"+part_id+" .row_peermark_reviews").show(),"true"==$.cookie("show_peermarks_"+$("#assignment_id").html())&&data.no_of_peermarks>0?($(".show_peermarks_"+$("#assignment_id").html()).hide(),$(".hide_peermarks_"+$("#assignment_id").html()).show(),$(".peermark_assignments_container").slideDown()):($(".show_peermarks_"+$("#assignment_id").html()).show(),$(".hide_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideUp())}}))}function initialiseUnanoymiseForm(scope,assignment_id,submission_id){var identifier="a.unanonymise";"row"==scope&&(identifier="#submission_"+submission_id),$(identifier).colorbox({inline:!0,width:"50%",top:"100px",height:"260px",opacity:"0.7",className:"tii_unanonymise_reveal_form",onComplete:function(){var idStr=$(this).attr("id").split("_");if(0==submission_id||void 0==submission_id)var submission_id=idStr[1];0==assignment_id&&(assignment_id=$("#assignment_id").html()),$("#submission_id").html(submission_id),$("#cboxLoadedContent .unanonymise_form").show(),$("#id_reveal").unbind("click"),$("#id_reveal").click(function(){$.ajax({dataType:"json",type:"POST",url:"ajax.php",data:{action:"reveal_submission_name",assignment:assignment_id,submission_id:submission_id,reason:encodeURIComponent($("#id_anonymous_reveal_reason").val()),sesskey:M.cfg.sesskey},success:function(data){if(eval(data),"success"==data.status)$.colorbox.close(),$("#submission_"+submission_id).attr("href",M.cfg.wwwroot+"/user/view.php?id="+data.userid+"&course="+data.courseid),$("#submission_"+submission_id).html(data.name),$("#submission_"+submission_id).removeClass("unanonymise cboxElement");else{var current_msg=$("#unanonymise_desc").html;$("#unanonymise_desc").html(current_msg+" "+data.msg)}}})})},onCleanup:function(){$(".unanonymise_form").hide()}})}function initialiseUploadBox(i,e,t,s){var a=".upload_box";"row"==i&&(a="#upload_"+e+"_"+t+"_"+s);var n="80%",o="80%";$(a).colorbox({onLoad:function(){getLoadingGif(),lightBoxCloseButton(),$(this).hide()},onClosed:function(){hideLoadingGif()},onCleanup:function(){hideLoadingGif();var i=$(this).attr("id").split("_");refreshInboxRow("upload",i[1],i[2],i[3]),$("#tii_close_bar").remove()},iframe:!0,width:n,height:o,opacity:"0.7",className:"upload",transition:"none"})}function initialiseZipDownloads(i){$("#tabs-"+i+" .orig_zip_open, #tabs-"+i+" .pdf_zip_open, #tabs-"+i+" .xls_inbox_open").unbind("click"),$("#tabs-"+i+" .orig_zip_open, #tabs-"+i+" .pdf_zip_open, #tabs-"+i+" .xls_inbox_open").click(function(){var i=$(this).attr("id").split("_");downloadZipFile(i[0]+"_"+i[1],i[2])}),$("#tabs-"+i+" .downloadpdf_box").colorbox({iframe:!0,width:"40%",height:"60%",opacity:"0.7",className:"downloadpdf_window",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()},onClosed:function(){refreshUserMessages()}}),$(document).on("click","#tabs-"+i+" .gmpdfzip_box",function(e){return $(this).colorbox({open:!0,iframe:!0,width:"786px",height:"300px",opacity:"0.7",className:"gmpdfzip_window",transition:"none",href:function(){var e="";return $("#tabs-"+i+" .inbox_checkbox:checked").each(function(i){e+="&submission_id"+i+"="+$(this).val(),i++}),$(this).attr("href")+e},onLoad:function(){getLoadingGif()},onCleanup:function(){hideLoadingGif()},onClosed:function(){refreshUserMessages()}}),!1})}function lightBoxCloseButton(){$("body").append('")}function initialiseDigitalReceipt(){$(".tii_digital_receipt").length>0&&$(".tii_digital_receipt").colorbox({iframe:!0,width:"832px",height:"482px",opacity:"0.7",className:"rubric_view",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}})}function initialiseHiddenZipDownloads(i){$("#tabs-"+i+" .origchecked_zip_open").unbind("click"),$("#tabs-"+i+" .origchecked_zip_open").click(function(){var e=$(this).attr("id").split("_");return downloadZipFile(e[0]+"_"+e[1],i),!1})}function initialiseRefreshRow(i,e,t,s){var a=".refresh_row .fa-refresh";"row"==i&&(a="#refreshrow_"+e+"_"+t+"_"+s+" .fa-refresh"),$(a).unbind("click"),$(a).click(function(){$(this).hide(),$(this).siblings(".fa-spinner").css("display","inline-block").addClass("fa-lg");var i=$(this).parent().attr("id").split("_");refreshInboxRow(i[0],i[1],i[2],i[3])})}function initialiseDVLaunchers(i,e,t,s){var a="#"+t+" .download_original_open";"row"==i&&(a="#downloadoriginal_"+e+"_"+t+"_"+s),$(a).unbind("click"),$(a).click(function(){var i=$(this).attr("id").split("_");$(this).children(".score_colour").hasClass("score_colour_")||downloadOriginalFile(i[0],i[1],i[2],i[3])})}function downloadZipFile(i,e){var t=[];"origchecked_zip"!=i&&"gmpdf_zip"!=i||$("#tabs-"+e+" .inbox_checkbox:checked").each(function(i){t[i]=$(this).val()}),$.ajax({type:"POST",url:"ajax.php",dataType:"html",data:{action:i,assignment:$("#assignment_id").html(),part:e,submission_ids:t},success:function(t){$("#"+i+"_form_"+e).html(t),$("#"+i+"_form_"+e).children("form").submit(),$("#"+i+"_form_"+e).html("")}})}function downloadOriginalFile(i,e,t,s){$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"html",data:{action:i,submission:e,assignment:$("#assignment_id").html()},success:function(t){$("#"+i+"_form_"+e).html(t),$("#"+i+"_form_"+e).children("form").submit(),$("#"+i+"_form_"+e).html("")}})}function checkDVClosed(i){window.dvWindow.closed?$("#refresh_"+i).click():setTimeout(function(){checkDVClosed(i)},500)}function submitNothing(user_id,part_id){$("#submitnothing_0_"+part_id+"_"+user_id+" i").attr("class","fa fa-spin fa-spinner fa-lg"),$.ajax({type:"POST",url:"ajax.php",dataType:"json",data:{action:"submit_nothing",assignment:$("#assignment_id").html(),part:part_id,user:user_id,sesskey:M.cfg.sesskey},success:function(data){eval(data),$.cookie("submitnothingaccept",!0,{expires:365}),$("table#"+part_id+" .select_all_checkbox").attr("checked",!1)},error:function(i){$("#submitnothing_0_"+part_id+"_"+user_id+" i").attr("class","fa fa-pencil fa-lg"),$("#submitnothing_0_"+part_id+"_"+user_id).removeClass("disabled"),alert(i.responseText)},complete:function(){refreshInboxRow("submitnothing",0,part_id,user_id)}})}function refreshInboxRow(link,submission_id,part_id,user_id){$.ajax({type:"POST",url:"ajax.php",dataType:"json",data:{action:"refresh_submission_row",assignment:$("#assignment_id").html(),part:part_id,user:user_id,sesskey:M.cfg.sesskey},success:function(data){$("table#"+part_id+" .select_all_checkbox").attr("checked",!1),eval(data);var i=0;0==submission_id?(link+="_0",submission_id=data.submission_id):link=null==data.submission_id&&0!=submission_id?link+"_"+submission_id:link+"_"+data.submission_id,0!=submission_id&&$("#export_links").removeClass("hidden_class"),oTable=$("table#"+part_id).dataTable();var tr=$("#"+link+"_"+part_id+"_"+user_id).parent().parent(),rowindex=tr.index();oTable.fnDeleteRow(tr),oTable.fnAddData(data.row),submitVisibility(),initialiseUploadBox("row",data.submission_id,part_id,user_id),initialiseDVLaunchers("row",data.submission_id,part_id,user_id),initialiseRefreshRow("row",data.submission_id,part_id,user_id),initialiseCheckboxes(data.submission_id,part_id),initialiseUnanoymiseForm("row",$("#assignment_id").html(),data.submission_id)}})}function initialiseCheckboxes(i,e){var t="#tabs-"+e+" .inbox_checkbox";0!=i&&(t="check_"+i),$("#tabs-"+e+" .inbox_checkbox").click(function(){$("table#"+e+" .select_all_checkbox").attr("checked",!1)}),$(document).on("click",t+", .select_all_checkbox",function(){$("#tabs-"+e+" .inbox_checkbox:checked").length>0?($("#tabs-"+e+" .zip_downloads").slideDown(),initialiseHiddenZipDownloads(e)):($("#tabs-"+e+" .origchecked_zip_open").unbind("click"),$("#tabs-"+e+" .zip_downloads").slideUp())})}function showPartDatesBoxes(){for(var i=0;i<=5;i++)i<=$("#id_numparts").val()?$('fieldset[id$="partdates'+i+'"]').slideDown():$('fieldset[id$="partdates'+i+'"]').slideUp()}if($(".js_required").show(),$(".js_hide").hide(),1==$("#id_submissiontype").val()&&$("#id_submissiontext").parent().parent().hide(),2==$("#id_submissiontype").val()&&$("#id_submissionfile").parent().parent().hide(),$("#id_submissionagreement").length&&$("#id_submitbutton").attr("disabled","disabled"),$("#id_submissionagreement").on("click",function(){$(this).is(":checked")?$("#id_submissionagreement").each(function(){$("#id_submitbutton").removeAttr("disabled")}):$("#id_submissionagreement").each(function(){$("#id_submitbutton").attr("disabled","disabled")})}),$(document).on("click",".delete_paper",function(){var i=$(this).data("confirm"),e=M.str.turnitintooltwo[i].replace(/\\n/g,"\n"),t=confirm(e);t&&$.ajax({type:"POST",url:"ajax.php",dataType:"html",data:{action:"deletesubmission",sesskey:M.cfg.sesskey,paper:$(this).data("paper"),part:$(this).data("part"),assignment:$(this).data("assignment")},success:function(){window.location.href=window.location.href}})}),$(document).on("click",".submit_nothing",function(){if(!$(this).hasClass("disabled")){$(this).addClass("disabled");var i=$(this).prop("id").split("_")[2],e=$(this).prop("id").split("_")[3],t=M.str.turnitintooltwo.submitnothingwarning.replace(/
/g,"\n").replace(/'/g,"'"),s=$.cookie("submitnothingaccept");s||confirm(t)?submitNothing(e,i):$(this).removeClass("disabled")}}),$(document).on("change","#id_submissiontype",function(){1==$("#id_submissiontype").val()&&($("#id_submissiontext").parent().parent().hide(),$("#id_submissionfile").parent().parent().show()),2==$("#id_submissiontype").val()&&($("#id_submissionfile").parent().parent().hide(),$("#id_submissiontext").parent().parent().show())}),$(document).on("submit",".submission_form_container form",function(){return $("#id_submissiontitle").val().length>0&&($("#general").slideUp("slow"),$(".mod_turnitintooltwo .noticebox").slideUp("slow"),$(".submission_form_container form").slideUp("slow"),$("#submitting_loader").slideDown("slow"),!0)}),$(".toggle_summary").length>0&&($.cookie("show_summary_"+$("#assignment_id").html())||$.cookie("show_summary_"+$("#assignment_id").html(),!0,{expires:30}),"true"==$.cookie("show_summary_"+$("#assignment_id").html())?($(".hide_summary_"+$("#assignment_id").html()).show(),$(".show_summary_"+$("#assignment_id").html()).hide(),$(".introduction").slideDown()):($(".show_summary_"+$("#assignment_id").html()).show(),$(".hide_summary_"+$("#assignment_id").html()).hide(),$(".introduction").slideUp()),$(".toggle_summary i").click(function(){$(this).hasClass("show_summary_"+$("#assignment_id").html())?($.cookie("show_summary_"+$("#assignment_id").html(),!0,{expires:30}),$(".show_summary_"+$("#assignment_id").html()).hide(),$(".hide_summary_"+$("#assignment_id").html()).show(),$(".introduction").slideDown()):($.cookie("show_summary_"+$("#assignment_id").html(),!1,{expires:30}),$(".show_summary_"+$("#assignment_id").html()).show(),$(".hide_summary_"+$("#assignment_id").html()).hide(),$(".introduction").slideUp())})),$(".toggle_peermarks").length>0&&($.cookie("show_peermarks_"+$("#assignment_id").html())||$.cookie("show_peermarks_"+$("#assignment_id").html(),!0,{expires:30}),"true"==$.cookie("show_peermarks_"+$("#assignment_id").html())?($(".hide_peermarks_"+$("#assignment_id").html()).show(),$(".show_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideDown()):($(".show_peermarks_"+$("#assignment_id").html()).show(),$(".hide_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideUp()),$(".toggle_peermarks i").click(function(){$(this).hasClass("show_peermarks_"+$("#assignment_id").html())?($.cookie("show_peermarks_"+$("#assignment_id").html(),!0,{expires:30}),$(".show_peermarks_"+$("#assignment_id").html()).hide(),$(".hide_peermarks_"+$("#assignment_id").html()).show(),$(".peermark_assignments_container").slideDown()):($.cookie("show_peermarks_"+$("#assignment_id").html(),!1,{expires:30}),$(".show_peermarks_"+$("#assignment_id").html()).show(),$(".hide_peermarks_"+$("#assignment_id").html()).hide(),$(".peermark_assignments_container").slideUp())})),$(document).on("click",".show_peermark_instructions, .hide_peermark_instructions",function(){var i=$(this).attr("id").split("_");"show"==i[0]?($("#show_peermark_instructions_"+i[3]).hide(),$("#hide_peermark_instructions_"+i[3]).show(),$("#peermark_instructions_"+i[3]).slideDown()):($("#show_peermark_instructions_"+i[3]).show(),$("#hide_peermark_instructions_"+i[3]).hide(),$("#peermark_instructions_"+i[3]).slideUp())}),showPartDatesBoxes(),$(document).on("change","#id_numparts",function(){showPartDatesBoxes()}),$(document).on("click",".splitter-lastname, .splitter-firstname",function(i){var e=$(i.target),t=e.hasClass("sorting_asc"),s="asc",a="desc",n=e.attr("data-col");t||(s="desc",a="asc"),e.closest(".submissionsDataTable").DataTable().order([n,a]).draw(),e.addClass("sorting_"+a).removeClass("sorting sorting_"+s),e.parent().removeClass("sorting sorting_asc sorting_desc"),e.siblings().removeClass("sorting_asc sorting_desc").addClass("sorting")}),$("#dataTable").length>0&&$("#dataTable").dataTable(),"undefined"!=typeof M.str.turnitintooltwo)var dataTablesLang={sProcessing:''+M.str.turnitintooltwo.sprocessing+"",sZeroRecords:M.str.turnitintooltwo.szerorecords,sInfo:M.str.turnitintooltwo.sinfo,sSearch:M.str.turnitintooltwo.ssearch,sLengthMenu:M.str.turnitintooltwo.slengthmenu,oPaginate:{sNext:M.str.turnitintooltwo.snext,sPrevious:M.str.turnitintooltwo.sprevious}};if($("#tabs").length>0){var activeTab=0;$("#tab_position").length>0&&(activeTab=$("#tab_position").text()),$("#tabs").tabs({active:activeTab,show:function(){var i=$.fn.dataTable.fnTables(!0);i.length>0&&$(i).dataTable().fnAdjustColumnSizing()}})}$(".enrolledMembers").length>0&&$(".enrolledMembers").dataTable({bProcessing:!0,sAjaxSource:"ajax.php",aoColumnDefs:[{bSortable:!1,sClass:"centered_cell",aTargets:[0]},{sClass:"left",aTargets:[1]}],oLanguage:dataTablesLang,fnServerData:function(i,e,t){$.ajax({dataType:"json",type:"POST",url:i,data:{action:"get_members",assignment:$("#assignment_id").html(),role:$("#user_role").html()},success:function(i){t(i)},error:function(i,e){$(".dataTables_processing").attr("style","visibility: hidden"),$(".dataTables_empty").html(M.str.turnitintooltwo.membercheckerror)}})}});var submissionsDataTableColumns=[],visibleCols=[],noOfColumns=$("table.submissionsDataTable th").length/$("table.submissionsDataTable").length,notStudentView=$("table.submissionsDataTable th.sorting_name").length>0,showOrigReport=$("table.submissionsDataTable th.creport").length>0,useGradeMark=$("table.submissionsDataTable th.cgrade").length>0,multipleParts=$("table.submissionsDataTable th.coverallgrade").length>0;if(notStudentView)for(var i=0;i=9&&!showOrigReport&&!useGradeMark||i>=11&&(!showOrigReport&&useGradeMark||showOrigReport&&!useGradeMark)||i>=13&&showOrigReport&&useGradeMark?(submissionsDataTableColumns.push({sClass:"center",bSortable:!1}),visibleCols.push(!0)):(0==i||4==i||7==i||9==i&&showOrigReport||9==i&&!showOrigReport||11==i&&useGradeMark)&&(submissionsDataTableColumns.push({bVisible:!1}),visibleCols.push(!1));else for(var i=0;i=8&&!showOrigReport&&!useGradeMark||i>=10&&(!showOrigReport&&useGradeMark||showOrigReport&&!useGradeMark)||i>=12&&showOrigReport&&useGradeMark?(submissionsDataTableColumns.push({sClass:"center",bSortable:!1}),visibleCols.push(!0)):(0==i||3==i||6==i||8==i&&showOrigReport||8==i&&!showOrigReport||10==i&&useGradeMark)&&(submissionsDataTableColumns.push({bVisible:!1}),visibleCols.push(!1));var partTables=[],refreshRequested=[];$("table.submissionsDataTable").each(function(){var i=$(this).attr("id");refreshRequested[i]=0,partTables[i]=$("table#"+i).dataTable({bProcessing:!0,aoColumns:submissionsDataTableColumns,aLengthMenu:[[10,25,50,100,-1],[10,25,50,100,"All"]],aaSorting:[[2,"asc"],[4,"asc"]],sAjaxSource:"ajax.php",oLanguage:dataTablesLang,sDom:'r<"listbar-container"<"top listbar clearfix"lf>><"dt_pagination clearfix"pi>t<"bottom"><"dt_pagination clearfix"pi>',fnServerData:function(e,t,s){$.ajax({dataType:"json",type:"POST",url:e,data:{action:"initialise_redraw"},success:function(e){disableEditingText(i),s(e),$("#"+i+"_processing").attr("style","visibility: visible"),getSubmissions(partTables[i],$("#assignment_id").html(),i,0,refreshRequested,0)}})},bStateSave:!0,fnStateSave:function(e,t){try{localStorage.setItem(i+"DataTables",JSON.stringify(t))}catch(s){}},fnStateSaveParams:function(i,e){e.abVisCols=visibleCols},fnStateLoad:function(e){try{return JSON.parse(localStorage.getItem(i+"DataTables"))}catch(t){}},fnStateLoadParams:function(i,e){e.abVisCols=visibleCols},fnDrawCallback:function(e){initialiseDigitalReceipt(),initialiseDVLaunchers("all",0,i,0),initialiseRefreshRow("all",0,i,0),initialiseUploadBox("all",0,0,0),initialiseZipDownloads(i),initialiseCheckboxes(0,i),initialiseUnanoymiseForm("all",0,0)}})}),$("table.submissionsDataTable").each(function(){var i=$(this).attr("id");refreshPeermarkAssignments(i,0)}),$(".messages_amount").length>0&&refreshUserMessages(),$(".tii_table_functions").each(function(){var i=$(this).attr("id").split("tii_table_functions_")[1],e=$("#tii_table_functions_"+i).html();$("#tii_table_functions_"+i).remove(),$("#"+i+"_length").after(e),$(".messages_inbox").show(),$("#refresh_"+i).show(),$("#refreshing_"+i).hide()});var zip_downloads=$(".zip_downloads");if($.each(zip_downloads,function(){var i=$(this).attr("id").split("_")[1];$(this).remove(),$("#"+i+"_length").after($(this))}),"Learner"==$("#user_role").html()&&$(".dataTables_length, .dataTables_filter, .dt_pagination").hide(),$(".refresh_link").click(function(){return $(this).is(":visible")&&($(".refresh_link").hide(),$(".refreshing_link").show(),$("table.submissionsDataTable").each(function(){refreshRequested[$(this).attr("id")]=1,partTables[$(this).attr("id")].fnReloadAjax(),partTables[$(this).attr("id")].fnStandingRedraw()})),!1}),$("#turnitin_sync_all_grades").length>0&&$(".turnitin_sync_grades").click(function(){$(".turnitin_sync_grades").hide(),$(".turnitin_syncing_grades").show(),$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:"sync_all_submissions",assignment:$("#turnitin_sync_all_grades").data("turnitintooltwoid"),sesskey:M.cfg.sesskey},success:function(i){$(".turnitin_sync_grades").show(),$(".turnitin_syncing_grades").hide()}})}),$(".submission_failure_msg").length>0&&window.parent.$(".upload_box").colorbox.resize({width:"800px",height:"240px"}),$(".enrol_link").click(function(){$("#enrolling_error").hide(),$(".enrol_link").hide(),$(".enrolling_container").show(),$.ajax({type:"POST",url:"ajax.php",dataType:"html",data:{action:"enrol_all_students",assignment:$("#assignment_id").html(),sesskey:M.cfg.sesskey},success:function(i){window.location.href=window.location.href},error:function(i,e){$(".enrol_link").show(),$(".enrolling_container").hide(),$("#enrolling_error").show()}})}),$(".rubric_manager_launch").length>0&&$(".rubric_manager_launch").colorbox({iframe:!0,width:"832px",height:"682px",opacity:"0.7",className:"rubric_manager",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){hideLoadingGif(),"rubric_manager_inbox_launch"!=$(this).attr("id")&&refreshRubricSelect(),$("#tii_close_bar").remove()}}),$(".rubric_view_launch").length>0&&$(".rubric_view_launch").colorbox({iframe:!0,width:"832px",height:"682px",opacity:"0.7",className:"rubric_view",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$("#id_rubric, #id_plagiarism_rubric").mousedown(function(){""!=$('input[name="instance"]').val()&&"Y"!=$('input[name="rubric_warning_seen"]').val()&&confirm(M.str.turnitintooltwo.changerubricwarning)&&$('input[name="rubric_warning_seen"]').val("Y")}),($(".quickmark_manager_launch").length>0||$(".plagiarism_turnitin_quickmark_manager_launch").length>0)&&$(".quickmark_manager_launch, .plagiarism_turnitin_quickmark_manager_launch").colorbox({iframe:!0,width:"770px",height:"600px",opacity:"0.7",className:"quickmark_manager",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".tii_peermark_manager_launch").length>0&&$(".tii_peermark_manager_launch").colorbox({iframe:!0,width:"802px",height:"772px",opacity:"0.7",className:"peermark_manager",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()},onClosed:function(){var i=$(this).attr("id").split("_");refreshPeermarkAssignments(i[2],1)}}),$(".tii_peermark_reviews_launch").length>0&&$(".tii_peermark_reviews_launch").colorbox({iframe:!0,width:"802px",height:"772px",opacity:"0.7",className:"peermark_reviews",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".messages_inbox").length>0&&$(".messages_inbox").colorbox({iframe:!0,width:"772px",height:"772px",opacity:"0.7",className:"messages",transition:"none",closeButton:!1,onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".nonsubmitters_link").length>0&&$(".nonsubmitters_link").colorbox({iframe:!0,width:"740px",height:"540px",opacity:"0.7",className:"nonsubmitters",transition:"none",closeButton:!1,onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(".nonsubmittersformsuccessmsg").length>0&&(hideLoadingGif(),window.parent.$(".nonsubmitters").colorbox.resize({width:"740px",height:"120px"})),$(".rubric_view_launch").length>0&&$(".rubric_view_launch").colorbox({iframe:!0,width:"832px",height:"682px",opacity:"0.7",className:"rubric_view",transition:"none",onLoad:function(){lightBoxCloseButton(),getLoadingGif()},onCleanup:function(){$("#tii_close_bar").remove(),hideLoadingGif()}}),$(document).on("click",".default_open, .origreport_open, .grademark_open",function(){var i=!0,e=$(this).attr("id").split("_"),t=$("#date_due_"+e[2]).html(),s=moment(t).unix(),a=e[0],n=e[1],o=e[2];if(s>moment().unix()&&$(this).hasClass("graded_warning")&&(confirm(M.str.turnitintooltwo.resubmissiongradewarn)||(i=!1)),i){dvWindow=window.open("","_blank");var r='
';r+='',r+='

'+M.str.turnitintooltwo.loadingdv+"

",r+="
",$(dvWindow.document.body).html(r),$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:a,submission:n,assignment:$("#assignment_id").html()},success:function(i){$(dvWindow.document.body).html(r+i),dvWindow.document.forms[0].submit(),dvWindow.document.close(),checkDVClosed(o)}})}}),$("#id_rubric").length>0&&refreshRubricSelect(),self!=top&&"box"==$("#view_context").html()?$("html").css("background","none"):self!=top&&"box_solid"==$("#view_context").html()&&$("html").css("background","#FFF"),$(".editable_postdue").on("click",function(){1==$(this).data("anon")&&alert(M.str.turnitintooltwo.postdate_warning)}),$(".editable_text").length>0){$.fn.editable.defaults.mode="inline",$.fn.editable.defaults.url="ajax.php",$.fn.editable.defaults.onblur="submit",$.fn.editable.defaults.showbuttons=!1,$.fn.editable.defaults.ajaxOptions={dataType:"json"},$(".editable_text").editable({validate:function(i){if($(this).attr("id").indexOf("marks_")>=0&&(Math.floor(i)!=i||!$.isNumeric(i)||i.indexOf(".")!=-1))return M.str.turnitintooltwo.maxmarkserror},success:function(i,e){if(!i.success)return i.msg;if("maxmarks"==i.field)$("#refresh_"+i.partid).click(),$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:"sync_all_submissions",assignment:$("#assignment_id").html(),sesskey:M.cfg.sesskey}});else if("partname"==i.field){var t=$(this).parentsUntil(".ui-tabs-panel").parent().attr("aria-labelledby");$("#"+t).text(e)}}}),$("#export_options").hasClass("tii_export_options_hide")&&($("#export_options").hide(),$(".export_data").html('--')),$(".editable_postdue").on("click",function(){var i=$(this);$.ajax({type:"POST",url:"ajax.php",dataType:"json",data:{action:"check_anon",part:i.data("pk"),assignment:$("#assignment_id").html()},success:function(e){i.data("anon",e.anon),i.data("unanon",e.unanon),i.data("submitted",e.submitted)}})});var theDate=new Date;$(".editable_date").editable({type:"combodate",format:"YYYY-MM-DD HH:mm",viewformat:"D MMM YYYY, HH:mm",template:"D MMM YYYY HH:mm",combodate:{minuteStep:1,minYear:2e3,maxYear:theDate.getFullYear()+2,smartDays:!0},validate:function(i){if(i.format("X")--')):($(".empty-dash").remove(),$("#export_options").show()))):i.msg}}),$(".editable_date").click(function(){if($(this).hasClass("editable-disabled"))return!1}),$(".editable_date, .editable_text").on("shown",function(i,e){var t=$(this).prop("id");$(".editable_date, .editable_text").not("#"+t).editable("disable"),$(".submit_nothing").addClass("disabled")}),$(".editable_date, .editable_text").on("hidden",function(){var i=$(this).prop("id");$(".editable_date, .editable_text").not("#"+i).editable("enable"),$(".submit_nothing").removeClass("disabled")})}$("#inbox_form form, .launch_form form").submit(),$(".turnitin_eula_link").length>0&&$(".turnitin_eula_link").colorbox({iframe:!0,width:"766px",height:"596px",opacity:"0.7",className:"eula_view",scrolling:"false",onLoad:function(){getLoadingGif()},onComplete:function(){$(window).on("message",function(i){var e="undefined"==typeof i.data?i.originalEvent.data:i.data;"turnitin_eula_declined"!=e&&"turnitin_eula_accepted"!=e||$.ajax({type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",dataType:"json",data:{action:"acceptuseragreement",message:e,sesskey:M.cfg.sesskey},success:function(i){window.location.reload()},error:function(i){window.location.reload()}})})},onCleanup:function(){hideLoadingGif()}}),$("#tii_receipt_print").click(function(){window.print()}),$(".select_all_checkbox").on("click",function(){var i=$(this).parent().parent().parent().parent().attr("id");$(this).is(":checked")?($("#"+i+" .inbox_checkbox").length&&$("#tabs-"+i+" .zip_downloads").slideDown(), +$("#"+i+" .inbox_checkbox").each(function(){$(this).prop("checked",!0)})):($("#"+i+" .inbox_checkbox").each(function(){$(this).prop("checked",!1)}),$("#"+i+" .inbox_checkbox").length&&$("#tabs-"+i+" .zip_downloads").slideUp())}),$("[id^=fitem_id_dtpost] select").change(function(){var i=$(this).parent().parent().parent(),e=buildUnixDate("#fitem_id_dtpost",i.data("partId"));e'+M.str.turnitintooltwo.closebutton+"")}function initialiseCourseRecreation(){var e=$(window).width(),t="80%";e<1e3&&(t="860px");var a=$(window).width(),s="80%";a<700&&(s="600px"),$("a.course_recreate").colorbox({iframe:!0,width:t,height:s,top:"100px",className:"migration",opacity:"0.7",onLoad:function(){lightBoxCloseButton()},onCleanup:function(){$("#tii_close_bar").remove()}}),$(".browser_checkbox").click(function(){$(".browser_checkbox:checked").length>0?$(".create_checkboxes").slideDown():$(".create_checkboxes").slideUp()})}function initialiseCourseBrowserButtons(e){$("#id_create_course").click(function(){$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"create_course",tii_course_id:$("#tii_course_id").html(),tii_course_name:encodeURIComponent($("#tii_course_name").html()),course_name:encodeURIComponent($("#id_coursename").val()),course_category:$("#id_coursecategory").val(),sesskey:M.cfg.sesskey},success:function(t){var a=jQuery.parseJSON(t);hideCourseCreationOptions(a,e)}})}),$("#id_update_course").click(function(){$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"link_course",tii_course_id:$("#tii_course_id").html(),tii_course_name:$("#tii_course_name").html(),course_to_link:$("#id_coursetolink").val(),sesskey:M.cfg.sesskey},success:function(t){var a=jQuery.parseJSON(t);hideCourseCreationOptions(a,e)}})})}function hideCourseCreationOptions(e,t){if(0!=e){$("#course_id").html(e.courseid);var a='input[name="check_'+$("#tii_course_id").html()+'"]';parent.$(a).hide();var s="#tick_"+$("#tii_course_id").html();parent.$(s).show(),$('fieldset[id$="create_course_fieldset"]').parent().slideToggle(),$('fieldset[id$="update_course_fieldset"]').parent().slideToggle(),$("#or_container").hide(),$("#existing_course_title_span").html(e.coursename),$(".existing_course_title_h3").removeClass("hidden_class"),$(".assignmentids_check").length>0&&($(".assignmentids_check").removeAttr("disabled"),$("#id_assignmentname").removeAttr("disabled"),$("#id_create_assignment").removeAttr("disabled")),$(".assignmentids_check").change(function(){$(".assignmentids_check").filter(":checked").length>=5?$(".assignmentids_check").not(":checked").attr("disabled","disabled"):$(".assignmentids_check").removeAttr("disabled")}),initialiseCreateAssignmentButton(t)}}function initialiseCreateAssignmentButton(e){$("#id_create_assignment").unbind("click"),$("#id_create_assignment").click(function(){var t="";$(".assignmentids_check:checked").each(function(e){t+=$(this).val()+","}),","==t.charAt(t.length-1)&&t.substring(0,t.length-1),$("#id_create_assignment").attr("disabled","disabled"),$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"create_assignment",course_id:$("#course_id").html(),assignment_name:$("#id_assignmentname").val(),parts:t,sesskey:M.cfg.sesskey},success:function(t){e.fnReloadAjax(),e.fnStandingRedraw(),$("#id_assignmentname").removeAttr("disabled"),$("#id_create_assignment").removeAttr("disabled"),$(".assignmentids_check").removeAttr("disabled")}})})}$(".submissionsDataTable thead tr, #courseBrowserTable thead tr").toggleClass("header");var dataTablesLang={nointegration:M.str.turnitintooltwo.nointegration,sProcessing:M.str.turnitintooltwo.sprocessing,sZeroRecords:M.str.turnitintooltwo.szerorecords,sInfo:M.str.turnitintooltwo.sinfo,sSearch:M.str.turnitintooltwo.ssearch,sLengthMenu:M.str.turnitintooltwo.slengthmenu,sInfoEmpty:M.str.turnitintooltwo.semptytable,oPaginate:{sNext:M.str.turnitintooltwo.snext,sPrevious:M.str.turnitintooltwo.sprevious}},dataTablesLangMigration={nointegration:M.str.turnitintooltwo.nointegration,sProcessing:M.str.turnitintooltwo.sprocessing,sZeroRecords:M.str.turnitintooltwo.szerorecords,sInfo:M.str.turnitintooltwo.sinfo,sSearch:"",sLengthMenu:M.str.turnitintooltwo.slengthmigrationmenu,sInfoEmpty:M.str.turnitintooltwo.semptytable,oPaginate:{sNext:M.str.turnitintooltwo.snext,sPrevious:M.str.turnitintooltwo.sprevious}};$("#unlinkUserTable").dataTable({bDestroy:!0,bProcessing:!0,bServerSide:!0,oLanguage:dataTablesLang,aaSorting:[[2,"asc"]],aLengthMenu:[[10,25,50,100,-1],[10,25,50,100,"All"]],sAjaxSource:"ajax.php?action=get_users",aoColumns:[{bSortable:!1,fnCreatedCell:function(e,t,a,s,i){$(e).addClass("centered_cell")}},null,{aDataSort:[2,3]},{aDataSort:[3,2]},null],fnDrawCallback:function(){$('input[name="selectallcb"]').attr("checked",!1)}}),"0"==$("#sametiiaccount").data("sametiiaccount")&&($('select[name="enablemigrationtool"]').attr("disabled","disabled"),$('select[name="enablemigrationtool"]').closest("form").find('input[name="submitbutton"]').attr("disabled","disabled")),$('input[name="selectallcb"]').closest("form").find('input[name="submitbutton"]').attr("disabled","disabled"),$(document).on("click",'#migrationTable input[name="selectallcb"], #migrationTable .browser_checkbox',function(){$("#migrationTable .browser_checkbox:checked").length>0?$("#migrationTable .browser_checkbox").closest("form").find('input[name="submitbutton"]').removeAttr("disabled"):$("#migrationTable .browser_checkbox").closest("form").find('input[name="submitbutton"]').attr("disabled","disabled")});var submitbutton=$("#migrationTable").closest("form").find('input[name="submitbutton"]');submitbutton.click(function(e){e.preventDefault();var t=M.str.turnitintooltwo.confirmv1deletetitle+"\n\n";t+=M.util.get_string("confirmv1deletetext","turnitintooltwo",$("#migrationTable .browser_checkbox:checked").length)+"\n\n",t+=M.str.turnitintooltwo.confirmv1deletewarning,confirm(t)&&$("#migrationTable").closest("form").submit()}),$("#migrationTable").dataTable({bDestroy:!0,bProcessing:!0,bServerSide:!0,oLanguage:dataTablesLangMigration,aaSorting:[[2,"asc"]],aLengthMenu:[[10,25,50,100,-1],[10,25,50,100,"All"]],sAjaxSource:"ajax.php?action=get_assignments",sDom:'<"top"lf>rt<"bottom"irp><"clear">',aoColumns:[{bSortable:!1,bSearchable:!1,fnCreatedCell:function(e,t,a,s,i){$(e).addClass("centered_cell")}},{bSortable:!0,sClass:"centered_cell",bSearchable:!1},{bSortable:!0,bSearchable:!0},{bSortable:!0,sClass:"centered_cell",bSearchable:!1}],fnDrawCallback:function(){$('input[name="selectallcb"]').attr("checked",!1)}}),$("#migrationTable_filter input").attr("placeholder","Search"),$("#filesTable").dataTable({bDestroy:!0,bProcessing:!0,bServerSide:!0,oLanguage:dataTablesLang,sAjaxSource:"ajax.php?action=get_files",aoColumns:[null,null,null,{sClass:"filename c0",sWidth:"40%"},null,{sClass:"fullname c1",sWidth:"35%"},null,{sClass:"created c2",sWidth:"22%"},{sClass:"remove c3",sWidth:"3%"}],aoColumnDefs:[{bSearchable:!0,bVisible:!1,aTargets:[0]},{bSearchable:!0,bVisible:!1,aTargets:[1]},{bSearchable:!0,bVisible:!1,aTargets:[2]},{bSearchable:!0,bVisible:!0,aTargets:[3]},{bSearchable:!0,bVisible:!1,aTargets:[4]},{bSearchable:!0,bVisible:!0,aTargets:[5]},{bSearchable:!0,bVisible:!1,aTargets:[6]},{bSearchable:!0,bVisible:!0,aTargets:[7]},{bSearchable:!0,bVisible:!0,aTargets:[8]}],fnDrawCallback:function(e){if(0!=e.aiDisplay.length)for(var t=$("#filesTable tbody tr"),a=t[0].getElementsByTagName("td").length,s="",i=0;iip'}),$.datepicker.regional[""].dateFormat="d M yy",$.datepicker.setDefaults($.datepicker.regional[""]);var courseBrowserTable=$("#courseBrowserTable").dataTable({bProcessing:!0,oLanguage:dataTablesLang,aaSorting:[[6,"asc"]],sAjaxSource:"ajax.php",aoColumnDefs:[{bSearchable:!1,bSortable:!1,sWidth:"5%",bVisible:!0,aTargets:[0],fnCreatedCell:function(e){$(e).addClass("center")}},{bSearchable:!0,bVisible:!0,sWidth:"45%",iDataSort:6,aTargets:[1]},{bSearchable:!0,bVisible:!0,sWidth:"10%",aTargets:[2]},{bSearchable:!0,bVisible:!0,sWidth:"20%",iDataSort:7,aTargets:[3],fnCreatedCell:function(e){$(e).addClass("right")}},{bSearchable:!1,bVisible:!0,sWidth:"10%",aTargets:[4],fnCreatedCell:function(e){$(e).addClass("right")}},{bSearchable:!0,bVisible:!0,sWidth:"10%",aTargets:[5],fnCreatedCell:function(e){$(e).addClass("center")}},{bSearchable:!0,bVisible:!1,aTargets:[6]},{bSearchable:!0,bVisible:!1,aTargets:[7]}],fnServerData:function(e,t,a){$.ajax({dataType:"json",type:"POST",url:e,data:{action:"search_classes",course_title:$("#search_course_title").val(),course_integration:$("#search_course_integration").val(),course_end_date:$("#search_course_end_date").val(),sesskey:M.cfg.sesskey},success:function(e){a(e)}})},bStateSave:!0,fnStateSave:function(e,t){try{localStorage.setItem(uid+"DataTables",JSON.stringify(t))}catch(a){}},fnStateLoad:function(e){try{return JSON.parse(localStorage.getItem(uid+"DataTables"))}catch(t){}},fnDrawCallback:function(){$('input[name="selectallcb"]').attr("checked",!1),initialiseCourseRecreation(),initialiseEditEndDate(),$("#search_courses_button").removeAttr("disabled")}});$("#search_courses_button").click(function(){return $(this).attr("disabled","disabled"),courseBrowserTable.fnReloadAjax(),courseBrowserTable.fnStandingRedraw(),!1}),$("#search_course_end_date").datepicker();var oTable=$("#assignmentBrowserTable").dataTable({bProcessing:!0,oLanguage:dataTablesLang,sAjaxSource:"ajax.php",fnServerData:function(sSource,aoData,fnCallback){$("#id_create_course").attr("disabled","disabled"),$("#id_update_course").attr("disabled","disabled"),$("#assignmentBrowserTable").length>0&&$(".side-pre-only #page-content #region-main").css({"margin-left":"0px"}),$("#id_assignmentname").attr("disabled","disabled"),$("#id_create_assignment").attr("disabled","disabled"),$.ajax({dataType:"json",type:"POST",url:sSource,data:{action:"get_assignments",tii_course_id:$("#tii_course_id").html(),sesskey:M.cfg.sesskey},success:function(result){eval(result),initialiseCourseBrowserButtons(oTable),fnCallback(result),"0"!=$("#course_id").html()&&result.number_of_assignments>0?($("#id_assignmentname").removeAttr("disabled"),$("#id_create_assignment").removeAttr("disabled"),$(".assignmentids_check").removeAttr("disabled"),initialiseCreateAssignmentButton(oTable)):($("#id_assignmentname").attr("disabled","disabled"),$("#id_create_assignment").attr("disabled","disabled"),$(".assignmentids_check").attr("disabled","disabled")),$("#id_create_course").removeAttr("disabled"),$("#id_update_course").removeAttr("disabled")}})},aoColumnDefs:[{bSearchable:!1,bVisible:!0,aTargets:[0]},{bSearchable:!0,bVisible:!0,aTargets:[1],fnCreatedCell:function(e){$(e).addClass("nowrap")}},{bSearchable:!0,bVisible:!0,aTargets:[2]},{bSearchable:!0,bVisible:!0,aTargets:[3]}]});if($("#create_classes_button").colorbox({iframe:!0,width:"60%",top:"200px",height:"124px",opacity:"0.7",className:"course_creation",href:function(){var e=$(".create_course_category").val(),t=$(".create_assignment_checkbox").is(":checked")?"1":"0",a="";$(".browser_checkbox:checked").each(function(e){a+="&class_id"+e+"="+$(this).val(),e++});var s=window.location.href,i=s.replace("cmd=courses","cmd=multiple_class_recreation");return i+"&view_context=box&category="+e+"&assignments="+t+a+"&sesskey="+M.cfg.sesskey},onCleanup:function(){window.location=window.location}}),$("#class_ids").length>0){$(".side-pre-only #page-content #region-main").css({"margin-left":"0px"}),$(".has-region-side-pre #page-content #region-main").css({width:"100%","margin-top":"-30px"});var class_ids=$("#class_ids").html();$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"create_courses",class_ids:class_ids,course_category:$("#course_category").html(),create_assignments:$("#create_assignments").html(),sesskey:M.cfg.sesskey},success:function(e){$("#course_creation_status").html(e)}})}}); -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cm5pdGludG9vbHR3b19leHRyYS5qcyJdLCJuYW1lcyI6WyJqUXVlcnkiLCJkb2N1bWVudCIsInJlYWR5IiwiJCIsImluaXRpYWxpc2VFZGl0RW5kRGF0ZSIsImNvbG9yYm94IiwiaW5saW5lIiwid2lkdGgiLCJ0b3AiLCJiYWNrZ3JvdW5kIiwiaGVpZ2h0Iiwib3BhY2l0eSIsImNsYXNzTmFtZSIsIm9uTG9hZCIsImxpZ2h0Qm94Q2xvc2VCdXR0b24iLCJvbkNvbXBsZXRlIiwiY3VycmVudF9kYXRlIiwidGhpcyIsImF0dHIiLCJzcGxpdCIsInZhbCIsImlkU3RyIiwidGlpX2NvdXJzZV9pZCIsImh0bWwiLCJzaG93IiwiY3NzIiwiY2xpY2siLCJhamF4IiwiZGF0YVR5cGUiLCJ0eXBlIiwidXJsIiwiZGF0YSIsImFjdGlvbiIsInRpaV9jb3Vyc2VfdGl0bGUiLCJzZXNza2V5IiwiTSIsImNmZyIsImVuZF9kYXRlX2QiLCJlbmRfZGF0ZV9tIiwiZW5kX2RhdGVfeSIsInN1Y2Nlc3MiLCJldmFsIiwic3RhdHVzIiwicGFyZW50IiwiZm4iLCJjbG9zZSIsImVuZF9kYXRlIiwiY3VycmVudF9tc2ciLCJtc2ciLCJvbkNsZWFudXAiLCJoaWRlIiwicmVtb3ZlIiwiYXBwZW5kIiwic3RyIiwidHVybml0aW50b29sdHdvIiwiY2xvc2VidXR0b24iLCJpbml0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WyAyLCBcImFzY1wiIF1dLFxuICAgICAgICBcImFMZW5ndGhNZW51XCI6IFtbMTAsIDI1LCA1MCwgMTAwLCAtMV0sIFsxMCwgMjUsIDUwLCAxMDAsIFwiQWxsXCJdXSxcbiAgICAgICAgXCJzQWpheFNvdXJjZVwiOiBcImFqYXgucGhwP2FjdGlvbj1nZXRfdXNlcnNcIixcbiAgICAgICAgXCJhb0NvbHVtbnNcIjogW1xuICAgICAgICAgICAgICAgICAgICAgICAge1wiYlNvcnRhYmxlXCI6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZm5DcmVhdGVkQ2VsbFwiOiBmdW5jdGlvbiAoblRkLCBzRGF0YSwgb0RhdGEsIGlSb3csIGlDb2wpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJChuVGQpLmFkZENsYXNzKCdjZW50ZXJlZF9jZWxsJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfX0sXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAge1wiYURhdGFTb3J0XCI6IFsgMiwgMyBdfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcImFEYXRhU29ydFwiOiBbIDMsIDIgXX0sXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsXG4gICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICBcImZuRHJhd0NhbGxiYWNrXCI6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICQoJ2lucHV0W25hbWU9XCJzZWxlY3RhbGxjYlwiXScpLmF0dHIoJ2NoZWNrZWQnLCBmYWxzZSk7XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIC8vIERpc2FibGUgdGhlIHN1Ym1pdCBidXR0b24gaWYgVHVybml0aW4gdjEgYW5kIHYyIGFjY291bnQgaWRzIGFyZSBkaWZmZXJlbnQgaW4gTWlncmF0aW9uIFRvb2wuXG4gICAgaWYgKCAkKCcjc2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CI6IGRhdGFUYWJsZXNMYW5nLFxuICAgICAgICBcInNBamF4U291cmNlXCI6IFwiYWpheC5waHA/YWN0aW9uPWdldF9maWxlc1wiLFxuICAgICAgICBcImFvQ29sdW1uc1wiOiBbXG4gICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgIHtcInNDbGFzc1wiOiBcImZpbGVuYW1lIGMwXCIsIFwic1dpZHRoXCI6IFwiNDAlXCJ9LFxuICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICB7XCJzQ2xhc3NcIjogXCJmdWxsbmFtZSBjMVwiLCBcInNXaWR0aFwiOiBcIjM1JVwifSxcbiAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAge1wic0NsYXNzXCI6IFwiY3JlYXRlZCBjMlwiLCBcInNXaWR0aFwiOiBcIjIyJVwifSxcbiAgICAgICAgICAgICAgICAgICAge1wic0NsYXNzXCI6IFwicmVtb3ZlIGMzXCIsIFwic1dpZHRoXCI6IFwiMyVcIn1cbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICBcImFvQ29sdW1uRGVmc1wiOiBbXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogZmFsc2UsIFwiYVRhcmdldHNcIjogWyAwIF19LFxuICAgICAgICAgICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IGZhbHNlLCBcImFUYXJnZXRzXCI6IFsgMSBdfSxcbiAgICAgICAgICAgICAgICAgICAge1wiYlNlYXJjaGFibGVcIjogdHJ1ZSwgXCJiVmlzaWJsZVwiOiBmYWxzZSwgXCJhVGFyZ2V0c1wiOiBbIDIgXX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogdHJ1ZSwgXCJhVGFyZ2V0c1wiOiBbIDMgXX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogZmFsc2UsIFwiYVRhcmdldHNcIjogWyA0IF19LFxuICAgICAgICAgICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IHRydWUsIFwiYVRhcmdldHNcIjogWyA1IF19LFxuICAgICAgICAgICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IGZhbHNlLCBcImFUYXJnZXRzXCI6IFsgNiBdfSxcbiAgICAgICAgICAgICAgICAgICAge1wiYlNlYXJjaGFibGVcIjogdHJ1ZSwgXCJiVmlzaWJsZVwiOiB0cnVlLCBcImFUYXJnZXRzXCI6IFsgNyBdfSxcbiAgICAgICAgICAgICAgICAgICAge1wiYlNlYXJjaGFibGVcIjogdHJ1ZSwgXCJiVmlzaWJsZVwiOiB0cnVlLCBcImFUYXJnZXRzXCI6IFsgOCBdfVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgIFwiZm5EcmF3Q2FsbGJhY2tcIjogZnVuY3Rpb24gKCBvU2V0dGluZ3MgKSB7XG4gICAgICAgICAgICBpZiAoIG9TZXR0aW5ncy5haURpc3BsYXkubGVuZ3RoID09IDAgKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIG5UcnMgPSAkKCcjZmlsZXNUYWJsZSB0Ym9keSB0cicpO1xuICAgICAgICAgICAgdmFyIGlDb2xzcGFuID0gblRyc1swXS5nZXRFbGVtZW50c0J5VGFnTmFtZSgndGQnKS5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgc0xhc3RHcm91cCA9IFwiXCI7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG5UcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgaURpc3BsYXlJbmRleCA9IG9TZXR0aW5ncy5faURpc3BsYXlTdGFydCArIGk7XG4gICAgICAgICAgICAgICAgdmFyIHNHcm91cCA9IG9TZXR0aW5ncy5hb0RhdGFbIG9TZXR0aW5ncy5haURpc3BsYXlbaV0gXS5fYURhdGFbMF07XG4gICAgICAgICAgICAgICAgaWYgKCBzR3JvdXAgIT0gc0xhc3RHcm91cCApXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbkdyb3VwID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCggJ3RyJyApO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbkNlbGwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCAndGQnICk7XG4gICAgICAgICAgICAgICAgICAgIG5DZWxsLmNvbFNwYW4gPSBpQ29sc3BhbjtcbiAgICAgICAgICAgICAgICAgICAgbkNlbGwuY2xhc3NOYW1lID0gXCJncm91cFwiO1xuICAgICAgICAgICAgICAgICAgICBuQ2VsbC5pbm5lckhUTUwgPSBzR3JvdXA7XG4gICAgICAgICAgICAgICAgICAgIG5Hcm91cC5hcHBlbmRDaGlsZCggbkNlbGwgKTtcbiAgICAgICAgICAgICAgICAgICAgblRyc1tpXS5wYXJlbnROb2RlLmluc2VydEJlZm9yZSggbkdyb3VwLCBuVHJzW2ldICk7XG4gICAgICAgICAgICAgICAgICAgIHNMYXN0R3JvdXAgPSBzR3JvdXA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBcImFhU29ydGluZ0ZpeGVkXCI6IFtbIDAsICdhc2MnIF1dLFxuICAgICAgICBcImFhU29ydGluZ1wiOiBbWyAxLCAnYXNjJyBdXSxcbiAgICAgICAgXCJzRG9tXCI6ICdsZnI8XCJnaXZlSGVpZ2h0XC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pRGF0YVNvcnRcIjogNiwgXCJhVGFyZ2V0c1wiOiBbIDEgXX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogdHJ1ZSwgXCJzV2lkdGhcIjogXCIxMCVcIiwgXCJhVGFyZ2V0c1wiOiBbIDIgXX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogdHJ1ZSwgXCJzV2lkdGhcIjogXCIyMCVcIiwgXCJpRGF0YVNvcnRcIjogNywgXCJhVGFyZ2V0c1wiOiBbIDMgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZm5DcmVhdGVkQ2VsbFwiOiBmdW5jdGlvbiAoblRkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJChuVGQpLmFkZENsYXNzKCdyaWdodCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IGZhbHNlLCBcImJWaXNpYmxlXCI6IHRydWUsIFwic1dpZHRoXCI6IFwiMTAlXCIsIFwiYVRhcmdldHNcIjogWyA0IF0sXG4gICAgICAgICAgICAgICAgICAgICAgICBcImZuQ3JlYXRlZENlbGxcIjogZnVuY3Rpb24gKG5UZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoblRkKS5hZGRDbGFzcygncmlnaHQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH19LFxuICAgICAgICAgICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IHRydWUsIFwic1dpZHRoXCI6IFwiMTAlXCIsIFwiYVRhcmdldHNcIjogWyA1IF0sXG4gICAgICAgICAgICAgICAgICAgICAgICBcImZuQ3JlYXRlZENlbGxcIjogZnVuY3Rpb24gKG5UZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoblRkKS5hZGRDbGFzcygnY2VudGVyJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9fSxcbiAgICAgICAgICAgICAgICAgICAge1wiYlNlYXJjaGFibGVcIjogdHJ1ZSwgXCJiVmlzaWJsZVwiOiBmYWxzZSwgXCJhVGFyZ2V0c1wiOiBbIDYgXX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogZmFsc2UsIFwiYVRhcmdldHNcIjogWyA3IF19XG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgXCJmblNlcnZlckRhdGFcIjogZnVuY3Rpb24gKCBzU291cmNlLCBhb0RhdGEsIGZuQ2FsbGJhY2sgKSB7XG4gICAgICAgICAgICAkLmFqYXgoe1xuICAgICAgICAgICAgICAgIFwiZGF0YVR5cGVcIjogJ2pzb24nLFxuICAgICAgICAgICAgICAgIFwidHlwZVwiOiBcIlBPU1RcIixcbiAgICAgICAgICAgICAgICBcInVybFwiOiBzU291cmNlLFxuICAgICAgICAgICAgICAgIFwiZGF0YVwiOiB7YWN0aW9uOiBcInNlYXJjaF9jbGFzc2VzXCIsIGNvdXJzZV90aXRsZTogJCgnI3NlYXJjaF9jb3Vyc2VfdGl0bGUnKS52YWwoKSxcbiAgICAgICAgICAgICAgICAgICAgY291cnNlX2ludGVncmF0aW9uOiAkKCcjc2VhcmNoX2NvdXJzZV9pbnRlZ3JhdGlvbicpLnZhbCgpLFxuICAgICAgICAgICAgICAgICAgICBjb3Vyc2VfZW5kX2RhdGU6ICQoJyNzZWFyY2hfY291cnNlX2VuZF9kYXRlJykudmFsKCksIHNlc3NrZXk6IE0uY2ZnLnNlc3NrZXl9LFxuICAgICAgICAgICAgICAgIFwic3VjY2Vzc1wiOiBmdW5jdGlvbihyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgZm5DYWxsYmFjayhyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgIC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CI7XG4gICAgICAgICAgICAgICAgdmFyIGkgPSAwO1xuICAgICAgICAgICAgICAgICQoJy5icm93c2VyX2NoZWNrYm94OmNoZWNrZWQnKS5lYWNoKGZ1bmN0aW9uKGkpe1xuICAgICAgICAgICAgICAgICAgICBjbGFzc19pZHMgKz0gXCImY2xhc3NfaWRcIiArIGkgKyBcIj1cIiArICQodGhpcykudmFsKCk7XG4gICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHZhciBwYWdldXJsID0gd2luZG93LmxvY2F0aW9uLmhyZWY7XG4gICAgICAgICAgICAgICAgdmFyIHVybCA9IHBhZ2V1cmwucmVwbGFjZShcImNtZD1jb3Vyc2VzXCIsIFwiY21kPW11bHRpcGxlX2NsYXNzX3JlY3JlYXRpb25cIik7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdXJsICsgXCImdmlld19jb250ZXh0PWJveCZjYXRlZ29yeT1cIiArIGNhdGVnb3J5ICsgXCImYXNzaWdubWVudHM9XCIgKyBhc3NpZ25tZW50cyArIGNsYXNzX2lkcyArIFwiJnNlc3NrZXk9XCIgKyBNLmNmZy5zZXNza2V5O1xuICAgICAgICB9LFxuICAgICAgICBvbkNsZWFudXA6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uID0gd2luZG93LmxvY2F0aW9uO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICBpZiAoJCgnI2NsYXNzX2lkcycpLmxlbmd0aCA+IDApIHtcblxuICAgICAgICAvLyBNb3ZlIGJveCB3aXRoaW4gZnJhbWUuXG4gICAgICAgICQoXCIuc2lkZS1wcmUtb25seSAjcGFnZS1jb250ZW50ICNyZWdpb24tbWFpblwiKS5jc3Moe1xuICAgICAgICAgICAgJ21hcmdpbi1sZWZ0JyA6ICcwcHgnXG4gICAgICAgIH0pO1xuXG4gICAgICAgICQoXCIuaGFzLXJlZ2lvbi1zaWRlLX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AgICB2YXIgdGlpX2NvdXJzZV9pZCA9IGlkU3RyWzJdO1xuICAgICAgICAgICAgICAgICQoJ2lucHV0W25hbWU9XCJ0aWlfY291cnNlX2lkXCJdJykudmFsKHRpaV9jb3Vyc2VfaWQpO1xuICAgICAgICAgICAgICAgICQoJ2lucHV0W25hbWU9XCJ0aWlfY291cnNlX3RpdGxlXCJdJykudmFsKCQoJ2EjY291cnNlXycgKyB0aWlfY291cnNlX2lkKS5odG1sKCkpO1xuICAgICAgICAgICAgICAgICQoJyNjYm94TG9hZGVkQ29udGVudCAuZWRpdF9jb3Vyc2VfZW5kX2RhdGVfZm9ybScpLnNob3coKTtcbiAgICAgICAgICAgICAgICAkKCcjZGF0ZXNlbGVjdG9yLWNhbGVuZGFyLXBhbmVsJykuY3NzKCd6LWluZGV4JywgJzk5OTknKTtcblxuICAgICAgICAgICAgICAgICQoJyNpZF9zYXZlX2VuZF9kYXRlJykuY2xpY2soZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICQuYWpheCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcImRhdGFUeXBlXCI6ICdqc29uJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidHlwZVwiOiBcIlBPU1RcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidXJsXCI6IFwiYWpheC5waHBcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZGF0YVwiOiB7YWN0aW9uOiBcImVkaXRfY291cnNlX2VuZF9kYXRlXCIsIHRpaV9jb3Vyc2VfaWQ6IHRpaV9jb3Vyc2VfaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGlpX2NvdXJzZV90aXRsZTogJCgnYSNjb3Vyc2VfJyArIHRpaV9jb3Vyc2VfaWQpLmh0bWwoKSwgc2Vzc2tleTogTS5jZmcuc2Vzc2tleSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRfZGF0ZV9kOiAkKCcjaWRfbmV3X2NvdXJzZV9lbmRfZGF0ZV9kYXknKS52YWwoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRfZGF0ZV9tOiAkKCcjaWRfbmV3X2NvdXJzZV9lbmRfZGF0ZV9tb250aCcpLnZhbCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZF9kYXRlX3k6ICQoJyNpZF9uZXdfY291cnNlX2VuZF9kYXRlX3llYXInKS52YWwoKVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLnN0YXR1cyA9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQuJC5mbi5jb2xvcmJveC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKCcjY291cnNlX2RhdGVfJyArIHRpaV9jb3Vyc2VfaWQgKyAnIHNwYW4nKS5odG1sKGRhdGEuZW5kX2RhdGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50X21zZyA9ICQoJyNlZGl0X2VuZF9kYXRlX2Rlc2MnKS5odG1sO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKCcjZWRpdF9lbmRfZGF0ZV9kZXNjJykuaHRtbChjdXJyZW50X21zZyArIFwiIFwiICsgZGF0YS5tc2cpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgb25DbGVh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ICAgICB9XG5cbiAgICAgICAgdmFyIHdpbmRvd0hlaWdodCA9ICQod2luZG93KS53aWR0aCgpO1xuICAgICAgICB2YXIgY29sb3JCb3hIZWlnaHQgPSBcIjgwJVwiO1xuICAgICAgICBpZiAod2luZG93SGVpZ2h0IDwgNzAwKSB7XG4gICAgICAgICAgICBjb2xvckJveEhlaWdodCA9IFwiNjAwcHhcIjtcbiAgICAgICAgfVxuXG4gICAgICAgICQoXCJhLmNvdXJzZV9yZWNyZWF0ZVwiKS5jb2xvcmJveCh7XG4gICAgICAgICAgICBpZnJhbWU6dHJ1ZSwgd2lkdGg6Y29sb3JCb3hXaWR0aCwgaGVpZ2h0OmNvbG9yQm94SGVpZ2h0LCB0b3A6ICcxMDBweCcsIGNsYXNzTmFtZTogXCJtaWdyYXRpb25cIiwgb3BhY2l0eTogXCIwLjdcIixcbiAgICAgICAgICAgIG9uTG9hZDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDbG9zZUJ1dHRvbigpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9uQ2xlYW51cDpmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAkKCcjdGlpX2Nsb3NlX2JhcicpLnJlbW92ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICAkKCcuYnJvd3Nlcl9jaGVja2JveCcpLmNsaWNrKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgaWYgKCQoJy5icm93c2VyX2NoZWNrYm94OmNoZWNrZWQnKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgJCgnLmNyZWF0ZV9jaGVja2JveGVzJykuc2xpZGVEb3duKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICQoJy5jcmVhdGVfY2hlY2tib3hlcycpLnNsaWRlVXAoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLy8gTWFrZSB0aGUgYnV0dG9ucyBvbiB0aGUgY291cnNlIGNyZWF0aW9uL2xpbmsgZm9ybXMgY2xpY2thYmxlIGFuZCBjb25maWd1cmUgdGhlIHJlbGV2YW50IHRyaWdnZXJlZCBldmVudC5cbiAgICBmdW5jdGlvbiBpbml0aWFsaXNlQ291cnNlQnJvd3NlckJ1dHRvbnMob1RhYmxlKSB7XG4gICAgICAgICQoJyNpZF9jcmVhdGVfY291cnNlJykuY2xpY2soZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAkLmFqYXgoe1xuICAgICAgICAgICAgICAgIFwiZGF0YVR5cGVcIjogJ2h0bWwnLFxuICAgICAgICAgICAgICAgIFwidHlwZVwiOiBcIlBPU1RcIixcbiAgICAgICAgICAgICAgICBcInVybFwiOiBcImFqYXgucGhwXCIsXG4gICAgICAgICAgICAgICAgXCJkYXRhXCI6IHthY3Rpb246IFwiY3JlYXRlX2NvdXJzZVwiLCB0aWlfY291cnNlX2lkOiAkKFwiI3RpaV9jb3Vyc2VfaWRcIikuaHRtbCgpLFxuICAgICAgICAgICAgICAgICAgICB0aWlfY291cnNlX25hbWU6IGVuY29kZVVSSUNvbXBvbmVudCgkKFwiI3RpaV9jb3Vyc2VfbmFtZVwiKS5odG1sKCkpLFxuICAgICAgICAgICAgICAgICAgICBjb3Vyc2VfbmFtZTogZW5jb2RlVVJJQ29tcG9uZW50KCQoXCIjaWRfY291cnNlbmFtZVwiKS52YWwoKSksXG4gICAgICAgICAgICAgICAgICAgIGNvdXJzZV9jYXRlZ29yeTogJChcIiNpZF9jb3Vyc2VjYXRlZ29yeVwiKS52YWwoKSwgc2Vzc2tleTogTS5jZmcuc2Vzc2tleX0sXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb2JqID0galF1ZXJ5LnBhcnNlSlNPTihkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgaGlkZUNvdXJzZUNyZWF0aW9uT3B0aW9ucyhvYmosIG9UYWJsZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgICQoJyNpZF91cGRhdGVfY291cnNlJykuY2xpY2soZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAkLmFqYXgoe1xuICAgICAgICAgICAgICAgIFwiZGF0YVR5cGVcIjogJ2h0bWwnLFxuICAgICAgICAgICAgICAgIFwidHlwZVwiOiBcIlBPU1RcIixcbiAgICAgICAgICAgICAgICBcInVybFwiOiBcImFqYXgucGhwXCIsXG4gICAgICAgICAgICAgICAgXCJkYXRhXCI6IHthY3Rpb246IFwibGlua19jb3Vyc2VcIiwgdGlpX2NvdXJzZV9pZDogJChcIiN0aWlfY291cnNlX2lkXCIpLmh0bWwoKSxcbiAgICAgICAgICAgICAgICAgICAgdGlpX2NvdXJzZV9uYW1lOiAkKFwiI3RpaV9jb3Vyc2VfbmFtZVwiKS5odG1sKCksIGNvdXJzZV90b19saW5rOiAkKFwiI2lkX2NvdXJzZXRvbGlua1wiKS52YWwoKSxcbiAgICAgICAgICAgICAgICAgICAgc2Vzc2tleTogTS5jZmcuc2Vzc2tleX0sXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb2JqID0galF1ZXJ5LnBhcnNlSlNPTihkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgaGlkZUNvdXJzZUNyZWF0aW9uT3B0aW9ucyhvYmosIG9UYWJsZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8vIEhpZGUgdGhlIGNvdXJzZSBjcmVhdGlvbi9saW5raW5nIGZvcm0gb25jZSB0aGUgc2VsZWN0ZWQgVHVybml0aW5cbiAgICAvLyBjb3Vyc2UgaGFzIGJlZW4gY3JlYXRlZC9saW5rZWQgbG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dGVfYXNzaWdubWVudCcpLnVuYmluZChcImNsaWNrXCIpO1xuICAgICAgICAkKCcjaWRfY3JlYXRlX2Fzc2lnbm1lbnQnKS5jbGljayhmdW5jdGlvbigpIHtcblxuICAgICAgICAgICAgdmFyIHBhcnRzID0gXCJcIjtcbiAgICAgICAgICAgICQoJy5hc3NpZ25tZW50aWRzX2NoZWNrOmNoZWNrZWQnKS5lYWNoKGZ1bmN0aW9uKGkpe1xuICAgICAgICAgICAgICAgIHBhcnRzICs9ICQodGhpcykudmFsKCkgKyBcIixcIjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKHBhcnRzLmNoYXJBdChwYXJ0cy5sZW5ndGggLSAxKSA9PSAnLCcpIHtcbiAgICAgICAgICAgICAgICBwYXJ0cy5zdWJzdHJpbmcoMCwgcGFydHMubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICQoXCIjaWRfY3JlYXRlX2Fzc2lnbm1lbnRcIikuYXR0cignZGlzYWJsZWQnLCAnZGlzYWJsZWQnKTtcblxuICAgICAgICAgICAgJC5hamF4KHtcbiAgICAgICAgICAgICAgICBcImRhdGFUeXBlXCI6ICdodG1sJyxcbiAgICAgICAgICAgICAgICBcInR5cGVcIjogXCJQT1NUXCIsXG4gICAgICAgICAgICAgICAgXCJ1cmxcIjogXCJhamF4LnBocFwiLFxuICAgICAgICAgICAgICAgIFwiZGF0YVwiOiB7YWN0aW9uOiBcImNyZWF0ZV9hc3NpZ25tZW50XCIsIGNvdXJzZV9pZDogJChcIiNjb3Vyc2VfaWRcIikuaHRtbCgpLFxuICAgICAgICAgICAgICAgICAgICBhc3NpZ25tZW50X25hbWU6ICQoXCIjaWRfYXNzaWdubWVudG5hbWVcIikudmFsKCksIHBhcnRzOiBwYXJ0cywgc2Vzc2tleTogTS5jZmcuc2Vzc2tleX0sXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBvVGFibGUuZm5SZWxvYWRBamF4KCk7XG4gICAgICAgICAgICAgICAgICAgIG9UYWJsZS5mblN0YW5kaW5nUmVkcmF3KCk7XG4gICAgICAgICAgICAgICAgICAgICQoXCIjaWRfYXNzaWdubWVudG5hbWVcIikucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgJChcIiNpZF9jcmVhdGVfYXNzaWdubWVudFwiKS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAkKFwiLmFzc2lnbm1lbnRpZHNfY2hlY2tcIikucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxufSk7Il19 diff --git a/jquery/turnitintooltwo_extra-2018082301.js b/jquery/turnitintooltwo_extra-2018102601.js similarity index 100% rename from jquery/turnitintooltwo_extra-2018082301.js rename to jquery/turnitintooltwo_extra-2018102601.js diff --git a/jquery/turnitintooltwo_extra-2018102601.min.js b/jquery/turnitintooltwo_extra-2018102601.min.js new file mode 100644 index 00000000..592b099d --- /dev/null +++ b/jquery/turnitintooltwo_extra-2018102601.min.js @@ -0,0 +1,2 @@ +jQuery(document).ready(function($){function initialiseEditEndDate(){$("a.edit_course_end_link").colorbox({inline:!0,width:"60%",top:"100px",background:"#fff",height:"260px",opacity:"0.7",className:"edit_end_date_form",onLoad:function(){lightBoxCloseButton()},onComplete:function(){var current_date=$("#"+$(this).attr("id")+" span").attr("id");current_date=current_date.split("_"),$("#id_new_course_end_date_day").val(current_date[1]),$("#id_new_course_end_date_month").val(current_date[2]),$("#id_new_course_end_date_year").val(current_date[3]);var idStr=$(this).attr("id").split("_"),tii_course_id=idStr[2];$('input[name="tii_course_id"]').val(tii_course_id),$('input[name="tii_course_title"]').val($("a#course_"+tii_course_id).html()),$("#cboxLoadedContent .edit_course_end_date_form").show(),$("#dateselector-calendar-panel").css("z-index","9999"),$("#id_save_end_date").click(function(){$.ajax({dataType:"json",type:"POST",url:"ajax.php",data:{action:"edit_course_end_date",tii_course_id:tii_course_id,tii_course_title:$("a#course_"+tii_course_id).html(),sesskey:M.cfg.sesskey,end_date_d:$("#id_new_course_end_date_day").val(),end_date_m:$("#id_new_course_end_date_month").val(),end_date_y:$("#id_new_course_end_date_year").val()},success:function(data){if(eval(data),"success"==data.status)parent.$.fn.colorbox.close(),$("#course_date_"+tii_course_id+" span").html(data.end_date);else{var current_msg=$("#edit_end_date_desc").html;$("#edit_end_date_desc").html(current_msg+" "+data.msg)}}})})},onCleanup:function(){$(".edit_course_end_date_form").hide(),$("#tii_close_bar").remove()}})}function lightBoxCloseButton(){$("body").append('")}function initialiseCourseRecreation(){var e=$(window).width(),t="80%";e<1e3&&(t="860px");var a=$(window).width(),s="80%";a<700&&(s="600px"),$("a.course_recreate").colorbox({iframe:!0,width:t,height:s,top:"100px",className:"migration",opacity:"0.7",onLoad:function(){lightBoxCloseButton()},onCleanup:function(){$("#tii_close_bar").remove()}}),$(".browser_checkbox").click(function(){$(".browser_checkbox:checked").length>0?$(".create_checkboxes").slideDown():$(".create_checkboxes").slideUp()})}function initialiseCourseBrowserButtons(e){$("#id_create_course").click(function(){$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"create_course",tii_course_id:$("#tii_course_id").html(),tii_course_name:encodeURIComponent($("#tii_course_name").html()),course_name:encodeURIComponent($("#id_coursename").val()),course_category:$("#id_coursecategory").val(),sesskey:M.cfg.sesskey},success:function(t){var a=jQuery.parseJSON(t);hideCourseCreationOptions(a,e)}})}),$("#id_update_course").click(function(){$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"link_course",tii_course_id:$("#tii_course_id").html(),tii_course_name:$("#tii_course_name").html(),course_to_link:$("#id_coursetolink").val(),sesskey:M.cfg.sesskey},success:function(t){var a=jQuery.parseJSON(t);hideCourseCreationOptions(a,e)}})})}function hideCourseCreationOptions(e,t){if(0!=e){$("#course_id").html(e.courseid);var a='input[name="check_'+$("#tii_course_id").html()+'"]';parent.$(a).hide();var s="#tick_"+$("#tii_course_id").html();parent.$(s).show(),$('fieldset[id$="create_course_fieldset"]').parent().slideToggle(),$('fieldset[id$="update_course_fieldset"]').parent().slideToggle(),$("#or_container").hide(),$("#existing_course_title_span").html(e.coursename),$(".existing_course_title_h3").removeClass("hidden_class"),$(".assignmentids_check").length>0&&($(".assignmentids_check").removeAttr("disabled"),$("#id_assignmentname").removeAttr("disabled"),$("#id_create_assignment").removeAttr("disabled")),$(".assignmentids_check").change(function(){$(".assignmentids_check").filter(":checked").length>=5?$(".assignmentids_check").not(":checked").attr("disabled","disabled"):$(".assignmentids_check").removeAttr("disabled")}),initialiseCreateAssignmentButton(t)}}function initialiseCreateAssignmentButton(e){$("#id_create_assignment").unbind("click"),$("#id_create_assignment").click(function(){var t="";$(".assignmentids_check:checked").each(function(e){t+=$(this).val()+","}),","==t.charAt(t.length-1)&&t.substring(0,t.length-1),$("#id_create_assignment").attr("disabled","disabled"),$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"create_assignment",course_id:$("#course_id").html(),assignment_name:$("#id_assignmentname").val(),parts:t,sesskey:M.cfg.sesskey},success:function(t){e.fnReloadAjax(),e.fnStandingRedraw(),$("#id_assignmentname").removeAttr("disabled"),$("#id_create_assignment").removeAttr("disabled"),$(".assignmentids_check").removeAttr("disabled")}})})}$(".submissionsDataTable thead tr, #courseBrowserTable thead tr").toggleClass("header");var dataTablesLang={nointegration:M.str.turnitintooltwo.nointegration,sProcessing:M.str.turnitintooltwo.sprocessing,sZeroRecords:M.str.turnitintooltwo.szerorecords,sInfo:M.str.turnitintooltwo.sinfo,sSearch:M.str.turnitintooltwo.ssearch,sLengthMenu:M.str.turnitintooltwo.slengthmenu,sInfoEmpty:M.str.turnitintooltwo.semptytable,oPaginate:{sNext:M.str.turnitintooltwo.snext,sPrevious:M.str.turnitintooltwo.sprevious}},dataTablesLangMigration={nointegration:M.str.turnitintooltwo.nointegration,sProcessing:M.str.turnitintooltwo.sprocessing,sZeroRecords:M.str.turnitintooltwo.szerorecords,sInfo:M.str.turnitintooltwo.sinfo,sSearch:"",sLengthMenu:M.str.turnitintooltwo.slengthmigrationmenu,sInfoEmpty:M.str.turnitintooltwo.semptytable,oPaginate:{sNext:M.str.turnitintooltwo.snext,sPrevious:M.str.turnitintooltwo.sprevious}};$("#unlinkUserTable").dataTable({bDestroy:!0,bProcessing:!0,bServerSide:!0,oLanguage:dataTablesLang,aaSorting:[[2,"asc"]],aLengthMenu:[[10,25,50,100,-1],[10,25,50,100,"All"]],sAjaxSource:"ajax.php?action=get_users",aoColumns:[{bSortable:!1,fnCreatedCell:function(e,t,a,s,i){$(e).addClass("centered_cell")}},null,{aDataSort:[2,3]},{aDataSort:[3,2]},null],fnDrawCallback:function(){$('input[name="selectallcb"]').attr("checked",!1)}}),"0"==$("#sametiiaccount").data("sametiiaccount")&&($('select[name="enablemigrationtool"]').attr("disabled","disabled"),$('select[name="enablemigrationtool"]').closest("form").find('input[name="submitbutton"]').attr("disabled","disabled")),$('input[name="selectallcb"]').closest("form").find('input[name="submitbutton"]').attr("disabled","disabled"),$(document).on("click",'#migrationTable input[name="selectallcb"], #migrationTable .browser_checkbox',function(){$("#migrationTable .browser_checkbox:checked").length>0?$("#migrationTable .browser_checkbox").closest("form").find('input[name="submitbutton"]').removeAttr("disabled"):$("#migrationTable .browser_checkbox").closest("form").find('input[name="submitbutton"]').attr("disabled","disabled")});var submitbutton=$("#migrationTable").closest("form").find('input[name="submitbutton"]');submitbutton.click(function(e){e.preventDefault();var t=M.str.turnitintooltwo.confirmv1deletetitle+"\n\n";t+=M.util.get_string("confirmv1deletetext","turnitintooltwo",$("#migrationTable .browser_checkbox:checked").length)+"\n\n",t+=M.str.turnitintooltwo.confirmv1deletewarning,confirm(t)&&$("#migrationTable").closest("form").submit()}),$("#migrationTable").dataTable({bDestroy:!0,bProcessing:!0,bServerSide:!0,oLanguage:dataTablesLangMigration,aaSorting:[[2,"asc"]],aLengthMenu:[[10,25,50,100,-1],[10,25,50,100,"All"]],sAjaxSource:"ajax.php?action=get_migration_assignments",sDom:'<"top"lf>rt<"bottom"irp><"clear">',aoColumns:[{bSortable:!1,bSearchable:!1,fnCreatedCell:function(e,t,a,s,i){$(e).addClass("centered_cell")}},{bSortable:!0,sClass:"centered_cell",bSearchable:!1},{bSortable:!0,bSearchable:!0},{bSortable:!0,sClass:"centered_cell",bSearchable:!1}],fnDrawCallback:function(){$('input[name="selectallcb"]').attr("checked",!1)}}),$("#migrationTable_filter input").attr("placeholder","Search"),$("#filesTable").dataTable({bDestroy:!0,bProcessing:!0,bServerSide:!0,oLanguage:dataTablesLang,sAjaxSource:"ajax.php?action=get_files",aoColumns:[null,null,null,{sClass:"filename c0",sWidth:"40%"},null,{sClass:"fullname c1",sWidth:"35%"},null,{sClass:"created c2",sWidth:"22%"},{sClass:"remove c3",sWidth:"3%"}],aoColumnDefs:[{bSearchable:!0,bVisible:!1,aTargets:[0]},{bSearchable:!0,bVisible:!1,aTargets:[1]},{bSearchable:!0,bVisible:!1,aTargets:[2]},{bSearchable:!0,bVisible:!0,aTargets:[3]},{bSearchable:!0,bVisible:!1,aTargets:[4]},{bSearchable:!0,bVisible:!0,aTargets:[5]},{bSearchable:!0,bVisible:!1,aTargets:[6]},{bSearchable:!0,bVisible:!0,aTargets:[7]},{bSearchable:!0,bVisible:!0,aTargets:[8]}],fnDrawCallback:function(e){if(0!=e.aiDisplay.length)for(var t=$("#filesTable tbody tr"),a=t[0].getElementsByTagName("td").length,s="",i=0;iip'}),$.datepicker.regional[""].dateFormat="d M yy",$.datepicker.setDefaults($.datepicker.regional[""]);var courseBrowserTable=$("#courseBrowserTable").dataTable({bProcessing:!0,oLanguage:dataTablesLang,aaSorting:[[6,"asc"]],sAjaxSource:"ajax.php",aoColumnDefs:[{bSearchable:!1,bSortable:!1,sWidth:"5%",bVisible:!0,aTargets:[0],fnCreatedCell:function(e){$(e).addClass("center")}},{bSearchable:!0,bVisible:!0,sWidth:"45%",iDataSort:6,aTargets:[1]},{bSearchable:!0,bVisible:!0,sWidth:"10%",aTargets:[2]},{bSearchable:!0,bVisible:!0,sWidth:"20%",iDataSort:7,aTargets:[3],fnCreatedCell:function(e){$(e).addClass("right")}},{bSearchable:!1,bVisible:!0,sWidth:"10%",aTargets:[4],fnCreatedCell:function(e){$(e).addClass("right")}},{bSearchable:!0,bVisible:!0,sWidth:"10%",aTargets:[5],fnCreatedCell:function(e){$(e).addClass("center")}},{bSearchable:!0,bVisible:!1,aTargets:[6]},{bSearchable:!0,bVisible:!1,aTargets:[7]}],fnServerData:function(e,t,a){$.ajax({dataType:"json",type:"POST",url:e,data:{action:"search_classes",course_title:$("#search_course_title").val(),course_integration:$("#search_course_integration").val(),course_end_date:$("#search_course_end_date").val(),sesskey:M.cfg.sesskey},success:function(e){a(e)}})},bStateSave:!0,fnStateSave:function(e,t){try{localStorage.setItem(uid+"DataTables",JSON.stringify(t))}catch(a){}},fnStateLoad:function(e){try{return JSON.parse(localStorage.getItem(uid+"DataTables"))}catch(t){}},fnDrawCallback:function(){$('input[name="selectallcb"]').attr("checked",!1),initialiseCourseRecreation(),initialiseEditEndDate(),$("#search_courses_button").removeAttr("disabled")}});$("#search_courses_button").click(function(){return $(this).attr("disabled","disabled"),courseBrowserTable.fnReloadAjax(),courseBrowserTable.fnStandingRedraw(),!1}),$("#search_course_end_date").datepicker();var oTable=$("#assignmentBrowserTable").dataTable({bProcessing:!0,oLanguage:dataTablesLang,sAjaxSource:"ajax.php",fnServerData:function(sSource,aoData,fnCallback){$("#id_create_course").attr("disabled","disabled"),$("#id_update_course").attr("disabled","disabled"),$("#assignmentBrowserTable").length>0&&$(".side-pre-only #page-content #region-main").css({"margin-left":"0px"}),$("#id_assignmentname").attr("disabled","disabled"),$("#id_create_assignment").attr("disabled","disabled"),$.ajax({dataType:"json",type:"POST",url:sSource,data:{action:"get_assignments",tii_course_id:$("#tii_course_id").html(),sesskey:M.cfg.sesskey},success:function(result){eval(result),initialiseCourseBrowserButtons(oTable),fnCallback(result),"0"!=$("#course_id").html()&&result.number_of_assignments>0?($("#id_assignmentname").removeAttr("disabled"),$("#id_create_assignment").removeAttr("disabled"),$(".assignmentids_check").removeAttr("disabled"),initialiseCreateAssignmentButton(oTable)):($("#id_assignmentname").attr("disabled","disabled"),$("#id_create_assignment").attr("disabled","disabled"),$(".assignmentids_check").attr("disabled","disabled")),$("#id_create_course").removeAttr("disabled"),$("#id_update_course").removeAttr("disabled")}})},aoColumnDefs:[{bSearchable:!1,bVisible:!0,aTargets:[0]},{bSearchable:!0,bVisible:!0,aTargets:[1],fnCreatedCell:function(e){$(e).addClass("nowrap")}},{bSearchable:!0,bVisible:!0,aTargets:[2]},{bSearchable:!0,bVisible:!0,aTargets:[3]}]});if($("#create_classes_button").colorbox({iframe:!0,width:"60%",top:"200px",height:"124px",opacity:"0.7",className:"course_creation",href:function(){var e=$(".create_course_category").val(),t=$(".create_assignment_checkbox").is(":checked")?"1":"0",a="";$(".browser_checkbox:checked").each(function(e){a+="&class_id"+e+"="+$(this).val(),e++});var s=window.location.href,i=s.replace("cmd=courses","cmd=multiple_class_recreation");return i+"&view_context=box&category="+e+"&assignments="+t+a+"&sesskey="+M.cfg.sesskey},onCleanup:function(){window.location=window.location}}),$("#class_ids").length>0){$(".side-pre-only #page-content #region-main").css({"margin-left":"0px"}),$(".has-region-side-pre #page-content #region-main").css({width:"100%","margin-top":"-30px"});var class_ids=$("#class_ids").html();$.ajax({dataType:"html",type:"POST",url:"ajax.php",data:{action:"create_courses",class_ids:class_ids,course_category:$("#course_category").html(),create_assignments:$("#create_assignments").html(),sesskey:M.cfg.sesskey},success:function(e){$("#course_creation_status").html(e)}})}}); +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cm5pdGludG9vbHR3b19leHRyYS0yMDE4MTAyNjAxLmpzIl0sIm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lvblwiOiBNLnN0ci50dXJuaXRpbnRvb2x0d28ubm9pbnRlZ3JhdGlvbixcbiAgICAgICAgXCJzUHJvY2Vzc2luZ1wiOiBNLnN0ci50dXJuaXRpbnRvb2x0d28uc3Byb2Nlc3NpbmcsXG4gICAgICAgIFwic1plcm9SZWNvcmRzXCI6IE0uc3RyLnR1cm5pdGludG9vbHR3by5zemVyb3JlY29yZHMsXG4gICAgICAgIFwic0luZm9cIjogTS5zdHIudHVybml0aW50b29sdHdvLnNpbmZvLFxuICAgICAgICBcInNTZWFyY2hcIjogTS5zdHIudHVybml0aW50b29sdHdvLnNzZWFyY2gsXG4gICAgICAgIFwic0xlbmd0aE1lbnVcIjogTS5zdHIudHVybml0aW50b29sdHdvLnNsZW5ndGhtZW51LFxuICAgICAgICBcInNJbmZvRW1wdHlcIjogTS5zdHIudHVybml0aW50b29sdHdvLnNlbXB0eXRhYmxlLFxuICAgICAgICBcIm9QYWdpbmF0ZVwiOiB7XG4gICAgICAgICAgICBcInNOZXh0XCI6IE0uc3RyLnR1cm5pdGludG9vbHR3by5zbmV4dCxcbiAgICAgICAgICAgIFwic1ByZXZpb3VzXCI6IE0uc3RyLnR1cm5pdGludG9vbHR3by5zcHJldmlvdXNcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBDb25maWd1cmUgZGF0YXRhYmxlcyBsYW5ndWFnZSBzZXR0aW5ncyBmb3IgbWlncmF0aW9uIHRvb2wuXG4gICAgdmFyIGRhdGFUYWJsZXNMYW5nTWlncmF0aW9uID0ge1xuICAgICAgICBcIm5vaW50ZWdyYXRpb25cIjogTS5zdHIudHVybml0aW50b29sdHdvLm5vaW50ZWdyYXRpb24sXG4gICAgICAgIFwic1Byb2Nlc3NpbmdcIjogTS5zdHIudHVybml0aW50b29sdHdvLnNwcm9jZXNzaW5nLFxuICAgICAgICBcInNaZXJvUmVjb3Jkc1wiOiBNLnN0ci50dXJuaXRpbnRvb2x0d28uc3plcm9yZWNvcmRzLFxuICAgICAg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ICAgICAgICAgICAgIHtcImJTb3J0YWJsZVwiOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImZuQ3JlYXRlZENlbGxcIjogZnVuY3Rpb24gKG5UZCwgc0RhdGEsIG9EYXRhLCBpUm93LCBpQ29sKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoblRkKS5hZGRDbGFzcygnY2VudGVyZWRfY2VsbCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19LFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcImFEYXRhU29ydFwiOiBbIDIsIDMgXX0sXG4gICAgICAgICAgICAgICAgICAgICAgICB7XCJhRGF0YVNvcnRcIjogWyAzLCAyIF19LFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgXCJmbkRyYXdDYWxsYmFja1wiOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAkKCdpbnB1dFtuYW1lPVwic2VsZWN0YWxsY2JcIl0nKS5hdHRyKCdjaGVja2VkJywgZmFsc2UpO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICAvLyBEaXNhYmxlIHRoZSBzdWJtaXQgYnV0dG9uIGlmIFR1cm5pdGluIHYxIGFuZCB2MiBhY2NvdW50IGlkcyBhcmUgZGlmZmVyZW50IGluIE1pZ3JhdGlvbiBUb29sLlxuICAgIGlmICggJCgnI3NhbWV0aWlhY2NvdW50JykuZGF0YSgnc2FtZXRpaWFjY291bnQnKSA9PSBcIjBcIiApIHtcbiAgICAgICAgJCgnc2VsZWN0W25hbWU9XCJlbmFibGVtaWdyYXRpb250b29sXCJdJykuYXR0cignZGlzYWJsZWQnLCAnZGlzYWJsZWQnKTtcbiAgICAgICAgJCgnc2VsZWN0W25hbWU9XCJlbmFibGVtaWdyYXRpb250b29sXCJdJykuY2xvc2VzdCgnZm9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ibGUoe1xuICAgICAgICBcImJEZXN0cm95XCI6IHRydWUsXG4gICAgICAgIFwiYlByb2Nlc3NpbmdcIjogdHJ1ZSxcbiAgICAgICAgXCJiU2VydmVyU2lkZVwiOiB0cnVlLFxuICAgICAgICBcIm9MYW5ndWFnZVwiOiBkYXRhVGFibGVzTGFuZ01pZ3JhdGlvbixcbiAgICAgICAgXCJhYVNvcnRpbmdcIjogW1sgMiwgXCJhc2NcIiBdXSxcbiAgICAgICAgXCJhTGVuZ3RoTWVudVwiOiBbWzEwLCAyNSwgNTAsIDEwMCwgLTFdLCBbMTAsIDI1LCA1MCwgMTAwLCBcIkFsbFwiXV0sXG4gICAgICAgIFwic0FqYXhTb3VyY2VcIjogXCJhamF4LnBocD9hY3Rpb249Z2V0X21pZ3JhdGlvbl9hc3NpZ25tZW50c1wiLFxuICAgICAgICBcInNEb21cIjogJzxcInRvcFwibGY+cnQ8XCJib3R0b21cImlycD48XCJjbGVhclwiPicsXG4gICAgICAgIFwiYW9Db2x1bW5zXCI6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcImJTb3J0YWJsZVwiOiBmYWxzZSwgXCJiU2VhcmNoYWJsZVwiOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImZuQ3JlYXRlZENlbGxcIjogZnVuY3Rpb24gKG5UZCwgc0RhdGEsIG9EYXRhLCBpUm93LCBpQ29sKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoblRkKS5hZGRDbGFzcygnY2VudGVyZWRfY2VsbCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19LFxuICAgICAgICAgICAgICAgICAgICAgICAge1wiYlNvcnRhYmxlXCI6IHRydWUsIFwic0NsYXNzXCI6IFwiY2VudGVyZWRfY2VsbFwiLCBcImJTZWFyY2hhYmxlXCI6IGZhbHNlfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcImJTb3J0YWJsZVwiOiB0cnVlLCBcImJTZWFy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JhVGFyZ2V0c1wiOiBbIDUgXX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogZmFsc2UsIFwiYVRhcmdldHNcIjogWyA2IF19LFxuICAgICAgICAgICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IHRydWUsIFwiYVRhcmdldHNcIjogWyA3IF19LFxuICAgICAgICAgICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IHRydWUsIFwiYVRhcmdldHNcIjogWyA4IF19XG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgXCJmbkRyYXdDYWxsYmFja1wiOiBmdW5jdGlvbiAoIG9TZXR0aW5ncyApIHtcbiAgICAgICAgICAgIGlmICggb1NldHRpbmdzLmFpRGlzcGxheS5sZW5ndGggPT0gMCApXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgblRycyA9ICQoJyNmaWxlc1RhYmxlIHRib2R5IHRyJyk7XG4gICAgICAgICAgICB2YXIgaUNvbHNwYW4gPSBuVHJzWzBdLmdldEVsZW1lbnRzQnlUYWdOYW1lKCd0ZCcpLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciBzTGFzdEdyb3VwID0gXCJcIjtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgblRycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHZhciBpRGlzcGxheUluZGV4ID0gb1NldHRpbmdzLl9pRGlzcGxheVN0YXJ0ICsgaTtcbiAgICAgICAgICAgICAgICB2YXIgc0dyb3VwID0gb1NldHRpbmdzLmFvRGF0YVsgb1NldHRpbmdzLmFpRGlzcGxheVtpXSBdLl9hRGF0YVswXTtcbiAgICAgICAgICAgICAgICBpZiAoIHNHcm91cCAhPSBzTGFzdEdyb3VwIClcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBuR3JvdXAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCAndHInICk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBuQ2VsbCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoICd0ZCcgKTtcbiAgICAgICAgICAgICAgICAgICAgbkNlbGwuY29sU3BhbiA9IGlDb2xzcGFuO1xuICAgICAgICAgICAgICAgICAgICBuQ2VsbC5jbGFzc05hbWUgPSBcImdyb3VwXCI7XG4gICAgICAgICAgICAgICAgICAgIG5DZWxsLmlubmVySFRNTCA9IHNHcm91cDtcbiAgICAgICAgICAgICAgICAgICAgbkdyb3VwLmFwcGVuZENoaWxkKCBuQ2VsbCApO1xuICAgICAgICAgICAgICAgICAgICBuVHJzW2ldLnBhcmVudE5vZGUuaW5zZXJ0QmVmb3JlKCBuR3JvdXAsIG5UcnNbaV0gKTtcbiAgICAgICAgICAgICAgICAgICAgc0xhc3RHcm91cCA9IHNHcm91cDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIFwiYWFTb3J0aW5nRml4ZWRcIjogW1sgMCwgJ2FzYycgXV0sXG4gICAgICAgIFwiYWFTb3J0aW5nXCI6IFtbIDEsICdhc2MnIF1dLFxuICAgICAgICBcInNEb21cIjogJ2xmcjxcImdpdmVIZWlnaHRcInQ+aXAnXG4gICAgfSk7XG5cbiAgICAkLmRhdGVwaWNrZXIucmVnaW9uYWxbXCJcIl0uZGF0ZUZvcm1hdCA9ICdkIE0geXknO1xuICAgICQuZGF0ZXBpY2tlci5zZXREZWZhdWx0cygkLmRhdGVwaWNrZXIucmVnaW9uYWxbJyddKTtcblxuICAgIC8vIENvbmZpZ3VyZSB0aGUgY291cnNlIGJyb3dzZXIgZGF0YSB0YWJsZSBhbmQgc2hvdyBjbGFzc2VzIGZyb20gVHVyb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aWR0aFwiOiBcIjIwJVwiLCBcImlEYXRhU29ydFwiOiA3LCBcImFUYXJnZXRzXCI6IFsgMyBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJmbkNyZWF0ZWRDZWxsXCI6IGZ1bmN0aW9uIChuVGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKG5UZCkuYWRkQ2xhc3MoJ3JpZ2h0Jyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9fSxcbiAgICAgICAgICAgICAgICAgICAge1wiYlNlYXJjaGFibGVcIjogZmFsc2UsIFwiYlZpc2libGVcIjogdHJ1ZSwgXCJzV2lkdGhcIjogXCIxMCVcIiwgXCJhVGFyZ2V0c1wiOiBbIDQgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZm5DcmVhdGVkQ2VsbFwiOiBmdW5jdGlvbiAoblRkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJChuVGQpLmFkZENsYXNzKCdyaWdodCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfX0sXG4gICAgICAgICAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiYlZpc2libGVcIjogdHJ1ZSwgXCJzV2lkdGhcIjogXCIxMCVcIiwgXCJhVGFyZ2V0c1wiOiBbIDUgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZm5DcmVhdGVkQ2VsbFwiOiBmdW5jdGlvbiAoblRkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJChuVGQpLmFkZENsYXNzKCdjZW50ZXInKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH19LFxuICAgICAgICAgICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IGZhbHNlLCBcImFUYXJnZXRzXCI6IFsgNiBdfSxcbiAgICAgICAgICAgICAgICAgICAge1wiYlNlYXJjaGFibGVcIjogdHJ1ZSwgXCJiVmlzaWJsZVwiOiBmYWxzZSwgXCJhVGFyZ2V0c1wiOiBbIDcgXX1cbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICBcImZuU2VydmVyRGF0YVwiOiBmdW5jdGlvbiAoIHNTb3VyY2UsIGFvRGF0YSwgZm5DYWxsYmFjayApIHtcbiAgICAgICAgICAgICQuYWpheCh7XG4gICAgICAgICAgICAgICAgXCJkYXRhVHlwZVwiOiAnanNvbicsXG4gICAgICAgICAgICAgICAgXCJ0eXBlXCI6IFwiUE9TVFwiLFxuICAgICAgICAgICAgICAgIFwidXJsXCI6IHNTb3VyY2UsXG4gICAgICAgICAgICAgICAgXCJkYXRhXCI6IHthY3Rpb246IFwic2VhcmNoX2NsYXNzZXNcIiwgY291cnNlX3RpdGxlOiAkKCcjc2VhcmNoX2NvdXJzZV90aXRsZScpLnZhbCgpLFxuICAgICAgICAgICAgICAgICAgICBjb3Vyc2VfaW50ZWdyYXRpb246ICQoJyNzZWFyY2hfY291cnNlX2ludGVncmF0aW9uJykudmFsKCksXG4gICAgICAgICAgICAgICAgICAgIGNvdXJzZV9lbmRfZGF0ZTogJCgnI3NlYXJjaF9jb3Vyc2VfZW5kX2RhdGUnKS52YWwoKSwgc2Vzc2tleTogTS5jZmcuc2Vzc2tleX0sXG4gICAgICAgICAgICAgICAgXCJzdWNjZXNzXCI6IGZ1bmN0aW9uKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICBmbkNhbGxiYWNrKHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIFwiYlN0YXRlU2F2ZVwiOiB0cnVlLFxuICAgICAgICBcImZuU3RhdGVTYXZlXCI6IGZ1bmN0aW9uIChvU2V0dGluZ3MsIG9EYXRhKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGxvY2FsU3RvcmFnZS5zZXRJdGVtKCB1aWQgKyAnRGF0YVRhYmxlcycsIEpTT04uc3RyaW5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uYWpheCh7XG4gICAgICAgICAgICAgICAgXCJkYXRhVHlwZVwiOiAnanNvbicsXG4gICAgICAgICAgICAgICAgXCJ0eXBlXCI6IFwiUE9TVFwiLFxuICAgICAgICAgICAgICAgIFwidXJsXCI6IHNTb3VyY2UsXG4gICAgICAgICAgICAgICAgXCJkYXRhXCI6IHthY3Rpb246IFwiZ2V0X2Fzc2lnbm1lbnRzXCIsIHRpaV9jb3Vyc2VfaWQ6ICQoXCIjdGlpX2NvdXJzZV9pZFwiKS5odG1sKCksIHNlc3NrZXk6IE0uY2ZnLnNlc3NrZXl9LFxuICAgICAgICAgICAgICAgIFwic3VjY2Vzc1wiOiBmdW5jdGlvbihyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgZXZhbChyZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICBpbml0aWFsaXNlQ291cnNlQnJvd3NlckJ1dHRvbnMob1RhYmxlKTtcbiAgICAgICAgICAgICAgICAgICAgZm5DYWxsYmFjayhyZXN1bHQpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICgkKFwiI2NvdXJzZV9pZFwiKS5odG1sKCkgIT0gXCIwXCIgJiYgcmVzdWx0Lm51bWJlcl9vZl9hc3NpZ25tZW50cyA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQoXCIjaWRfYXNzaWdubWVudG5hbWVcIikucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQoXCIjaWRfY3JlYXRlX2Fzc2lnbm1lbnRcIikucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQoXCIuYXNzaWdubWVudGlkc19jaGVja1wiKS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbGlzZUNyZWF0ZUFzc2lnbm1lbnRCdXR0b24ob1RhYmxlKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQoXCIjaWRfYXNzaWdubWVudG5hbWVcIikuYXR0cignZGlzYWJsZWQnLCAnZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQoXCIjaWRfY3JlYXRlX2Fzc2lnbm1lbnRcIikuYXR0cignZGlzYWJsZWQnLCAnZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQoXCIuYXNzaWdubWVudGlkc19jaGVja1wiKS5hdHRyKCdkaXNhYmxlZCcsICdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gRW5hYmxlIGNvdXJzZSBidXR0b25zLlxuICAgICAgICAgICAgICAgICAgICAkKCcjaWRfY3JlYXRlX2NvdXJzZScpLnJlbW92ZUF0dHIoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICQoJyNpZF91cGRhdGVfY291cnNlJykucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgXCJhb0NvbHVtbkRlZnNcIjogW1xuICAgICAgICAgICAge1wiYlNlYXJjaGFibGVcIjogZmFsc2UsIFwiYlZpc2libGVcIjogdHJ1ZSwgXCJhVGFyZ2V0c1wiOiBbIDAgXX0sXG4gICAgICAgICAgICB7XCJiU2VhcmNoYWJsZVwiOiB0cnVlLCBcImJWaXNpYmxlXCI6IHRydWUsIFwiYVRhcmdldHNcIjogWyAxIF0sXG4gICAgICAgICAgICAgICAgXCJmbkNyZWF0ZWRDZWxsXCI6IGZ1bmN0aW9uIChuVGQpIHtcbiAgICAgICAgICAgICAgICAgICAgJChuVGQpLmFkZENsYXNzKCdub3dyYXAnKTtcbiAgICAgICAgICAgICAgICB9fSxcbiAgICAgICAgICAgIHtcImJTZWFyY2hhYmxlXCI6IHRydWUsIFwiY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aWQpLmh0bWwoKSk7XG4gICAgICAgICAgICAgICAgJCgnI2Nib3hMb2FkZWRDb250ZW50IC5lZGl0X2NvdXJzZV9lbmRfZGF0ZV9mb3JtJykuc2hvdygpO1xuICAgICAgICAgICAgICAgICQoJyNkYXRlc2VsZWN0b3ItY2FsZW5kYXItcGFuZWwnKS5jc3MoJ3otaW5kZXgnLCAnOTk5OScpO1xuXG4gICAgICAgICAgICAgICAgJCgnI2lkX3NhdmVfZW5kX2RhdGUnKS5jbGljayhmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgJC5hamF4KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiZGF0YVR5cGVcIjogJ2pzb24nLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJ0eXBlXCI6IFwiUE9TVFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJ1cmxcIjogXCJhamF4LnBocFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJkYXRhXCI6IHthY3Rpb246IFwiZWRpdF9jb3Vyc2VfZW5kX2RhdGVcIiwgdGlpX2NvdXJzZV9pZDogdGlpX2NvdXJzZV9pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aWlfY291cnNlX3RpdGxlOiAkKCdhI2NvdXJzZV8nICsgdGlpX2NvdXJzZV9pZCkuaHRtbCgpLCBzZXNza2V5OiBNLmNmZy5zZXNza2V5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZF9kYXRlX2Q6ICQoJyNpZF9uZXdfY291cnNlX2VuZF9kYXRlX2RheScpLnZhbCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZF9kYXRlX206ICQoJyNpZF9uZXdfY291cnNlX2VuZF9kYXRlX21vbnRoJykudmFsKCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kX2RhdGVfeTogJCgnI2lkX25ld19jb3Vyc2VfZW5kX2RhdGVfeWVhcicpLnZhbCgpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEuc3RhdHVzID09IFwic3VjY2Vzc1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudC4kLmZuLmNvbG9yYm94LmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJyNjb3Vyc2VfZGF0ZV8nICsgdGlpX2NvdXJzZV9pZCArICcgc3BhbicpLmh0bWwoZGF0YS5lbmRfZGF0ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN1cnJlbnRfbXNnID0gJCgnI2VkaXRfZW5kX2RhdGVfZGVzYycpLmh0bWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJyNlZGl0X2VuZF9kYXRlX2Rlc2MnKS5odG1sKGN1cnJlbnRfbXNnICsgXCIgXCIgKyBkYXRhLm1zZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvbkNsZWFudXA6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICQoJy5lZGl0X2NvdXJzZV9lbmRfZGF0ZV9mb3JtJykuaGlkZSgpO1xuICAgICAgICAgICAgICAgICQoJyN0aWlfY2xvc2VfYmFyJykucmVtb3ZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGxpZ2h0Qm94Q2xvc2VCdXR0b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gICAgJCgnI2lkX2NyZWF0ZV9jb3Vyc2UnKS5jbGljayhmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICQuYWpheCh7XG4gICAgICAgICAgICAgICAgXCJkYXRhVHlwZVwiOiAnaHRtbCcsXG4gICAgICAgICAgICAgICAgXCJ0eXBlXCI6IFwiUE9TVFwiLFxuICAgICAgICAgICAgICAgIFwidXJsXCI6IFwiYWpheC5waHBcIixcbiAgICAgICAgICAgICAgICBcImRhdGFcIjoge2FjdGlvbjogXCJjcmVhdGVfY291cnNlXCIsIHRpaV9jb3Vyc2VfaWQ6ICQoXCIjdGlpX2NvdXJzZV9pZFwiKS5odG1sKCksXG4gICAgICAgICAgICAgICAgICAgIHRpaV9jb3Vyc2VfbmFtZTogZW5jb2RlVVJJQ29tcG9uZW50KCQoXCIjdGlpX2NvdXJzZV9uYW1lXCIpLmh0bWwoKSksXG4gICAgICAgICAgICAgICAgICAgIGNvdXJzZV9uYW1lOiBlbmNvZGVVUklDb21wb25lbnQoJChcIiNpZF9jb3Vyc2VuYW1lXCIpLnZhbCgpKSxcbiAgICAgICAgICAgICAgICAgICAgY291cnNlX2NhdGVnb3J5OiAkKFwiI2lkX2NvdXJzZWNhdGVnb3J5XCIpLnZhbCgpLCBzZXNza2V5OiBNLmNmZy5zZXNza2V5fSxcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvYmogPSBqUXVlcnkucGFyc2VKU09OKGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICBoaWRlQ291cnNlQ3JlYXRpb25PcHRpb25zKG9iaiwgb1RhYmxlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgJCgnI2lkX3VwZGF0ZV9jb3Vyc2UnKS5jbGljayhmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICQuYWpheCh7XG4gICAgICAgICAgICAgICAgXCJkYXRhVHlwZVwiOiAnaHRtbCcsXG4gICAgICAgICAgICAgICAgXCJ0eXBlXCI6IFwiUE9TVFwiLFxuICAgICAgICAgICAgICAgIFwidXJsXCI6IFwiYWpheC5waHBcIixcbiAgICAgICAgICAgICAgICBcImRhdGFcIjoge2FjdGlvbjogXCJsaW5rX2NvdXJzZVwiLCB0aWlfY291cnNlX2lkOiAkKFwiI3RpaV9jb3Vyc2VfaWRcIikuaHRtbCgpLFxuICAgICAgICAgICAgICAgICAgICB0aWlfY291cnNlX25hbWU6ICQoXCIjdGlpX2NvdXJzZV9uYW1lXCIpLmh0bWwoKSwgY291cnNlX3RvX2xpbms6ICQoXCIjaWRfY291cnNldG9saW5rXCIpLnZhbCgpLFxuICAgICAgICAgICAgICAgICAgICBzZXNza2V5OiBNLmNmZy5zZXNza2V5fSxcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvYmogPSBqUXVlcnkucGFyc2VKU09OKGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICBoaWRlQ291cnNlQ3JlYXRpb25PcHRpb25zKG9iaiwgb1RhYmxlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLy8gSGlkZSB0aGUgY291cnNlIGNyZWF0aW9uL2xpbmtpbmcgZm9ybSBvbmNlIHRoZSBzZWxlY3RlZCBUdXJuaXRpblxuICAgIC8vIGNvdXJzZSBoYXMgYmVlbiBjcmVhdGVkL2xpbmtlZCBsb2NhbGx5IGFuZCBpbml0aWFsaXNlIHRoZSBjcmVhdGUgYXNzaWdubWVudCBidXR0b24uXG4gICAgZnVuY3Rpb24gaGlkZUNvdXJzZUNyZWF0aW9uT3B0aW9ucyhvYmosIG9UYWJsZSkge1xuICAgICAgICBpZiAob2JqICE9IDApIHtcbiAgICAgICAgICAgICQoXCIjY291cnNlX2lkX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goZnVuY3Rpb24oaSl7XG4gICAgICAgICAgICAgICAgcGFydHMgKz0gJCh0aGlzKS52YWwoKSArIFwiLFwiO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAocGFydHMuY2hhckF0KHBhcnRzLmxlbmd0aCAtIDEpID09ICcsJykge1xuICAgICAgICAgICAgICAgIHBhcnRzLnN1YnN0cmluZygwLCBwYXJ0cy5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJChcIiNpZF9jcmVhdGVfYXNzaWdubWVudFwiKS5hdHRyKCdkaXNhYmxlZCcsICdkaXNhYmxlZCcpO1xuXG4gICAgICAgICAgICAkLmFqYXgoe1xuICAgICAgICAgICAgICAgIFwiZGF0YVR5cGVcIjogJ2h0bWwnLFxuICAgICAgICAgICAgICAgIFwidHlwZVwiOiBcIlBPU1RcIixcbiAgICAgICAgICAgICAgICBcInVybFwiOiBcImFqYXgucGhwXCIsXG4gICAgICAgICAgICAgICAgXCJkYXRhXCI6IHthY3Rpb246IFwiY3JlYXRlX2Fzc2lnbm1lbnRcIiwgY291cnNlX2lkOiAkKFwiI2NvdXJzZV9pZFwiKS5odG1sKCksXG4gICAgICAgICAgICAgICAgICAgIGFzc2lnbm1lbnRfbmFtZTogJChcIiNpZF9hc3NpZ25tZW50bmFtZVwiKS52YWwoKSwgcGFydHM6IHBhcnRzLCBzZXNza2V5OiBNLmNmZy5zZXNza2V5fSxcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIG9UYWJsZS5mblJlbG9hZEFqYXgoKTtcbiAgICAgICAgICAgICAgICAgICAgb1RhYmxlLmZuU3RhbmRpbmdSZWRyYXcoKTtcbiAgICAgICAgICAgICAgICAgICAgJChcIiNpZF9hc3NpZ25tZW50bmFtZVwiKS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAkKFwiI2lkX2NyZWF0ZV9hc3NpZ25tZW50XCIpLnJlbW92ZUF0dHIoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICQoXCIuYXNzaWdubWVudGlkc19jaGVja1wiKS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG59KTsiXX0= diff --git a/jquery/turnitintooltwo_migration_tool-2018082301.min.js b/jquery/turnitintooltwo_migration_tool-2018082301.min.js deleted file mode 100644 index 3ff97fa0..00000000 --- a/jquery/turnitintooltwo_migration_tool-2018082301.min.js +++ /dev/null @@ -1,2 +0,0 @@ -function dontmigrate(t){$("#migration_alert").hide(),t.close()}function lightBoxCloseButton(t){$("body").append('")}function displayMigrationModal(){$("#migrate_type").data("turnitintoolid")!=$("#migrate_type").data("lastasked")&&($.colorbox({width:550,height:600,inline:!0,opacity:"0.7",href:"#migration_alert",onLoad:function(){$("#asktomigrate").show(),lightBoxCloseButton(),$(".tii_close_link").click($.proxy(dontmigrate,null,$.colorbox))},onCleanup:function(){$("#tii_close_bar").remove(),$("#migration_alert").hide()}}),$("#migration_alert").show()),2==$("#migrate_type").data("migratetype")&&($("#asktomigrate").hide(),$("#migrating").show(),migrate($("#migrate_type").data("courseid"),$("#migrate_type").data("turnitintoolid")))}function migrate(t,o){$.ajax({dataType:"json",type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",data:{action:"begin_migration",courseid:t,turnitintoolid:o,sesskey:M.cfg.sesskey},success:function(t){$.colorbox&&$.colorbox.close(),$("#migration_alert").hide(),window.location.href=M.cfg.wwwroot+"/mod/turnitintooltwo/view.php?id="+t.id},error:function(t){var o=t.responseJSON;$.colorbox&&$.colorbox.close(),$("#migration_alert").hide(),$("#turnitintool_style").prepend('
'+o.error+" "+o.message+"
"),o.hasOwnProperty("trace")&&(console.error(o.message),console.error(JSON.stringify(o.trace,null,4)))}})}$(document).ready(function(){$.ajax({dataType:"json",type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",data:{action:"check_migrated",turnitintoolid:$("#migrate_type").data("turnitintoolid"),sesskey:M.cfg.sesskey},success:function(t){t.migrated===!0?window.location.href=M.cfg.wwwroot+"/mod/turnitintooltwo/view.php?id="+t.v2id:(displayMigrationModal(),$(".dontmigrate_link").click($.proxy(dontmigrate,null,$.colorbox)))}})}),$(".migrate_link").on("click",function(){$("#asktomigrate").hide(),$("#migrating").show(),migrate($(this).data("courseid"),$(this).data("turnitintoolid"))}); -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cm5pdGludG9vbHR3b19taWdyYXRpb25fdG9vbC5qcyJdLCJuYW1lcyI6WyJkb250bWlncmF0ZSIsImNiIiwiJCIsImhpZGUiLCJjbG9zZSIsImxpZ2h0Qm94Q2xvc2VCdXR0b24iLCJhcHBlbmQiLCJNIiwic3RyIiwidHVybml0aW50b29sdHdvIiwiY2xvc2VidXR0b24iLCJkaXNwbGF5TWlncmF0aW9uTW9kYWwiLCJkYXRhIiwiY29sb3Jib3giLCJ3aWR0aCIsImhlaWdodCIsImlubGluZSIsIm9wYWNpdHkiLCJocmVmIiwib25Mb2FkIiwic2hvdyIsImNsaWNrIiwicHJveHkiLCJvbkNsZWFudXAiLCJyZW1vdmUiLCJtaWdyYXRlIiwiY291cnNlaWQiLCJ0dXJuaXRpbnRvb2xpZCIsImFqYXgiLCJkYXRhVHlwZSIsInR5cGUiLCJ1cmwiLCJjZmciLCJ3d3dyb290IiwiYWN0aW9uIiwic2Vzc2tleSIsInN1Y2Nlc3MiLCJ3aW5kb3ciLCJsb2NhdGlvbiIsImlkIiwiZXJyb3IiLCJyZXNwb25zZUpTT04iLCJwcmVwZW5kIiwibWVzc2FnZSIsImhhc093blByb3BlcnR5IiwiY29uc29sZSIsIkpTT04iLCJzdHJpbmdpZnkiLCJ0cmFjZSIsIm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TUwLCBoZWlnaHQ6IDYwMCwgaW5saW5lOnRydWUsIG9wYWNpdHk6IFwiMC43XCIsIGhyZWY6XCIjbWlncmF0aW9uX2FsZXJ0XCIsXG4gICAgICAgICAgICBvbkxvYWQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICQoJyNhc2t0b21pZ3JhdGUnKS5zaG93KCk7XG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDbG9zZUJ1dHRvbigpO1xuXG4gICAgICAgICAgICAgICAgJCgnLnRpaV9jbG9zZV9saW5rJykuY2xpY2soJC5wcm94eShkb250bWlncmF0ZSwgbnVsbCwgJC5jb2xvcmJveCkpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9uQ2xlYW51cDpmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAkKCcjdGlpX2Nsb3NlX2JhcicpLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgICQoJyNtaWdyYXRpb25fYWxlcnQnKS5oaWRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgICQoJyNtaWdyYXRpb25fYWxlcnQnKS5zaG93KCk7XG4gICAgfVxuXG4gICAgaWYgKCQoJyNtaWdyYXRlX3R5cGUnKS5kYXRhKFwibWlncmF0ZXR5cGVcIikgPT0gMikge1xuICAgICAgICAkKCcjYXNrdG9taWdyYXRlJykuaGlkZSgpO1xuICAgICAgICAkKCcjbWlncmF0aW5nJykuc2hvdygpO1xuXG4gICAgICAgIG1pZ3JhdGUoJChcIiNtaWdyYXRlX3R5cGVcIikuZGF0YShcImNvdXJzZWlkXCIpLCAkKFwiI21pZ3JhdGVfdHlwZVwiKS5kYXRhKFwidHVybml0aW50b29saWRcIikpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gbWlncmF0ZShjb3Vyc2VpZCwgdHVybml0aW50b29saWQpIHtcbiAgICAkLmFqYXgoe1xuICAgICAgICBcImRhdGFUeXBlXCI6ICdqc29uJyxcbiAgICAgICAgXCJ0eXBlXCI6IFwiUE9TVFwiLFxuICAgICAgICB1cmw6IE0uY2ZnLnd3d3Jvb3QgKyBcIi9tb2QvdHVybml0aW50b29sdHdvL2FqYXgucGhwXCIsXG4gICAgICAgIFwiZGF0YVwiOiB7YWN0aW9uOiBcImJlZ2luX21pZ3JhdGlvblwiLCBjb3Vyc2VpZDogY291cnNlaWQsIHR1cm5pdGludG9vbGlkOiB0dXJuaXRpbnRvb2xpZCwgc2Vzc2tleTogTS5jZmcuc2Vzc2tleX0sXG4gICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgICAgIGlmICgkLmNvbG9yYm94KSB7XG4gICAgICAgICAgICAgICAgJC5jb2xvcmJveC5jbG9zZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgJCgnI21pZ3JhdGlvbl9hbGVydCcpLmhpZGUoKTtcblxuICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLmhyZWYgPSBNLmNmZy53d3dyb290ICsgXCIvbW9kL3R1cm5pdGludG9vbHR3by92aWV3LnBocD9pZD1cIitkYXRhLmlkO1xuICAgICAgICB9LFxuICAgICAgICBlcnJvcjogZnVuY3Rpb24oZXJyb3IpIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gZXJyb3IucmVzcG9uc2VKU09OO1xuICAgICAgICAgICAgaWYgKCQuY29sb3Jib3gpIHtcbiAgICAgICAgICAgICAgICAkLmNvbG9yYm94LmNsb3NlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAkKCcjbWlncmF0aW9uX2FsZXJ0JykuaGlkZSgpO1xuICAgICAgICAgICAgJCgnI3R1cm5pdGludG9vbF9zdHlsZScpXG4gICAgICAgICAgICAgICAgLnByZXBlbmQoJzxkaXYgaWQ9XCJmdWxsLWVycm9yXCIgY2xhc3M9XCJib3ggZ2VuZXJhbGJveCBub3RpY2Vib3hcIj4nICsgZGF0YS5lcnJvciArICcgJyArIGRhdGEubWVzc2FnZSArICc8L2Rpdj4nKTtcblxuICAgICAgICAgICAgLy8gQ2hlY2sgaWYgd2UgaGF2ZSBhIHN0YWNrIHRyYWNlIGluY2x1ZGVkLlxuICAgICAgICAgICAgaWYgKGRhdGEuaGFzT3duUHJvcGVydHkoJ3RyYWNlJykpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGRhdGEubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihKU09OLnN0cmluZ2lmeShkYXRhLnRyYWNlLCBudWxsLCA0KSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbn1cbiJdfQ== diff --git a/jquery/turnitintooltwo_migration_tool-2018082301.js b/jquery/turnitintooltwo_migration_tool-2018102601.js similarity index 100% rename from jquery/turnitintooltwo_migration_tool-2018082301.js rename to jquery/turnitintooltwo_migration_tool-2018102601.js diff --git a/jquery/turnitintooltwo_migration_tool-2018102601.min.js b/jquery/turnitintooltwo_migration_tool-2018102601.min.js new file mode 100644 index 00000000..86e3e49e --- /dev/null +++ b/jquery/turnitintooltwo_migration_tool-2018102601.min.js @@ -0,0 +1,2 @@ +function dontmigrate(t){$("#migration_alert").hide(),t.close()}function lightBoxCloseButton(t){$("body").append('")}function displayMigrationModal(){$("#migrate_type").data("turnitintoolid")!=$("#migrate_type").data("lastasked")&&($.colorbox({width:550,height:600,inline:!0,opacity:"0.7",href:"#migration_alert",onLoad:function(){$("#asktomigrate").show(),lightBoxCloseButton(),$(".tii_close_link").click($.proxy(dontmigrate,null,$.colorbox))},onCleanup:function(){$("#tii_close_bar").remove(),$("#migration_alert").hide()}}),$("#migration_alert").show()),2==$("#migrate_type").data("migratetype")&&($("#asktomigrate").hide(),$("#migrating").show(),migrate($("#migrate_type").data("courseid"),$("#migrate_type").data("turnitintoolid")))}function migrate(t,o){$.ajax({dataType:"json",type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",data:{action:"begin_migration",courseid:t,turnitintoolid:o,sesskey:M.cfg.sesskey},success:function(t){$.colorbox&&$.colorbox.close(),$("#migration_alert").hide(),window.location.href=M.cfg.wwwroot+"/mod/turnitintooltwo/view.php?id="+t.id},error:function(t){var o=t.responseJSON;$.colorbox&&$.colorbox.close(),$("#migration_alert").hide(),$("#turnitintool_style").prepend('
'+o.error+" "+o.message+"
"),o.hasOwnProperty("trace")&&(console.error(o.message),console.error(JSON.stringify(o.trace,null,4)))}})}$(document).ready(function(){$.ajax({dataType:"json",type:"POST",url:M.cfg.wwwroot+"/mod/turnitintooltwo/ajax.php",data:{action:"check_migrated",turnitintoolid:$("#migrate_type").data("turnitintoolid"),sesskey:M.cfg.sesskey},success:function(t){t.migrated===!0?window.location.href=M.cfg.wwwroot+"/mod/turnitintooltwo/view.php?id="+t.v2id:(displayMigrationModal(),$(".dontmigrate_link").click($.proxy(dontmigrate,null,$.colorbox)))}})}),$(".migrate_link").on("click",function(){$("#asktomigrate").hide(),$("#migrating").show(),migrate($(this).data("courseid"),$(this).data("turnitintoolid"))}); +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cm5pdGludG9vbHR3b19taWdyYXRpb25fdG9vbC0yMDE4MTAyNjAxLmpzIl0sIm5hbWVzIjpbImRvbnRtaWdyYXRlIiwiY2IiLCIkIiwiaGlkZSIsImNsb3NlIiwibGlnaHRCb3hDbG9zZUJ1dHRvbiIsImFwcGVuZCIsIk0iLCJzdHIiLCJ0dXJuaXRpbnRvb2x0d28iLCJjbG9zZWJ1dHRvbiIsImRpc3BsYXlNaWdyYXRpb25Nb2RhbCIsImRhdGEiLCJjb2xvcmJveCIsIndpZHRoIiwiaGVpZ2h0IiwiaW5saW5lIiwib3BhY2l0eSIsImhyZWYiLCJvbkxvYWQiLCJzaG93IiwiY2xpY2siLCJwcm94eSIsIm9uQ2xlYW51cCIsInJlbW92ZSIsIm1pZ3JhdGUiLCJjb3Vyc2VpZCIsInR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gICAgICAgJCgnI21pZ3JhdGluZycpLnNob3coKTtcblxuICAgICAgICBtaWdyYXRlKCQoXCIjbWlncmF0ZV90eXBlXCIpLmRhdGEoXCJjb3Vyc2VpZFwiKSwgJChcIiNtaWdyYXRlX3R5cGVcIikuZGF0YShcInR1cm5pdGludG9vbGlkXCIpKTtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIG1pZ3JhdGUoY291cnNlaWQsIHR1cm5pdGludG9vbGlkKSB7XG4gICAgJC5hamF4KHtcbiAgICAgICAgXCJkYXRhVHlwZVwiOiAnanNvbicsXG4gICAgICAgIFwidHlwZVwiOiBcIlBPU1RcIixcbiAgICAgICAgdXJsOiBNLmNmZy53d3dyb290ICsgXCIvbW9kL3R1cm5pdGludG9vbHR3by9hamF4LnBocFwiLFxuICAgICAgICBcImRhdGFcIjoge2FjdGlvbjogXCJiZWdpbl9taWdyYXRpb25cIiwgY291cnNlaWQ6IGNvdXJzZWlkLCB0dXJuaXRpbnRvb2xpZDogdHVybml0aW50b29saWQsIHNlc3NrZXk6IE0uY2ZnLnNlc3NrZXl9LFxuICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgICAgICBpZiAoJC5jb2xvcmJveCkge1xuICAgICAgICAgICAgICAgICQuY29sb3Jib3guY2xvc2UoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICQoJyNtaWdyYXRpb25fYWxlcnQnKS5oaWRlKCk7XG5cbiAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5ocmVmID0gTS5jZmcud3d3cm9vdCArIFwiL21vZC90dXJuaXRpbnRvb2x0d28vdmlldy5waHA/aWQ9XCIrZGF0YS5pZDtcbiAgICAgICAgfSxcbiAgICAgICAgZXJyb3I6IGZ1bmN0aW9uKGVycm9yKSB7XG4gICAgICAgICAgICB2YXIgZGF0YSA9IGVycm9yLnJlc3BvbnNlSlNPTjtcbiAgICAgICAgICAgIGlmICgkLmNvbG9yYm94KSB7XG4gICAgICAgICAgICAgICAgJC5jb2xvcmJveC5jbG9zZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgJCgnI21pZ3JhdGlvbl9hbGVydCcpLmhpZGUoKTtcbiAgICAgICAgICAgICQoJyN0dXJuaXRpbnRvb2xfc3R5bGUnKVxuICAgICAgICAgICAgICAgIC5wcmVwZW5kKCc8ZGl2IGlkPVwiZnVsbC1lcnJvclwiIGNsYXNzPVwiYm94IGdlbmVyYWxib3ggbm90aWNlYm94XCI+JyArIGRhdGEuZXJyb3IgKyAnICcgKyBkYXRhLm1lc3NhZ2UgKyAnPC9kaXY+Jyk7XG5cbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHdlIGhhdmUgYSBzdGFjayB0cmFjZSBpbmNsdWRlZC5cbiAgICAgICAgICAgIGlmIChkYXRhLmhhc093blByb3BlcnR5KCd0cmFjZScpKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihkYXRhLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoSlNPTi5zdHJpbmdpZnkoZGF0YS50cmFjZSwgbnVsbCwgNCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG59XG4iXX0= diff --git a/jquery/turnitintooltwo_settings-2018082301.min.js b/jquery/turnitintooltwo_settings-2018082301.min.js deleted file mode 100755 index 247f832e..00000000 --- a/jquery/turnitintooltwo_settings-2018082301.min.js +++ /dev/null @@ -1,2 +0,0 @@ -jQuery(document).ready(function($){if($(".settingsform fieldset div.formsettingheading").length>0){var tabmenu=$(".settingsform fieldset div.formsettingheading:first").html();tabmenu.indexOf("tabtree")>=0&&($(".settingsform fieldset div.formsettingheading:first").remove(),$(".settingsform h2:first").after(tabmenu))}$('input[name="selectallcb"]').click(function(){$(this).prop("checked")?($(".browser_checkbox").prop("checked",!0),$(".browser_checkbox:checked").length>0?$(".create_checkboxes").slideDown():$(".create_checkboxes").slideUp()):($(".browser_checkbox").prop("checked",!1),$(".create_checkboxes").slideUp())}),$(".test_connection").length>0&&(""==$("#id_s_turnitintooltwo_accountid").val()&&""==$("#id_s_turnitintooltwo_secretkey").val()||($(".test_connection").show(),$("#test_link").show()),$("#id_s_turnitintooltwo_accountid, #id_s_turnitintooltwo_secretkey, #id_s_turnitintooltwo_apiurl").keyup(function(){$("#testing_container").hide();var t=$("#id_s_turnitintooltwo_accountid").val(),e=$("#id_s_turnitintooltwo_secretkey").val();t=t.trim(),e=e.trim(),0==t.length||0==e.length?($("#test_result").hide(),$(".test_connection").hide()):($(".test_connection").show(),$("#test_link").show())}),$("#test_link").click(function(){$("#test_result").hide(),$("input, #id_s_turnitintooltwo_apiurl").prop("disabled",!0),$("#test_link").hide(),$("#test_result").css("opacity",""),$("#test_result").removeClass("test_link_success test_link_fail"),$("#testing_container").show();var url="ajax.php";$(".settingsform fieldset div.formsettingheading").length>0&&(url="../mod/turnitintooltwo/ajax.php");var accountid=$("#id_s_turnitintooltwo_accountid").val(),accountshared=$("#id_s_turnitintooltwo_secretkey").val(),accounturl=$("#id_s_turnitintooltwo_apiurl").val();$.ajax({type:"POST",url:url,dataType:"json",data:{action:"test_connection",sesskey:M.cfg.sesskey,accountid:accountid,accountshared:accountshared,url:accounturl},success:function(data){eval(data),$("#testing_container").hide(),"success"==data.connection_status?$("#test_result").addClass("test_link_success"):$("#test_result").addClass("test_link_fail"),$("#test_result").html(data.msg),$("#test_result").show(),$("#test_link").show(),$("input, #id_s_turnitintooltwo_apiurl").prop("disabled",!1)}})}))}); -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cm5pdGludG9vbHR3b19zZXR0aW5ncy5qcyJdLCJuYW1lcyI6WyJqUXVlcnkiLCJkb2N1bWVudCIsInJlYWR5IiwiJCIsImxlbmd0aCIsInRhYm1lbnUiLCJodG1sIiwiaW5kZXhPZiIsInJlbW92ZSIsImFmdGVyIiwiY2xpY2siLCJ0aGl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CJdJykuY2xpY2soZnVuY3Rpb24oKSB7XG4gICAgICAgIGlmICgkKHRoaXMpLnByb3AoJ2NoZWNrZWQnKSkge1xuICAgICAgICAgICAgJCgnLmJyb3dzZXJfY2hlY2tib3gnKS5wcm9wKCdjaGVja2VkJywgdHJ1ZSk7XG4gICAgICAgICAgICBpZiAoJCgnLmJyb3dzZXJfY2hlY2tib3g6Y2hlY2tlZCcpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAkKCcuY3JlYXRlX2NoZWNrYm94ZXMnKS5zbGlkZURvd24oKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgJCgnLmNyZWF0ZV9jaGVja2JveGVzJykuc2xpZGVVcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgJCgnLmJyb3dzZXJfY2hlY2tib3gnKS5wcm9wKCdjaGVja2VkJywgZmFsc2UpO1xuICAgICAgICAgICAgJCgnLmNyZWF0ZV9jaGVja2JveGVzJykuc2xpZGVVcCgpO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICBpZiAoJCgnLnRlc3RfY29ubmVjdGlvbicpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgaWYgKCQoJyNpZF9zX3R1cm5pdGludG9vbHR3b19hY2NvdW50aWQnKS52YWwoKSAhPSAnJyB8fCAkKCcjaWRfc190dXJuaXRpbnRvb2x0d29fc2VjcmV0a2V5JykudmFsKCkgIT0gJycpIHtcbiAgICAgICAgICAgICQoJy50ZXN0X2Nvbm5lY3Rpb24nKS5zaG93KCk7XG4gICAgICAgICAgICAkKCcjdGVzdF9saW5rJykuc2hvdygpO1xuICAgICAgICB9XG5cbiAgICAgICAgJCgnI2lkX3NfdHVybml0aW50b29sdHdvX2FjY291bnRpZCwgI2lkX3NfdHVybml0aW50b29sdHdvX3NlY3JldGtleSwgI2lkX3NfdHVybml0aW50b29sdHdvX2FwaXVybCcpLmtleXVwKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgJCgnI3Rlc3RpbmdfY29udGFpbmVyJykuaGlkZSgpO1xuXG4gICAgICAgICAgICB2YXIgYWNjb3VudGlkID0gJCgnI2lkX3NfdHVybml0aW50b29sdHdvX2FjY291bnRpZCcpLnZhbCgpO1xuICAgICAgICAgICAgdmFyIGFjY291bnRzaGFyZWQgPSAkKCcjaWRfc190dXJuaXRpbnRvb2x0d29fc2VjcmV0a2V5JykudmFsKCk7XG5cbiAgICAgICAgICAgIC8vIE1ha2Ugc3VyZSB0aGV5IGFyZW4ndCBlbXB0eSBzdHJpbmdzLlxuICAgICAgICAgICAgYWNjb3VudGlkID0gYWNjb3VudGlkLnRyaW0oKTtcbiAgICAgICAgICAgIGFjY291bnRzaGFyZWQgPSBhY2NvdW50c2hhcmVkLnRyaW0oKTtcbiAgICAgICAgICAgIGlmIChhY2NvdW50aWQubGVuZ3RoID09IDAgfHwgYWNjb3VudHNoYXJlZC5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICAgICQoJyN0ZXN0X3Jlc3VsdCcpLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAkKCcudGVzdF9jb25uZWN0aW9uJykuaGlkZSgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAkKCcudGVzdF9jb25uZWN0aW9uJykuc2hvdygpO1xuICAgICAgICAgICAgICAgICQoJyN0ZXN0X2xpbmsnKS5zaG93KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgICQoJyN0ZXN0X2xpbmsnKS5jbGljayhmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICQoJyN0ZXN0X3Jlc3VsdCcpLmhpZGUoKTtcbiAgICAgICAgICAgICQoJ2lucHV0LCAjaWRfc190dXJuaXRpbnRvb2x0d29fYXBpdXJsJykucHJvcCgnZGlzYWJsZWQnLCB0cnVlKTtcbiAgICAgICAgICAgICQoJyN0ZXN0X2xpbmsnKS5oaWRlKCk7XG4gICAgICAgICAgICAkKFwiI3Rlc3RfcmVzdWx0XCIpLmNzcygnb3BhY2l0eScsICcnKTtcbiAgICAgICAgICAgICQoJyN0ZXN0X3Jlc3VsdCcpLnJlbW92ZUNsYXNzKCd0ZXN0X2xpbmtfc3VjY2VzcyB0ZXN0X2xpbmtfZmFpbCcpO1xuICAgICAgICAgICAgJCgnI3Rlc3RpbmdfY29udGFpbmVyJykuc2hvdygpO1xuXG4gICAgICAgICAgICAvLyBDaGFuZ2UgVXJsIGRlcGVuZGluZyBvbiBTZXR0aW5ncyBwYWdlLlxuICAgICAgICAgICAgdmFyIHVybCA9IFwiYWpheC5waHBcIjtcbiAgICAgICAgICAgIGlmICgkKCcuc2V0dGluZ3Nmb3JtIGZpZWxkc2V0IGRpdi5mb3Jtc2V0dGluZ2hlYWRpbmcnKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdXJsID0gXCIuLi9tb2QvdHVybml0aW50b29sdHdvL2FqYXgucGhwXCI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBhY2NvdW50aWQgPSAkKCcjaWRfc190dXJuaXRpbnRvb2x0d29fYWNjb3VudGlkJykudmFsKCk7XG4gICAgICAgICAgICB2YXIgYWNjb3VudHNoYXJlZCA9ICQoJyNpZF9zX3R1cm5pdGludG9vbHR3b19zZWNyZXRrZXknKS52YWwoKTtcbiAgICAgICAgICAgIHZhciBhY2NvdW50dXJsID0gJCgnI2lkX3NfdHVybml0aW50b29sdHdvX2FwaXVybCcpLnZhbCgpO1xuXG4gICAgICAgICAgICAkLmFqYXgoe1xuICAgICAgICAgICAgICAgIHR5cGU6IFwiUE9TVFwiLFxuICAgICAgICAgICAgICAgIHVybDogdXJsLFxuICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBcImpzb25cIixcbiAgICAgICAgICAgICAgICBkYXRhOiB7YWN0aW9uOiBcInRlc3RfY29ubmVjdGlvblwiLCBzZXNza2V5OiBNLmNmZy5zZXNza2V5LCBhY2NvdW50aWQ6IGFjY291bnRpZCwgYWNjb3VudHNoYXJlZDogYWNjb3VudHNoYXJlZCwgdXJsOiBhY2NvdW50dXJsfSxcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoZGF0YSk7XG5cbiAgICAgICAgICAgICAgICAgICAgJCgnI3Rlc3RpbmdfY29udGFpbmVyJykuaGlkZSgpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmNvbm5lY3Rpb25fc3RhdHVzID09IFwic3VjY2Vzc1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkKCcjdGVzdF9yZXN1bHQnKS5hZGRDbGFzcygndGVzdF9saW5rX3N1Y2Nlc3MnKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJyN0ZXN0X3Jlc3VsdCcpLmFkZENsYXNzKCd0ZXN0X2xpbmtfZmFpbCcpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgJCgnI3Rlc3RfcmVzdWx0JykuaHRtbChkYXRhLm1zZyk7XG4gICAgICAgICAgICAgICAgICAgICQoJyN0ZXN0X3Jlc3VsdCcpLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgJCgnI3Rlc3RfbGluaycpLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgJCgnaW5wdXQsICNpZF9zX3R1cm5pdGludG9vbHR3b19hcGl1cmwnKS5wcm9wKCdkaXNhYmxlZCcsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxufSk7Il19 diff --git a/jquery/turnitintooltwo_settings-2018082301.js b/jquery/turnitintooltwo_settings-2018102601.js similarity index 100% rename from jquery/turnitintooltwo_settings-2018082301.js rename to jquery/turnitintooltwo_settings-2018102601.js diff --git a/jquery/turnitintooltwo_settings-2018102601.min.js b/jquery/turnitintooltwo_settings-2018102601.min.js new file mode 100755 index 00000000..2b3b97b4 --- /dev/null +++ b/jquery/turnitintooltwo_settings-2018102601.min.js @@ -0,0 +1,2 @@ +jQuery(document).ready(function($){if($(".settingsform fieldset div.formsettingheading").length>0){var tabmenu=$(".settingsform fieldset div.formsettingheading:first").html();tabmenu.indexOf("tabtree")>=0&&($(".settingsform fieldset div.formsettingheading:first").remove(),$(".settingsform h2:first").after(tabmenu))}$('input[name="selectallcb"]').click(function(){$(this).prop("checked")?($(".browser_checkbox").prop("checked",!0),$(".browser_checkbox:checked").length>0?$(".create_checkboxes").slideDown():$(".create_checkboxes").slideUp()):($(".browser_checkbox").prop("checked",!1),$(".create_checkboxes").slideUp())}),$(".test_connection").length>0&&(""==$("#id_s_turnitintooltwo_accountid").val()&&""==$("#id_s_turnitintooltwo_secretkey").val()||($(".test_connection").show(),$("#test_link").show()),$("#id_s_turnitintooltwo_accountid, #id_s_turnitintooltwo_secretkey, #id_s_turnitintooltwo_apiurl").keyup(function(){$("#testing_container").hide();var t=$("#id_s_turnitintooltwo_accountid").val(),e=$("#id_s_turnitintooltwo_secretkey").val();t=t.trim(),e=e.trim(),0==t.length||0==e.length?($("#test_result").hide(),$(".test_connection").hide()):($(".test_connection").show(),$("#test_link").show())}),$("#test_link").click(function(){$("#test_result").hide(),$("input, #id_s_turnitintooltwo_apiurl").prop("disabled",!0),$("#test_link").hide(),$("#test_result").css("opacity",""),$("#test_result").removeClass("test_link_success test_link_fail"),$("#testing_container").show();var url="ajax.php";$(".settingsform fieldset div.formsettingheading").length>0&&(url="../mod/turnitintooltwo/ajax.php");var accountid=$("#id_s_turnitintooltwo_accountid").val(),accountshared=$("#id_s_turnitintooltwo_secretkey").val(),accounturl=$("#id_s_turnitintooltwo_apiurl").val();$.ajax({type:"POST",url:url,dataType:"json",data:{action:"test_connection",sesskey:M.cfg.sesskey,accountid:accountid,accountshared:accountshared,url:accounturl},success:function(data){eval(data),$("#testing_container").hide(),"success"==data.connection_status?$("#test_result").addClass("test_link_success"):$("#test_result").addClass("test_link_fail"),$("#test_result").html(data.msg),$("#test_result").show(),$("#test_link").show(),$("input, #id_s_turnitintooltwo_apiurl").prop("disabled",!1)}})}))}); +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR1cm5pdGludG9vbHR3b19zZXR0aW5ncy0yMDE4MTAyNjAxLmpzIl0sIm5hbWVzIjpbImpRdWVyeSIsImRvY3VtZW50IiwicmVhZHkiLCIkIiwibGVuZ3RoIiwidGFibWVudSIsImh0bWwiLCJpbmRleE9mIiwicmVtb3ZlIiwiYWZ0ZXIiLCJjbGljayIsInRoaXMiLCJwcm9wIiwic2xpZGVEb3duIiwic2xpZGVVcCIsInZhbCIsInNob3ciLCJrZXl1cCIsImhpZGUiLCJhY2NvdW50aWQiLCJhY2NvdW50c2hhcmVkIiwidHJpbSIsImNzcyIsInJlbW92ZUNsYXNzIiwidXJsIiwiYWNjb3VudHVybCIsImFqYXgiLCJ0eXBlIiwiZGF0YVR5cGUiLCJkYXRhIiwiYWN0aW9uIiwic2Vzc2tleSIsIk0iLCJjZmciLCJzdWNjZXNzIiwiZXZhbCIsImNvbm5lY3Rpb25fc3RhdHVzIiwiYWRkQ2xhc3MiLCJtc2ciXSwibWFwcGluZ3MiOiJBQUtBQSxPQUFPQyxVQUFVQyxNQUFNLFNBQVNDLEdBQzVCLEdBQUlBLEVBQUUsaURBQWlEQyxPQUFTLEVBQUcsQ0FDL0QsR0FBSUMsU0FBVUYsRUFBRSx1REFBdURHLE1BQ25FRCxTQUFRRSxRQUFRLFlBQWMsSUFDOUJKLEVBQUUsdURBQXVESyxTQUN6REwsRUFBRSwwQkFBMEJNLE1BQU1KLFVBSTFDRixFQUFFLDZCQUE2Qk8sTUFBTSxXQUM3QlAsRUFBRVEsTUFBTUMsS0FBSyxZQUNiVCxFQUFFLHFC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5ndGggPiAwKSB7XG4gICAgICAgIGlmICgkKCcjaWRfc190dXJuaXRpbnRvb2x0d29fYWNjb3VudGlkJykudmFsKCkgIT0gJycgfHwgJCgnI2lkX3NfdHVybml0aW50b29sdHdvX3NlY3JldGtleScpLnZhbCgpICE9ICcnKSB7XG4gICAgICAgICAgICAkKCcudGVzdF9jb25uZWN0aW9uJykuc2hvdygpO1xuICAgICAgICAgICAgJCgnI3Rlc3RfbGluaycpLnNob3coKTtcbiAgICAgICAgfVxuXG4gICAgICAgICQoJyNpZF9zX3R1cm5pdGludG9vbHR3b19hY2NvdW50aWQsICNpZF9zX3R1cm5pdGludG9vbHR3b19zZWNyZXRrZXksICNpZF9zX3R1cm5pdGludG9vbHR3b19hcGl1cmwnKS5rZXl1cChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICQoJyN0ZXN0aW5nX2NvbnRhaW5lcicpLmhpZGUoKTtcblxuICAgICAgICAgICAgdmFyIGFjY291bnRpZCA9ICQoJyNpZF9zX3R1cm5pdGludG9vbHR3b19hY2NvdW50aWQnKS52YWwoKTtcbiAgICAgICAgICAgIHZhciBhY2NvdW50c2hhcmVkID0gJCgnI2lkX3NfdHVybml0aW50b29sdHdvX3NlY3JldGtleScpLnZhbCgpO1xuXG4gICAgICAgICAgICAvLyBNYWtlIHN1cmUgdGhleSBhcmVuJ3QgZW1wdHkgc3RyaW5ncy5cbiAgICAgICAgICAgIGFjY291bnRpZCA9IGFjY291bnRpZC50cmltKCk7XG4gICAgICAgICAgICBhY2NvdW50c2hhcmVkID0gYWNjb3VudHNoYXJlZC50cmltKCk7XG4gICAgICAgICAgICBpZiAoYWNjb3VudGlkLmxlbmd0aCA9PSAwIHx8IGFjY291bnRzaGFyZWQubGVuZ3RoID09IDApIHtcbiAgICAgICAgICAgICAgICAkKCcjdGVzdF9yZXN1bHQnKS5oaWRlKCk7XG4gICAgICAgICAgICAgICAgJCgnLnRlc3RfY29ubmVjdGlvbicpLmhpZGUoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgJCgnLnRlc3RfY29ubmVjdGlvbicpLnNob3coKTtcbiAgICAgICAgICAgICAgICAkKCcjdGVzdF9saW5rJykuc2hvdygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICAkKCcjdGVzdF9saW5rJykuY2xpY2soZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAkKCcjdGVzdF9yZXN1bHQnKS5oaWRlKCk7XG4gICAgICAgICAgICAkKCdpbnB1dCwgI2lkX3NfdHVybml0aW50b29sdHdvX2FwaXVybCcpLnByb3AoJ2Rpc2FibGVkJywgdHJ1ZSk7XG4gICAgICAgICAgICAkKCcjdGVzdF9saW5rJykuaGlkZSgpO1xuICAgICAgICAgICAgJChcIiN0ZXN0X3Jlc3VsdFwiKS5jc3MoJ29wYWNpdHknLCAnJyk7XG4gICAgICAgICAgICAkKCcjdGVzdF9yZXN1bHQnKS5yZW1vdmVDbGFzcygndGVzdF9saW5rX3N1Y2Nlc3MgdGVzdF9saW5rX2ZhaWwnKTtcbiAgICAgICAgICAgICQoJyN0ZXN0aW5nX2NvbnRhaW5lcicpLnNob3coKTtcblxuICAgICAgICAgICAgLy8gQ2hhbmdlIFVybCBkZXBlbmRpbmcgb24gU2V0dGluZ3MgcGFnZS5cbiAgICAgICAgICAgIHZhciB1cmwgPSBcImFqYXgucGhwXCI7XG4gICAgICAgICAgICBpZiAoJCgnLnNldHRpbmdzZm9ybSBmaWVsZHNldCBkaXYuZm9ybXNldHRpbmdoZWFkaW5nJykubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHVybCA9IFwiLi4vbW9kL3R1cm5pdGludG9vbHR3by9hamF4LnBocFwiO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgYWNjb3VudGlkID0gJCgnI2lkX3NfdHVybml0aW50b29sdHdvX2FjY291bnRpZCcpLnZhbCgpO1xuICAgICAgICAgICAgdmFyIGFjY291bnRzaGFyZWQgPSAkKCcjaWRfc190dXJuaXRpbnRvb2x0d29fc2VjcmV0a2V5JykudmFsKCk7XG4gICAgICAgICAgICB2YXIgYWNjb3VudHVybCA9ICQoJyNpZF9zX3R1cm5pdGludG9vbHR3b19hcGl1cmwnKS52YWwoKTtcblxuICAgICAgICAgICAgJC5hamF4KHtcbiAgICAgICAgICAgICAgICB0eXBlOiBcIlBPU1RcIixcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcbiAgICAgICAgICAgICAgICBkYXRhVHlwZTogXCJqc29uXCIsXG4gICAgICAgICAgICAgICAgZGF0YToge2FjdGlvbjogXCJ0ZXN0X2Nvbm5lY3Rpb25cIiwgc2Vzc2tleTogTS5jZmcuc2Vzc2tleSwgYWNjb3VudGlkOiBhY2NvdW50aWQsIGFjY291bnRzaGFyZWQ6IGFjY291bnRzaGFyZWQsIHVybDogYWNjb3VudHVybH0sXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBldmFsKGRhdGEpO1xuXG4gICAgICAgICAgICAgICAgICAgICQoJyN0ZXN0aW5nX2NvbnRhaW5lcicpLmhpZGUoKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5jb25uZWN0aW9uX3N0YXR1cyA9PSBcInN1Y2Nlc3NcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCgnI3Rlc3RfcmVzdWx0JykuYWRkQ2xhc3MoJ3Rlc3RfbGlua19zdWNjZXNzJyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkKCcjdGVzdF9yZXN1bHQnKS5hZGRDbGFzcygndGVzdF9saW5rX2ZhaWwnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICQoJyN0ZXN0X3Jlc3VsdCcpLmh0bWwoZGF0YS5tc2cpO1xuICAgICAgICAgICAgICAgICAgICAkKCcjdGVzdF9yZXN1bHQnKS5zaG93KCk7XG4gICAgICAgICAgICAgICAgICAgICQoJyN0ZXN0X2xpbmsnKS5zaG93KCk7XG4gICAgICAgICAgICAgICAgICAgICQoJ2lucHV0LCAjaWRfc190dXJuaXRpbnRvb2x0d29fYXBpdXJsJykucHJvcCgnZGlzYWJsZWQnLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cbn0pOyJdfQ== diff --git a/lib.php b/lib.php index fd11f1cc..1369e241 100755 --- a/lib.php +++ b/lib.php @@ -1179,7 +1179,7 @@ function turnitintooltwo_sort_array(&$data, $sortcol, $sortdir) { } /** - * Get files for displaying in settings. Called from ajax.php via turnitintooltwo-2018082301.min.js. + * Get files for displaying in settings. Called from ajax.php via turnitintooltwo-2018102601.min.js. * * @param $moduleid the id of the module to return files for * @global type $DB @@ -1362,7 +1362,7 @@ function turnitintooltwo_pluginfile($course, } /** - * Get users for unlinking/relinking. Called from ajax.php via turnitintooltwo-2018082301.min.js. + * Get users for unlinking/relinking. Called from ajax.php via turnitintooltwo-2018102601.min.js. * * @global type $DB * @return array return array of users to display diff --git a/mod_form.php b/mod_form.php index bd03b22f..e3122fab 100755 --- a/mod_form.php +++ b/mod_form.php @@ -132,7 +132,7 @@ public function show_form($instructorrubrics, $sharedrubrics, $modulestring = '' $script .= html_writer::tag('script', '', array("type" => "text/javascript", "src" => $CFG->wwwroot."/mod/turnitintooltwo/jquery/jquery-1.8.2.min.js")); $script .= html_writer::tag('script', '', array("id" => "plugin_turnitin_script", "type" => "text/javascript", - "src" => $CFG->wwwroot."/mod/turnitintooltwo/jquery/turnitintooltwo-2018082301.min.js")); + "src" => $CFG->wwwroot."/mod/turnitintooltwo/jquery/turnitintooltwo-2018102601.min.js")); $script .= html_writer::tag('script', '', array("type" => "text/javascript", "src" => $CFG->wwwroot."/mod/turnitintooltwo/jquery/jquery-ui-1.10.4.custom.min.js")); $script .= html_writer::tag('script', '', array("type" => "text/javascript", diff --git a/version.php b/version.php index 7e3caf94..07459e04 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ $plugin = new StdClass(); } -$plugin->version = 2018101901; +$plugin->version = 2018102601; $plugin->release = "2.7+"; $plugin->requires = 2014051200; $plugin->component = 'mod_turnitintooltwo';