function waitForIt(a,b,c){if(!loaded&&count<200){count++;var d=$(a);loaded=!1,d&&d.length>0?(loaded=!0,d.each(function(){var a=$(this);!a.data("alreadyFound")&&1&&(b(a,c)?loaded=!1:a.data("alreadyFound",!0))})):loaded=!1;var e=waitForIt.controlObj||{},f=a.replace(/[^\w]/g,"_"),g=e[f];g||(g=setInterval(function(){waitForIt(a,b,c)},300),e[f]=g),waitForIt.controlObj=e}}function syllabusSupportData(a){for(var b in a)$("#syllabus-tabs #syllabus-support").append(a[b])}function getSyllabusSupportData(){var a="BU";$("#syllabus-support").hasClass("DEXL")?(a="DEXL",$("#syllabus-policy").hasClass("fourWeek")&&(a+="/FourWeek")):$("#syllabus-support").hasClass("USU")?a="USU":$("#syllabus-policy").hasClass("BU")&&(a="BU"),$.ajax({url:"https://lessons.bryanuniversity.edu/data/"+a+"/syllabus_support.json",dataType:"jsonp"})}function syllabusPolicyData(a){for(var b in a)$("#syllabus-tabs #syllabus-policy").append(a[b])}function getSyllabusPolicyData(){var a="BU";$("#syllabus-policy").hasClass("DEXL")?(a="DEXL",$("#syllabus-policy").hasClass("PTD")?a+="/PTD":$("#syllabus-policy").hasClass("PTDPRAC")?a+="/PTDPRAC":$("#syllabus-policy").hasClass("PTDPRAC_A")?a+="/PTDPRAC_A":$("#syllabus-policy").hasClass("fourWeek")&&(a+="/FourWeek")):$("#syllabus-policy").hasClass("USU")?a="USU":$("#syllabus-policy").hasClass("BU")&&(a="BU"),$.ajax({url:"https://lessons.bryanuniversity.edu/data/"+a+"/syllabus_policies.json",dataType:"jsonp"})}function setUpSyllabus(){if(getSyllabusSupportData(),getSyllabusPolicyData(),$("#section-tabs-header-subtitle").text().length>0&&"20"==$("#section-tabs-header-subtitle").text().substring(0,2)){var a="<p>";NaN!=parseInt($("#section-tabs-header-subtitle").text().substring(4,6))&&(a+=parseInt($("#section-tabs-header-subtitle").text().substring(4,6))),NaN!=parseInt($("#section-tabs-header-subtitle").text().substring(6,8))&&(a+="/",a+=parseInt($("#section-tabs-header-subtitle").text().substring(6,8))),NaN!=parseInt($("#section-tabs-header-subtitle").text().substring(0,4))&&(a+="/",a+=parseInt($("#section-tabs-header-subtitle").text().substring(0,4))),a+="</p>",$("#syllabus-cover-page").append(a)}}var loaded=!1,count=0,tabs=new function(){function a(a){return shortStr=a.substr(a.indexOf("tab-")-a.length+4),parseInt(shortStr.substr(0,shortStr.indexOf("-")+1))}function b(a){$.each($("#"+a+">.tabs-nav>li>a"),function(b,c){var d=b+1;$(c).attr("href","#"+a+"_tab-"+d+"-content"),$(c).attr("role","tab"),$(c).attr("tabindex","-1"),$(c).attr("aria-controls","#"+a+"_tab-"+d+"-content"),$(c).attr("id","#"+a+"_tab-"+d)})}function c(a){$.each($("#"+a+">.tabs-container>.tab-content"),function(b,c){var d=b+1;$(c).attr("id","#"+a+"_tab-"+d+"-content"),$(c).attr("role","tabpanel"),$(c).attr("aria-hidden","true"),$(c).attr("aria-labelledby","#"+a+"_tab-"+d)})}function d(a,b,c){nextTab="#"+a+"_tab-"+b+"-content",prevTab="#"+a+"_tab-"+c+"-content",count=$("#"+a+">.tabs-container>.tab-content").length,b>count?$("#"+a+">.tabs-container>.tabs-next").hide():$("#"+a+">.tabs-container>.tabs-next").attr("href",nextTab).show(),c<=0?$("#"+a+">.tabs-container>.tabs-prev").hide():$("#"+a+">.tabs-container>.tabs-prev").attr("href",prevTab).show()}function e(b,c){if("click"==b.type)return g(b.target,c),b.preventDefault(),!1;if("keydown"==b.type&&36<b.which&&b.which<41){var d=a($(b.target).attr("href"));return b.which>38?d<count&&(g($(b.target).parent().next().find("a"),c),$(b.target).parent().next().find("a").focus()):d>1&&(g($(b.target).parent().prev().find("a"),c),$(b.target).parent().prev().find("a").focus()),b.preventDefault(),!1}}function f(f){$("#"+f+" .tabs-nav").attr("role","tabslist"),c(f),b(f),count=$("#"+f+" .tab-content").length,window.location.hash.search("#"+f+"_tab-")>=0?startTab=window.location.hash:startTab="#"+f+"_tab-1-content",startNum=a(startTab),nextNum=startNum+1,prevNum=startNum-1,$($("#"+f+">.tabs-container>.tab-content")[startNum-1]).addClass("active-tab"),$($("#"+f+">.tabs-container>.tab-content")[startNum-1]).attr("aria-hidden","false"),$($("#"+f+">.tabs-nav>li>a")[startNum-1]).attr("tabindex","0"),$($("#"+f+">.tabs-nav>li>a")[startNum-1]).addClass("active-tab-nav"),d(f,nextNum,prevNum),$("#"+f+">.tabs-nav>li>a").on("click keydown",function(a){e(a,f)}),$("#"+f+">.tabs-container>.tabs-next").on("click",function(a){return g(a.target,f),!1}),$("#"+f+">.tabs-container>.tabs-prev").on("click",function(a){return g(a.target,f),!1}),$("#"+f).hasClass("presenter")&&presenterMediaControls.setUpPresenterMedia(f)}function g(b,c){if(!$(b).hasClass("active-tab-nav")){startNum=a(startTab);var e=$(b).attr("href"),f=a(e),g="#"+c+"_tab-"+f+"-content";nextNum=f+1,prevNum=f-1,$("#"+c+">.tabs-container>.active-tab").attr("aria-hidden","true"),$("#"+c+">.tabs-container>.active-tab").removeClass("active-tab"),$("#"+c+">.tabs-nav>li>.active-tab-nav").attr("tabindex","-1"),$("#"+c+">.tabs-nav>li>.active-tab-nav").removeClass("active-tab-nav"),$($("#"+c+">.tabs-container>.tab-content")[f-1]).attr("aria-hidden","false"),$($("#"+c+">.tabs-container>.tab-content")[f-1]).addClass("active-tab"),$($("#"+c+">.tabs-nav>li>a")[f-1]).addClass("active-tab-nav"),$($("#"+c+">.tabs-nav>li>a")[f-1]).attr("tabindex","0"),d(c,nextNum,prevNum),window.location.hash=g,startTab=g,$(window).scrollTop($("#"+c).offset().top)}}var h=0;this.setUpTabs=function(a){$(a).attr("id")?f($(a).attr("id")):($(a).attr("id","tabs-"+h),f("tabs-"+h),h++)}},presenterMediaControls=new function(){function a(a){if($("#"+a+" .active-tab-nav").hasClass("submenu-trigger")||$("#"+a+" .active-tab-nav").hasClass("submenu-content")){var b;$("#"+a+" .active-tab-nav").hasClass("submenu-trigger")?b=$("#"+a+" .active-tab-nav").parent().attr("id"):$("#"+a+" .active-tab-nav").hasClass("submenu-content")&&(b=$("#"+a+" .active-tab-nav").parent().attr("class")),$(".submenu-content-active").each(function(){var a=$(this).parent().attr("class");$(this).parent().hasClass(b)||$(this).parent().hasClass($("#"+b).attr("class"))||$(this).parent().hasClass($("#"+$("#"+b).attr("class")).attr("class"))||($(this).removeClass("submenu-content-active"),$("#"+a).children("a").removeClass("submenu-trigger-open"))}),$("."+b).children("a").hasClass("submenu-content-active")||($("."+b).each(function(){$(this).children("a").addClass("submenu-content-active")}),$("#"+b).children("a").addClass("submenu-trigger-open"),$("."+$("#"+b).attr("class")).each(function(){$(this).children("a").addClass("submenu-content-active")}),$("#"+$("#"+b).attr("class")).children("a").addClass("submenu-trigger-open"),$("."+$("#"+$("#"+b).attr("class")).attr("class")).each(function(){$(this).children("a").addClass("submenu-content-active")}),$("#"+$("#"+$("#"+b).attr("class")).attr("class")).children("a").addClass("submenu-trigger-open"))}else $(".submenu-content-active").each(function(){$(this).removeClass("submenu-content-active")}),$(".submenu-trigger-open").each(function(){$(this).removeClass("submenu-trigger-open")})}function b(a,b){null!=b&&b.pause(),$("#"+a+" .tabs-next").off(".presenterMediaControls"),$("#"+a+" .tabs-prev").off(".presenterMediaControls"),$("#"+a+" .tabs-nav a").off(".presenterMediaControls"),d(a)}function c(a,c,d){"click"==a.type&&b(c,d),"keydown"==a.type&&36<a.which&&a.which<41&&b(c,d)}function d(d){var e;$("#"+d+">.tabs-container>.active-tab>video").length?e=$("#"+d+" .active-tab video").get(0):$("#"+d+">.tabs-container>.active-tab>audio").length?(e=$("#"+d+" .active-tab audio").get(0),$("#"+d+" .active-tab audio").attr("controls","controls"),$("#"+d+" .active-tab").hide().show(0)):e=null,a(d),$("#"+d+" .tabs-next").on("click.presenterMediaControls",function(a){b(d,e)}),$("#"+d+" .tabs-prev").on("click.presenterMediaControls",function(a){b(d,e)}),$("#"+d+" .tabs-nav a").on("click.presenterMediaControls keydown.presenterMediaControls",function(a){c(a,d,e)})}var e=0;this.setUpPresenterMedia=function(a){$("#"+a).attr("id")?d($("#"+a).attr("id")):($("#"+a).attr("id","presenter-"+e),d("presenter-"+e),e++),$("audio").each(function(){$(this).attr("controls","controls")})}},mobileApps=new function(){var a;this.appData=function(b){var c=[],d="";$.each(b,function(b,d){var e=$(a).attr("class").split(/\s+/),f="LP-101";e.forEach(function(a){a.match(/^[\w]+\-[\d]{3}/)&&(f=a.match(/^[\w]+\-[\d]+[\w]*/)[0].toUpperCase())}),this.courses.indexOf(f)>=0&&c.push(this)}),d="<h2>Want to Go Mobile?</h2><p>There are several mobile apps that will help you stay connected to your courses after you&rsquo;ve accessed your course material from your computer. They are:</p><ul>",c.forEach(function(b){d+='<li class="app">',d+="<h3>",d+=b.name,d+="</h3><div>",d+='<img src="'+b.img+'" alt="'+b.name+' logo" />',d+="<p>",d+=b.desc,d+="</p></div>",d+="<ul>",d+='<li><a href="'+b.iOsLink+'" target="_blank">Apple App Store</a></li>',d+='<li><a href="'+b.googlePlayLink+'" target="_blank">Google Play Store</a></li>',d+="</ul>",$(a).hasClass("vid")&&b.video.length>0&&(d+="<p>",d+=b.video,d+="</p>"),d+="</li>"}),d+="</ul>",$(a).append(d),$(a).after("")},this.getAppData=function(b){a=b;var c="BU";$(a).hasClass("DEXL")&&(c="DEXL"),$.getJSON("https://lessons.bryanuniversity.edu/data/"+c+"/mobileApps.json",function(a){mobileApps.appData(a)})}},mobileAppByClass=new function(){this.getAppData=function(a){var b="BU";$(a).hasClass("DEXL")&&(b="DEXL"),$.getJSON("https://lessons.bryanuniversity.edu/data/"+b+"/mobileApps.json",function(b){var c={},d="",e="";$.each($(a),function(f,g){c={},d="",e="";var h=$(g).attr("class").split(/\s+/);h=h.filter(function(b){return"."+b!=a}),h.length>0&&h.forEach(function(a){$.each(b,function(b,e){b.toLowerCase()==a.toLowerCase()&&(c=e,d=a)})}),void 0!=c.name&&(e+="<h4>",e+='<img src="'+c.img+'" alt="'+c.name+' logo" />',e+=c.name,e+="</h4>",e+="<p>",e+=c.desc,e+="</p><ul>",e+='<li><a href="'+c.iOsLink+'" target="_blank">App Store</a></li>',e+='<li><a href="'+c.googlePlayLink+'" target="_blank">Google Play</a></li>',e+="</ul>",$(g).hasClass("vid")&&c.video.length>0&&(e+="<p>",e+=c.video,e+="</p>"),$(g).append(e))})})}},tutorEmbed=new function(){this.embedder=function(a){var b=document.createElement("script");b.setAttribute("charset","UTF-8"),b.setAttribute("src","https://d3gxy7nm8y4yjr.cloudfront.net/js/embed.js"),document.body.appendChild(b)}},tutor=new function(){var a;this.tutorData=function(b){var c=[],d="",e="";$.each(b,function(b,d){var e=$(a).attr("class").split(/\s+/),f="HIT-202";e.forEach(function(a){a.match(/^[\w]+\-[\d]{3}/)&&(f=a.match(/^[\w]+\-[\d]+[\w]*/)[0].toUpperCase())}),this.courses.indexOf(f)>=0&&c.push(this)}),d+='<div class="tutor-text-pane">',d+='<div class="tutor-callout"><p>Would you like extra help?</p><p>Would you like extra help from someone who is a PRO?</p></div>',d+='<p>If you answered <span class="tutor-callout">YES</span> to either of those questions, I want to introduce you to ',d+="your tutors",d+=".</p>",d+='<p>Click below to schedule your <span class="tutor-callout">free</span> appointment!</p>',d+='<div class="tutor-title">Student Academic Assistant</div>',c.forEach(function(a){d+='<div class="tutor-name">'+a.fname+" "+a.lname+"</div>"}),d+='<div class="tutor-instruction"><a href="http://saa.bryanuniversity.edu/" target="_blank" rel="noopener noreferrer">http://saa.bryanuniversity.edu/</a></div>',d+="</div>",c.forEach(function(a){e+=a.embed}),$(a).append(d),$(a).after(e),tutorEmbed.embedder(a)},this.getTutorData=function(b){if(a=b,$(a).hasClass("generic"))$(a).after('<iframe src="https://academicassistance.acuityscheduling.com/schedule.php" width="100%" height="800" frameBorder="0"></iframe>'),tutorEmbed.embedder(a);else{var c="BU";$(a).hasClass("DEXL")&&(c="DEXL"),$.ajax({url:"https://lessons.bryanuniversity.edu/data/"+c+"/tutor.json",dataType:"jsonp"})}}},dexlResume=new function(){this.getDexlResumeData=function(a){$.ajax({url:"https://lessons.bryanuniversity.edu/data/DEXL/resume.json",dataType:"jsonp"})},this.dexlResumeData=function(a){var b=["BUSINESS","HEALTHCARE","PUBLICHEALTH","USUHEALTHSCIENCE"];for(var c in b){var d=b[c];if($(".dexl-resume").hasClass(d)){var e=a[d].skills,f=a[d].tech,g=a[d].keys,h=[],i=[];for(var j in g)$(".dexl-resume").hasClass(j)&&(h=a[d].keys[j].skills,i=a[d].keys[j].tech);for(var k in e){var l=e[k],m="<li";h.indexOf(parseInt(k))>=0&&(m+=' class="key"'),m+=">"+l+"</li>",$("."+d+" .skills").append(m)}for(var n in f){var o=f[n],m="<li";i.indexOf(parseInt(n))>=0&&(m+=' class="key"'),m+=">"+o+"</li>",$("."+d+" .tech").append(m)}}}}},h5p=new function(){this.resizer=function(a){var b=document.createElement("script");b.setAttribute("charset","UTF-8"),b.setAttribute("src","https://h5p.org/sites/all/modules/h5p/library/js/h5p-resizer.js"),document.body.appendChild(b)}},wistia=new function(){this.embedder=function(a){var b=document.getElementsByClassName(a.substring(1))[0],c=b.childNodes[1].childNodes[1].childNodes[1].getAttribute("class"),d=c.indexOf("wistia_async_")+13,e=c.substring(d,c.indexOf(" ",d)),f=document.createElement("script");f.setAttribute("charset","UTF-8"),f.setAttribute("async","true"),f.setAttribute("src","https://fast.wistia.com/embed/medias/"+e+".jsonp");var g=document.createElement("script");g.setAttribute("charset","UTF-8"),f.setAttribute("async","true"),g.setAttribute("src","https://fast.wistia.com/assets/external/E-v1.js"),document.body.appendChild(f),document.body.appendChild(g)}},videoAttributes=new function(){this.setAttributes=function(a){$(a).hasClass("autoplay")&&$(a).attr("autoplay","autoplay"),$(a).hasClass("loop")&&$(a).attr("loop","loop")}},syllabusLOs=new function(){this.getSyllabusLOData=function(a){var b=$(a).attr("class");$.ajax({url:"https://lessons.bryanuniversity.edu/data/DEXL/LOs/"+b+".json",dataType:"json"}).done(function(b){var c="<h3>Course Outcomes and Weekly Objectives</h3><ul>";for(var d in b.c_layers)c+="<li>",c+=b.c_layers[d].description,c+="</li>";c+="</ul>";for(var e in b.bundles){c+="<h3>",c+=b.bundles[e].name,c+="</h3><ul>";var f=b.bundles[e].los;for(var g in f)c+="<li>",c+=b.los[f[g]].description,c+="</li>";c+="</ul>"}$(a).append(c)})}},onboardingHeader=new function(){this.setHeaderClass=function(a){$(".onboarding").prevAll("h1.page-title").addClass("onboarding"),$(".onboarding.w1").prevAll("h1.page-title").addClass("w1"),$(".onboarding.w2").prevAll("h1.page-title").addClass("w2"),$(".onboarding.w3").prevAll("h1.page-title").addClass("w3"),$(".onboarding.w4").prevAll("h1.page-title").addClass("w4"),$(".onboarding.w6").prevAll("h1.page-title").addClass("w6"),$(".onboarding.w8").prevAll("h1.page-title").addClass("w8"),$(".onboarding.w10").prevAll("h1.page-title").addClass("w10"),$(".onboarding.w12").prevAll("h1.page-title").addClass("w12")}},parsonsPuzzle=new function(){this.getParsonsLibrary=function(a){function b(){$.getScript("https://lessons.bryanuniversity.edu/lib/parsons.js",function(b,e,f){$(a).hasClass("python")?$.getScript("https://lessons.bryanuniversity.edu/lib/skulpt.js",function(a,b,e){$.getScript("https://lessons.bryanuniversity.edu/lib/skulpt-stdlib.js",function(a,b,e){d(c())})}):d(c())})}function c(){console.log("getPuzzleClass has been called");for(var b="",c=$(a).attr("class").split(/\s+/),d=0;d<c.length;d++){console.log("loop is iterating, class is: "+c[d]);var e=/puzzle-\d+/;if(b=c[d].match(e),console.log("puzzle class: "+b),null!=b){console.log("puzzle class is non-null");break}}return""+b}function d(b){function c(a){a.errors.length>0&&alert(a.errors[0])}function c(a){a.errors.length>0&&alert(a.errors[0])}switch(console.log("puzzle class in loadPuzzle(): "+b),b){case"puzzle-1":var d="def is_true(boolean_value):\n if boolean_value:\n return True\n return False\n return true #distractor\n";$(document).ready(function(){var a=new ParsonsWidget({sortableId:"sortable",trashId:"sortableTrash",max_wrong_lines:1,feedback_cb:c});a.init(d),a.shuffleLines(),$("#newInstanceLink").click(function(b){b.preventDefault(),a.shuffleLines()}),$("#feedbackLink").click(function(b){b.preventDefault(),a.getFeedback()})});break;case"puzzle-2":var d="print 'Hello'\nprint 'Parsons\nprint 'problems!";$(document).ready(function(){var a=new ParsonsWidget({sortableId:"sortable",trashId:"sortableTrash",max_wrong_lines:1,feedback_cb:c,can_indent:!1});a.init(d),a.shuffleLines(),$("#newInstanceLink").click(function(b){b.preventDefault(),a.shuffleLines()}),$("#feedbackLink").click(function(b){b.preventDefault(),a.getFeedback()})});break;case"puzzle-3":var e,d='for (int i=0;i<3;i++) {\nSystem.out.print("I ");\nSystem.out.print("am ");\nSystem.out.print("a Java program ");\n}';$(document).ready(function(){e=new ParsonsWidget({sortableId:"sortable",max_wrong_lines:1,vartests:[{initcode:"output = ''",code:"",message:"Testing...",variables:{output:"I am a Java program I am a Java program I am a Java program "}}],grader:ParsonsWidget._graders.LanguageTranslationGrader,executable_code:"for x in range(3):\noutput += 'I '\noutput += 'am '\noutput += 'a Java program '\npass\n",programmingLang:"java"}),e.init(d),e.shuffleLines(),$("#newInstanceLink").click(function(a){a.preventDefault(),e.shuffleLines()}),$("#feedbackLink").click(function(a){a.preventDefault();var b=e.getFeedback();$("#unittest").html("<h2>Feedback from testing your program:</h2>"+b.feedback)})});break;case"puzzle-4":var e,d="IF $$toggle::a::b$$ $$toggle::<::>::<>$$ b THEN\n min := a\nELSE\n min := b\nENDIF";$(document).ready(function(){e=new ParsonsWidget({sortableId:"sortable",trashId:"sortableTrash",max_wrong_lines:1,vartests:[{initcode:"min = None\na = 0\nb = 2",code:"",message:"Testing with a = 0 ja b = 2",variables:{min:0}},{initcode:"min = None\na = 7\nb = 4\n",code:"",message:"Testing with a = 7 ja b = 4",variables:{min:4}}],grader:ParsonsWidget._graders.LanguageTranslationGrader,executable_code:"if $$toggle$$ $$toggle::<::>::!=$$ b:\nmin = a\nelse:\nmin = b\n pass",programmingLang:"pseudo"}),e.init(d),e.shuffleLines(),$("#newInstanceLink").click(function(a){a.preventDefault(),e.shuffleLines()}),$("#feedbackLink").click(function(a){a.preventDefault();var b=e.getFeedback();$("#unittest").html("<h2>Feedback from testing your program:</h2>"+b.feedback)})});break;case"puzzle-5":var d="def find_largest(a, b, c):\nif <span class='jsparson-toggle' data-type='abc'></span> > <span class='jsparson-toggle' data-type='abc'></span>:\nif <span class='jsparson-toggle' data-type='abc'></span> > <span class='jsparson-toggle' data-type='abc'></span>:\nreturn <span class='jsparson-toggle' data-type='abc'></span>\nelse:\nreturn <span class='jsparson-toggle' data-type='abc'></span>\nelif <span class='jsparson-toggle' data-type='abc'></span> > <span class='jsparson-toggle' data-type='abc'></span>:\nreturn <span class='jsparson-toggle' data-type='abc'></span>\nelse:\nreturn <span class='jsparson-toggle' data-type='abc'></span>\n",f='import unittestparson\nclass myTests(unittestparson.unittest):\n def testOne(self):\n self.assertEqual(find_largest(0, 2, 4),4,"Calling function <code>find_largest(0, 2, 4)</code>.")\n self.assertEqual(find_largest(4, 2, 4),4,"Calling function <code>find_largest(4, 2, 4)</code>.")\n self.assertEqual(find_largest(-5, -1, -4),-1,"Calling function <code>find_largest(-5, -1, -4)</code>.")\n self.assertEqual(find_largest(7, 2, 4),7,"Calling function <code>find_largest(7, 2, 4)</code>.")\n_test_result = myTests().main()';$(document).ready(function(){var a=new ParsonsWidget({sortableId:"sortable",trashId:"sortableTrash",unittests:f,toggleTypeHandlers:{abc:["a","b","c"]}});a.init(d),a.shuffleLines(),$("#newInstanceLink").click(function(b){b.preventDefault(),a.shuffleLines()}),$("#feedbackLink").click(function(b){b.preventDefault();var c=a.getFeedback();$("#unittest").html("<h2>Feedback from testing your program:</h2>"+c.feedback),c.success&&alert("Good, you solved the assignment!")})});break;case"puzzle-6":var d="$$toggle::x::y::tmp$$ = $$toggle::x::y::tmp$$\n$$toggle::x::y::tmp$$ = $$toggle::x::y::tmp$$\n$$toggle::x::y::tmp$$ = $$toggle::x::y::tmp$$\n";$(document).ready(function(){var a=new ParsonsWidget({sortableId:"sortable",trashId:"sortableTrash",vartests:[{initcode:"x = 0\ny=2",code:"",message:"Testing with initial variable values x = 0 and y = 2",variables:{x:2}},{initcode:"x = 3\ny=4\n",code:"",message:"Testing with initial variable values x = 3 and y = 4",variables:{x:4,y:3}}],lang:"en"});a.init(d),a.shuffleLines(),$("#newInstanceLink").click(function(b){b.preventDefault(),a.shuffleLines()}),$("#feedbackLink").click(function(b){b.preventDefault();var c=a.getFeedback();$("#unittest").html("<h2>Feedback from testing your program:</h2>"+c.feedback),c.success&&alert("Good, you solved the assignment!")})});break;case"puzzle-7":$(document).ready(function(){$(".model-box").append('<canvas id="modelCanvas" width="600" height="600"></canvas>'),$(".student-box").append('<canvas id="studentCanvas" width="600" height="600"></canvas>');var a;Sk.canvas="studentCanvas",a=new ParsonsWidget({sortableId:"sortable",trashId:"sortableTrash",max_wrong_lines:1,turtleModelCode:"modelTurtle.forward(100)\nmodelTurtle.left(120)\nmodelTurtle.forward(100)\nmodelTurtle.left(120)\nmodelTurtle.forward(100)\nmodelTurtle.left(120)",grader:ParsonsWidget._graders.TurtleGrader,executable_code:"for i in range(0,3):\nmyTurtle.forward(100)\nmyTurtle.left(120)\npass",programmingLang:"pseudo"}),a.init("REPEAT 3 TIMES\nforward(100)\nleft(120)\nENDREPEAT"),a.shuffleLines(),$("#newInstanceLink").click(function(b){b.preventDefault(),a.shuffleLines()}),$("#feedbackLink").click(function(b){b.preventDefault(),a.getFeedback().success?alert("Great job, you solved the exercise!"):alert("Sorry, your solution does not match the model image")})});break;case"puzzle-8":var d="def maxindex(arg):\n ans = 0\n for i in range(len(arg)):\n if arg[i] > arg[ans]:\n ans = i\n while True:\npass\n return ans\n",f='import unittestparson\nclass myTests(unittestparson.unittest):\n def testOne(self):\n self.assertEqual(maxindex([0, 2, 4]),2,"Calling function <code>maxindex([0, 2, 4])</code>.")\n self.assertEqual(maxindex([7, 2, 4]),0,"Calling function <code>maxindex([7, 2, 4])</code>.")\n self.assertEqual(maxindex([7, 8, 4]),1,"Calling function <code>maxindex([7, 8, 4])</code>.")\n def testTwo(self):\n self.assertEqual(maxindex([0, 2, 4]),2,"Calling function <code>maxindex([0, 2, 4])</code>.")\n self.assertEqual(maxindex([7, 2, 4]),0,"Calling function <code>maxindex([7, 2, 4])</code>.")\n self.assertEqual(maxindex([7, 8, 4]),1,"Calling function <code>maxindex([7, 8, 4])</code>.")\n_test_result = myTests().main()';$(document).ready(function(){var a=new ParsonsWidget({sortableId:"sortable",trashId:"sortableTrash",unittests:f});a.init(d),a.shuffleLines(),$("#newInstanceLink").click(function(b){b.preventDefault(),a.shuffleLines()}),$("#feedbackLink").click(function(b){b.preventDefault();var c=a.getFeedback();$("#jsparson").html("<h2>Feedback from testing your program:</h2>"+c.feedback),c.success&&alert("Good, you solved the assignment!")})});break;default:$(a).append("<p>Please add a puzzle-# class to the parsons-puzzle div.</p>")}}var e=!1,f=!1;$.getScript("https://lessons.bryanuniversity.edu/lib/underscore-min.js",function(a,c,d){e=!0,$.getScript("https://lessons.bryanuniversity.edu/lib/lis.js",function(a,c,d){f=!0,b()})})}},admissionsHeader=new function(){this.setHeaderClass=function(a){$(".admissions").prevAll("h1.page-title").addClass("admissions"),$(".admissions.faq-page").prevAll("h1.page-title").addClass("faq-page")}},liveEvents=new function(){this.formBoxLinks=function(a){$(a+" .upper-content .box-link-anchor").each(function(a){$(this).parents(".upper-content").wrapInner('<a href="'+$(this).attr("href")+'" class="box-link" target="_blank"></a>')}),$(a+" .optional-blocks .box-link-anchor").each(function(a){$(this).parents("li").wrapInner('<a href="'+$(this).attr("href")+'" class="box-link" target="_blank"></a>')})}},delayedFunctions=new function(){this.loadDelayedFunctions=function(a,b){switch(b){case"main_bu":$(".bu-tabs").length>0&&tabs.setUpTabs(".bu-tabs"),$(".h5p").length>0&&h5p.resizer(".h5p"),$(".wistia-embed").length>0&&wistia.embedder(".wistia-embed"),$(".vidAttr").length>0&&videoAttributes.setAttributes(".vidAttr"),$(".tutor-ad").length>0&&(console.log("main called gettutordata"),tutor.getTutorData(".tutor-ad")),$(".mobile-apps").length>0&&mobileApps.getAppData(".mobile-apps"),$(".mobile-app-by-class").length>0&&mobileAppByClass.getAppData(".mobile-app-by-class"),$(".dexl-resume").length>0&&dexlResume.getDexlResumeData(".dexl-resume"),$(".onboarding").length&&onboardingHeader.setHeaderClass(".onboarding"),$(".admissions").length>0&&admissionsHeader.setHeaderClass(".admissions"),$(".live-events").length>0&&liveEvents.formBoxLinks(".live-events"),$(".parsons-puzzle").length>0&&parsonsPuzzle.getParsonsLibrary(".parsons-puzzle");break;case"main_bu_mobile":$(".bu-tabs").length>0&&tabs.setUpTabs(".bu-tabs"),$(".h5p").length>0&&h5p.resizer(".h5p"),$(".wistia-embed").length>0&&wistia.embedder(".wistia-embed"),$(".vidAttr").length>0&&videoAttributes.setAttributes(".vidAttr"),$(".tutor-ad").length>0&&tutor.getTutorData(".tutor-ad"),$(".mobile-apps").length>0&&mobileApps.getAppData(".mobile-apps"),$(".mobile-app-by-class").length>0&&mobileAppByClass.getAppData(".mobile-app-by-class"),$(".dexl-resume").length>0&&dexlResume.getDexlResumeData(".dexl-resume"),$(".onboarding").length&&onboardingHeader.setHeaderClass(".onboarding"),$(".admissions").length>0&&admissionsHeader.setHeaderClass(".admissions"),$(".live-events").length>0&&liveEvents.formBoxLinks(".live-events"),$(".parsons-puzzle").length>0&&parsonsPuzzleLoader.getParsonsLibrary(".parsons-puzzle");break;case"main_dexl":case"main_dexl_mobile":$(".bu-tabs").length>0&&tabs.setUpTabs(".bu-tabs"),$(".vidAttr").length>0&&videoAttributes.setAttributes(".vidAttr"),$(".mobile-apps").length>0&&mobileApps.getAppData(".mobile-apps"),$(".dexl-resume").length>0&&dexlResume.getDexlResumeData(".dexl-resume"),$(".onboarding").length&&onboardingHeader.setHeaderClass(".onboarding"),$(".live-events").length>0&&liveEvents.formBoxLinks(".live-events"),$("#surveymonkey-embed").length>0&&surveymonkeyEmbed.embedder("#surveymonkey-embed");break;case"main_test":$(".bu-tabs").length>0&&tabs.setUpTabs(".bu-tabs"),$(".hp5").length>0&&hp5.resizer(".hp5"),$(".vidAttr").length>0&&videoAttributes.setAttributes(".vidAttr"),$(".tutor-ad").length>0&&tutor.getTutorData(".tutor-ad"),$(".mobile-apps").length>0&&mobileApps.getAppData(".mobile-apps"),$(".dexl-resume").length>0&&dexlResume.getDexlResumeData(".dexl-resume"),$(".onboarding").length&&onboardingHeader.setHeaderClass(".onboarding"),$(".admissions").length>0&&admissionsHeader.setHeaderClass(".admissions"),$(".parsons-puzzle").length>0&&parsonsPuzzle.getParsonsLibrary(".parsons-puzzle");break;case"main_usu":$(".bu-tabs").length>0&&tabs.setUpTabs(".bu-tabs"),$(".dexl-resume").length>0&&dexlResume.getDexlResumeData(".dexl-resume"),$(".onboarding").length&&onboardingHeader.setHeaderClass(".onboarding")}}},DT_variables={iframeID:"",path:"https://designtools.ciditools.com/",templateCourse:"7976",hideButton:!0,limitByFormat:!1,formatArray:["online","on-campus","blended"],limitByRole:!1,roleArray:["student","teacher","admin"],limitByUser:!1,userArray:["1234","987654"]};$(document).ready(function(){if(window.location.pathname.indexOf("assignments/syllabus")>-1){var a=$('<div class="grid-row middle-xs between-xs" style="margin-bottom: 10px"><div class="col-xs-6"></div><div class="col-md-6 col-lg-3"><a class="btn print-grades icon-printer no-print" href="javascript:window.print()">Print Syllabus</a></div></div>');$("#content").prepend(a)}var b=document.createElement("script");b.setAttribute("type","text/javascript"),b.setAttribute("src","https://bryanuniversity.evaluationkit.com/CanvasScripts/bryanuniversity.js?v=5"),document.getElementsByTagName("head")[0].appendChild(b),$("#section-tabs a").each(function(){"BryanLibrary"==$(this).text()?$(this).attr("href","https://bryanuniversity.libguides.com/").attr("target","_blank"):"BryanConnect"==$(this).text()?$(this).attr("href","https://bryanuniversity.fideliseducation.com").attr("target","_blank"):"Office 365"==$(this).text()?$(this).attr("href","https://login.microsoftonline.com/").attr("target","_blank"):"AHIMA Vlab"==$(this).text()?$(this).attr("href","http://academy.ahima.org").attr("target","_blank"):"Office 365 Online"==$(this).text()?$(this).attr("href","https://login.microsoftonline.com/").attr("target","_blank"):"USU Connect"==$(this).text()?$(this).attr("href","https://usuniversity.fideliseducation.com/").attr("target","_blank"):"USU Library"==$(this).text()&&$(this).attr("href","http://www.usuniversity.edu/current-students/library/").attr("target","_blank")}),waitForIt(".user_content",delayedFunctions.loadDelayedFunctions,"main_bu"),$("#syllabus-LOs").length>0&&syllabusLOs.getSyllabusLOData("#syllabus-LOs"),$("body.syllabus").length&&setUpSyllabus("body.syllabus"),$.getScript(DT_variables.path+"js/master_controls.js",function(){console.log("master_controls.js loaded")})}),$.getScript("https://public.tockify.com/browser/embed.js").done(function(){});