var presentation = ["Moana<\/word>","Disney animated feature film<\/word>","Auli\u02bbi Cravalho<\/word>","fictional character<\/word>","main character<\/word>","Ron Clements<\/word>","John Musker<\/word>","Don Hall<\/word>","Chris Williams<\/word>","film introduces<\/word>","Moana<\/strong> is a fictional character<\/strong> and a main character<\/strong> from the 56th Disney animated feature film<\/strong> Moana<\/strong>. Directed by Ron Clements<\/strong> and John Musker<\/strong>, and co-directed by Don Hall<\/strong> and Chris Williams<\/strong>, the film introduces<\/strong> Auli\u02bbi Cravalho<\/strong> as Moana<\/strong>.<\/phrase>","Moana<\/word>","goddess Te Fiti<\/word>","blight strikes her island<\/word>","in search of Maui<\/word>","returning the relic to Te Fiti<\/word>","film<\/word>","strong-willed daughter<\/word>","Polynesian village<\/word>","mystical relic<\/word>","sail<\/word>","legendary demigod<\/word>","hope<\/word>","The film<\/strong> tells the story of Moana<\/strong>, the strong-willed daughter<\/strong> of a chief of a Polynesian village<\/strong>, who is chosen by the ocean itself to reunite a mystical relic<\/strong> with the goddess Te Fiti<\/strong>. When a blight strikes her island<\/strong>, Moana<\/strong> sets sail<\/strong> in search of Maui<\/strong>, a legendary demigod<\/strong>, in the hope<\/strong> of returning the relic to Te Fiti<\/strong> and saving her people.<\/phrase>","Motunui<\/word>","goddess Te Fiti<\/word>","Maui<\/word>","Te K\u0101<\/word>","his magical giant fishhook<\/word>","Polynesian island<\/word>","pounamu stone<\/word>","her heart<\/word>","her power<\/word>","shape-shifting demigod and master<\/word>","Te Fiti<\/word>","volcanic demon<\/word>","On the Polynesian island<\/strong> of Motunui<\/strong>, the inhabitants worship the goddess Te Fiti<\/strong>, who brought life to the ocean using a pounamu stone<\/strong> as her heart<\/strong> and the source of her power<\/strong>. Maui<\/strong>, the shape-shifting demigod and master<\/strong> of sailing, steals the heart to give humanity the power of creation. However, Te Fiti<\/strong> disintegrates, and Maui<\/strong> is attacked by another who seeks the heart: Te K\u0101<\/strong>, a volcanic demon<\/strong>. He loses both his magical giant fishhook<\/strong> and the heart to the depths of the sea.<\/phrase>","ocean chooses Moana<\/word>","Motunui's chief<\/word>","Tui<\/word>","return the heart<\/word>","Moana<\/word>","prepare her for ascension<\/word>","island's chief<\/word>","a blight strikes<\/word>","shipwrecked<\/word>","Motunui<\/word>","Pua the pig<\/word>","Te Fiti<\/word>","Sina<\/word>","try<\/word>","Sixteen years<\/word>","A millennium later, the ocean chooses Moana<\/strong>, daughter of Motunui's chief<\/strong> Tui<\/strong>, to return the heart<\/strong> to Te Fiti<\/strong>. Tui<\/strong> takes Moana<\/strong> away, causing her to lose the heart. Tui<\/strong> and Sina<\/strong>, Moana<\/strong>'s mother, try<\/strong> to keep her away from the ocean to prepare her for ascension<\/strong> as the island's chief<\/strong>. Sixteen years<\/strong> later, a blight strikes<\/strong> the island, killing vegetation and shrinking the fish catch. Moana<\/strong> suggests going beyond the island's reef to find more fish and figure out what is happening, but Tui<\/strong> forbids it. Moana<\/strong> tries conquering the reef but is overpowered by the tides and shipwrecked<\/strong> back to Motunui<\/strong> with Pua the pig<\/strong>.<\/phrase>","Moana<\/word>","secret cave of ships<\/word>","their people were voyagers<\/word>","until Maui stole Te Fiti's heart<\/word>","Te K\u0101<\/word>","Maui<\/word>","restore the heart of Te Fiti<\/word>","her death bed<\/word>","tells Moana that she must depart to find Maui<\/word>","Tala<\/word>","Moana<\/strong>'s grandmother, Tala<\/strong>, shows her a secret cave of ships<\/strong>, revealing that their people were voyagers<\/strong> until Maui stole Te Fiti's heart<\/strong>; the ocean was no longer safe without it. Tala<\/strong> explains that Te K\u0101<\/strong>'s darkness is poisoning the island, but can be cured if Moana<\/strong> finds Maui<\/strong> and makes him restore the heart of Te Fiti<\/strong>, which she gives to Moana<\/strong>. Tala<\/strong> falls ill and, on her death bed<\/strong>, tells Moana that she must depart to find Maui<\/strong>.<\/phrase>","camakau<\/word>","Moana<\/word>","typhoon<\/word>","shipwrecked<\/word>","Maui<\/word>","boasts about his achievements<\/word>","return the heart<\/word>","traps her in a cave<\/word>","Kakamora<\/word>","pirates-who seek the heart<\/word>","retrieves his hook<\/word>","no longer control his shape-shifting<\/word>","escape with the hook<\/word>","his mortal parents abandoned him as an infant<\/word>","two grow closer<\/word>","sail<\/word>","magical fishhook<\/word>","Lalotai<\/word>","Realm of Monsters<\/word>","Tamatoa<\/word>","giant coconut crab<\/word>","quick thinking<\/word>","first tattoo<\/word>","Setting sail<\/strong> on a camakau<\/strong> from the cavern, Moana<\/strong> is caught in a typhoon<\/strong> and shipwrecked<\/strong> on an island where she finds Maui<\/strong>, who boasts about his achievements<\/strong>. She demands that Maui<\/strong> return the heart<\/strong>, but he refuses and traps her in a cave<\/strong>. She escapes and confronts Maui<\/strong>, who reluctantly lets her on the camakau<\/strong>. They are attacked by Kakamora<\/strong>-small, coconut-armored pirates-who seek the heart<\/strong>, but Moana<\/strong> and Maui<\/strong> outwit them. Moana<\/strong> realizes Maui<\/strong> is no longer a hero since he stole the heart and cursed the world, and convinces him to redeem himself by returning the heart. Maui<\/strong> first needs to retrieve his magical fishhook<\/strong> in Lalotai<\/strong>, the Realm of Monsters<\/strong>, from Tamatoa<\/strong>, a giant coconut crab<\/strong>. While Moana<\/strong> distracts Tamatoa<\/strong>, Maui<\/strong> retrieves his hook<\/strong> but discovers he can no longer control his shape-shifting<\/strong>. He is overpowered by Tamatoa<\/strong>, but Moana<\/strong>'s quick thinking<\/strong> allows them to escape with the hook<\/strong>. Maui<\/strong> reveals that his first tattoo<\/strong> was earned when his mortal parents abandoned him as an infant<\/strong>, and the gods, taking pity on him, granted him his powers. After reassurance from Moana<\/strong>, Maui<\/strong> teaches her the art of sailing, regaining control of his powers, and the two grow closer<\/strong>.<\/phrase>","Te K\u0101<\/word>","Moana<\/word>","Maui's hook being badly damaged<\/word>","Maui abandons Moana<\/word>","true calling<\/word>","Maui returns<\/word>","time to reach Te Fiti<\/word>","realizes Te K\u0101 is Te Fiti<\/word>","corrupted without her heart<\/word>","clear a path<\/word>","return Te Fiti's heart<\/word>","Maui apologizes to Te Fiti<\/word>","arrive<\/word>","Te Fiti<\/word>","hook<\/word>","hope<\/word>","ocean obliges<\/word>","Tala<\/word>","They arrive<\/strong> at Te Fiti<\/strong>'s island, only to be attacked by Te K\u0101<\/strong>. Moana<\/strong> refuses to turn back, resulting in Maui's hook being badly damaged<\/strong>. Unwilling to lose his hook<\/strong> in another confrontation with Te K\u0101<\/strong>, Maui abandons Moana<\/strong>, who tearfully asks the ocean to find someone else to restore the heart and loses hope<\/strong>. The ocean obliges<\/strong> and takes the heart, but Tala<\/strong>'s spirit appears, inspiring Moana<\/strong> to find her true calling<\/strong>. She retrieves the heart and sails back to confront Te K\u0101<\/strong>. Maui returns<\/strong>, having had a change of heart, and buys Moana<\/strong> time to reach Te Fiti<\/strong> by fighting Te K\u0101<\/strong>, destroying his hook<\/strong> in the process. Moana<\/strong> discovers Te Fiti<\/strong> is missing, and realizes Te K\u0101 is Te Fiti<\/strong>, corrupted without her heart<\/strong>. Moana<\/strong> tells the ocean to clear a path<\/strong>, allowing her to return Te Fiti's heart<\/strong>, and the restored goddess heals the ocean and islands of the blight. Maui apologizes to Te Fiti<\/strong>, who restores his hook<\/strong> and gives Moana<\/strong> a new boat before falling into a deep sleep and becoming a mountain.<\/phrase>","Moana<\/word>","Maui<\/word>","reunites with her parents<\/word>","her role as chief and wayfinder<\/word>","resume voyaging<\/word>","Moana<\/strong> bids farewell to Maui<\/strong>, returning home where she reunites with her parents<\/strong>. She takes up her role as chief and wayfinder<\/strong>, leading her people as they resume voyaging<\/strong>.<\/phrase>"]; var currentPosition = 0; var totalPositions = 0; var timePerWord = 1500; var timePerPhraseWord = 120 var readAheadPlayerTimer; var autoPlay = true; var setMinimized = false; var wordSpeedOptions = {'Slower':2000,'Moderate':1200,'Fast':800}; var phraseSpeedOptions = {'Slower':280,'Moderate':200,'Fast':80}; var defaultWordSpeedOption = 'Moderate'; var defaultPhraseSpeedOption = 'Moderate'; var logToLTI = false; $(window).load(function(){ totalPositions = presentation.length; if (totalPositions > 0){ $('body').prepend('
'); $('body').prepend('
'); $('#read_ahead_player').prepend('
'); initializeReadAheadControls(); initializeReadAheadSlider(); initializeReadAheadSpeedOptions(); currentReadAheadControls(); resumeReadAheadPlayback(); } }); $(document).keyup(function(e){ switch(e.which) { case 37: pauseReadAheadPresentation(); priorReadAheadPresentationItem(); break; case 39: pauseReadAheadPresentation(); nextReadAheadPresentationItem(); break; default: break; } }); function initializeReadAheadControls(){ var s = ''; s += ''; s += ''; s += ''; s += '
'; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += '
'; $('#read_ahead_player').append(s); } function initializeReadAheadSlider(){ var s = ''; s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').prepend(s); updateReadAheadSliderPosition(); } function initializeReadAheadSpeedOptions(){ var s = '
'; s += '
'; s += ' Word Speed
'; s += '
'; optionCount = 0; for (index in wordSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in wordSpeedOptions) { var option = wordSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadWordSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; s += ' Phrase Speed
'; s += '
'; optionCount = 0; for (index in phraseSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in phraseSpeedOptions) { var option = phraseSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadPhraseSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').append(s); } function updateReadAheadWordSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0) { timePerWord = microseconds; } if (sender!=undefined) { $('#slider_control_word_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadWordSpeed','Presentation',microseconds); } function updateReadAheadPhraseSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0 ) { timePerPhraseWord = microseconds; } if (sender!=undefined) { $('#slider_control_phrase_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadPhraseSpeed','Presentation',microseconds); } function updateReadAheadSliderPosition(){ var currentSliderBarWidth = 100 - (100 / totalPositions * (currentPosition + 1)); $('#readAheadSliderBar').css('width',currentSliderBarWidth+'%'); } function currentReadAheadControls(){ $('#read_ahead_player_pause_play').show(); if (currentPosition < totalPositions - 1) { $('#read_ahead_player_next_word').removeClass('disabled'); } else { $('#read_ahead_player_next_word').addClass('disabled'); } if (currentPosition > 0) { $('#read_ahead_player_previous_word').removeClass('disabled'); } else { $('#read_ahead_player_previous_word').addClass('disabled'); } } function restartReadAheadPresentation(){ currentPosition = 0; logReadAheadPlayerAction('restartReadAheadPresentation','Presentation',''); resumeReadAheadPlayback(); } function resumeReadAheadPlayback(){ $('.fa-repeat').removeClass('fa-repeat').addClass('fa-play'); $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-play').removeClass('fa-play').addClass('fa-pause'); $(this).off('click'); $(this).attr('onclick','pauseReadAheadPresentation()'); }); logReadAheadPlayerAction('resumeReadAheadPlayback','Presentation',''); playReadAheadPresentation(); } function pauseReadAheadPresentation(){ $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-pause').removeClass('fa-pause').addClass('fa-play'); $(this).off('click'); $(this).attr('onclick','resumeReadAheadPlayback()'); }); logReadAheadPlayerAction('pauseReadAheadPresentation','Presentation',''); read_ahead_pause(); } function endReadAheadPresentation(){ $('.fa-play').removeClass('fa-play').addClass('fa-repeat'); $('.fa-pause').removeClass('fa-pause').addClass('fa-repeat'); $('#read_ahead_player_pause_play').each(function(){ $(this).off('click'); $(this).attr('onclick','restartReadAheadPresentation()'); }); logReadAheadPlayerAction('endReadAheadPresentation','Presentation',''); logLTIEndPresentation(); } function playReadAheadPresentation(){ autoPlay=true; currentPosition--; logReadAheadPlayerAction('playReadAheadPresentation','Presentation',''); nextReadAheadPresentationItem(); } function startReadAheadStepper(timeDisplayWord){ clearInterval(readAheadPlayerTimer); readAheadPlayerTimer = setTimeout(function() { read_ahead_step(); },timeDisplayWord); } function stopReadAheadStepper(){ clearInterval(readAheadPlayerTimer); } function read_ahead_step(){ if (autoPlay) { nextReadAheadPresentationItem(); } } function read_ahead_pause(){ autoPlay=false; stopReadAheadStepper(); } function showReadAheadPresentationItem(index){ currentPosition = index; currentPresentationItem = presentation[currentPosition] != undefined ? presentation[currentPosition].trim() : ""; if (currentPresentationItem != "") { currentItemWordCount = presentation[currentPosition].replace("\n","").split(" ").length; if (currentPresentationItem.startsWith("")){ startReadAheadStepper(currentItemWordCount*timePerWord); $('#read_ahead_player_field').html('
'+currentPresentationItem+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Word',currentPresentationItem); } else { startReadAheadStepper(currentItemWordCount*timePerPhraseWord); $('#read_ahead_player_field').html('
'+currentPresentationItem.replace("\n","
")+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Phrase',''); } } else { if (currentPosition < totalPositions) { nextReadAheadPresentationItem(); } else { endReadAheadPresentation(); read_ahead_minimize(); } } currentReadAheadControls(); updateReadAheadSliderPosition(); saveReadAheadPosition(); } function priorReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('priorReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition-1); } function nextReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('nextReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition+1); } function read_ahead_playAgain(){ currentWordIndex = 0; logReadAheadPlayerAction('read_ahead_playAgain','Controls',''); playReadAheadPresentation(); } function read_ahead_minimize(){ setMinimized = true; logReadAheadPlayerAction('read_ahead_minimize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_maximize(){ setMinimized = false; logReadAheadPlayerAction('read_ahead_maximize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_switch_min_max(forceSwitch){ forceSwitch = forceSwitch != undefined ? forceSwitch : false; if (forceSwitch) { setMinimized = !setMinimized; } if (setMinimized) { $('#read_ahead_player_back').fadeOut(); $('#read_ahead_player').addClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-lg').addClass('fa-sm'); $('.player-icons .fa-minus').removeClass('fa-minus').addClass('fa-expand'); logReadAheadPlayerAction('read_ahead_switch_min_max','Min',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_maximize()'); //}); } else { $('#read_ahead_player_back').fadeIn(); $('#read_ahead_player').removeClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-sm').addClass('fa-lg'); $('.player-icons .fa-expand').removeClass('fa-expand').addClass('fa-minus'); logReadAheadPlayerAction('read_ahead_switch_min_max','Max',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_minimize()'); //}); } } function saveReadAheadPosition(){ $.ajax({ type:'POST', url:'/ajax/save_user_presentation_position.php', data: { 'id':1581, 'position': currentPosition } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); } function logLTIEndPresentation(action) { if (!logToLTI) { return; } $.ajax({ type:'POST', url:'/lti/presentationEnded.php', data: { 'documentId':1581, 'userId':0, } }) } function logReadAheadPlayerAction(action,area,details){ var d = new Date(); var t = d.getTime(); action = action != undefined ? action.trim() : 'UNKNOWN'; area = area != undefined ? area.trim() : ''; details = details != undefined ? details : ''; // If we are about to show a new word, increase the number of keywords // reinforced so we can log that for the Dashboard page. if (area == 'Word') { window.keywordCount++; } $.ajax({ type:'POST', url:'/logging/logPlayerAction.php', data: { 'documentId':1581, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }