unserver-unify
Version:
264 lines (260 loc) • 16.7 kB
HTML
<div ng-controller="CourseVideoCtrl as ctrl">
<div>
<div class="margin-bottom-80 mbl_vdo" id="videoshow" fullscreen="isFullscreen" only-watched-property>
<div class='panel panel-default test_qstn'>
<div class='panel-body inner_slider'>
<div ng-if="!chapter.content&&!chapter.ppts&&!chapter.questions">
<div class="news-v1">
<div class="title-v1">
<h2 translate>Content under construction !</h2>
</div>
</div>
</div>
<a class="btn btn-info btn-sm pull-right top_rvw_btn" translate ng-if="(currentSchool.key=='high'||currentSchool.key=='ifx')&&ctrl.allowaccessment&&chapter._id&&!ctrl.resourceRating[chapter._id]" ng-click="ctrl.review(chapter._id)" translate>Review</a>
<div ng-if="chapter.content||chapter.questions||chapter.ppts" ng-class="{'hght4pptimg': (chapter.type === 'mp4ppt') && ctrl.displayImg, 'hght4test':chapter.type === 'test', 'hght4test':chapter.type === 'lms2004'}" ng-switch='chapter.type' class="iframe_holder resize">
<!--div ng-switch-when="youtube" width="100%" height="100%">
<script src="https://www.youtube.com/iframe_api"></script>
<youtube-video video-id="youtubeid"></youtube-video >
<iframe ng-switch-when="youtube" width="100%" height="{{(maxFlag||ctrl.chapters.length<2) ? 500:500}}" ng-src="{{ctrl.getYoutubeUrl()}}">
</iframe >
</div -->
<iframe ng-switch-when="youtube" width="100%" height="100%" ng-src="{{chapter.youtubeurl}}">
</iframe>
<div class="title-v1" ng-switch-when="html5">
<div class="col-md-12">
<h1 translate>HTML 5 not supported on mobile Browser</h1>
</div>
<!-- <div>
<iframe allowfullscreen="" frameborder="0" mozallowfullscreen="" ng-src="{{ chapter.fullurl }}" webkitallowfullscreen="" ng-if="chapter.ready">
</iframe>
</div> -->
</div>
<div class="pdf_container" ng-switch-when="ebook">
<div class="col-md-12">
<h1 translate>Ebook not supported on mobile Browser</h1>
</div>
<!-- <div class="pdf-viewer relative">
<iframe allowfullscreen="" frameborder="0" mozallowfullscreen="" ng-src="{{ ctrl.chapter.fullurl }}" webkitallowfullscreen="">
</iframe>
</div> -->
</div>
<div class="pdf_container" ng-switch-when="lms">
<div ng-if="lmsready">
<iframe allowfullscreen="" frameborder="0" mozallowfullscreen="" ng-src="{{ ctrl.chapter.fullurl }}" webkitallowfullscreen="">
</iframe>
</div>
</div>
<div class="pdf_container" ng-switch-when="lms">
<div ng-cloak="" ng-controller="Scorm1.2ChapterCtrl as wctrl" ng-init="wctrl.init(ctrl.chapter)" >
<iframe allowfullscreen="" ng-if="wctrl.lmsready" frameborder="0" mozallowfullscreen="" ng-src="{{ wctrl.fullurl }}" webkitallowfullscreen="">
</iframe>
</div>
</div>
<div ng-switch-when="lms2004" class="frame_container scrom_hldr" style="overflow: auto">
<div class="relative" style="height: 100%;">
<div class="overlay_black_bg cursor-pointer" ng-if="slideout" ng-click="ctrl.toggleslide()"></div>
<div ng-cloak="" ng-controller="Scorm2004ChapterCtrl as wctrl" ng-include="'app/course/chapter/scorm2004.html'" ng-init="wctrl.init(ctrl.chapter)" style="height: 100%; overflow-y: auto; overflow-x: hidden;">
</div>
</div>
</div>
<div ng-switch-when="msoffice">
<iframe allowfullscreen="" frameborder="0" mozallowfullscreen="" ng-src="{{ ctrl.chapter.fullurl }}" webkitallowfullscreen="">
</iframe>
</div>
<iframe allowfullscreen="" frameborder="0" height="{{ (maxFlag||ctrl.chapters.length<2) ? 500:500 }}" mozallowfullscreen="" ng-src="{{ chapter.vimeourl }}" ng-switch-when="vimeo" webkitallowfullscreen="" width="100%">
</iframe>
<iframe ng-switch-when="youku" width="100%" height="{{(maxFlag||ctrl.chapters.length<2) ? 500:500}}" ng-src="{{ctrl.getYoukuUrl()}}" frameborder=0 allowfullscreen>
</iframe>
<div ng-switch-when="mp4" width="400" height="{{(maxFlag||ctrl.chapters.length<2) ? 400:300}}" class="videogular-container frame_container">
<span ng-include="'app/course/chapter/mp4.html'">
</span>
<!-- // html for no sub video play
<videogular ng-if="!chapter.subtitle" vg-player-ready="ctrl.onPlayerReady($API)" vg-can-play="ctrl.videoCanPlay()" vg-theme="ctrl.mp4config.theme" vg-auto-play="true">
<vg-media vg-src="ctrl.mp4config.sources"></vg-media>
<vg-controls vg-autohide="true" vg-autohide-time="1000">
<vg-play-pause-button></vg-play-pause-button>
<vg-time-display>{{ currentTime | date:'mm:ss' }}</vg-time-display>
<vg-scrub-bar>
<vg-scrub-bar-current-time></vg-scrub-bar-current-time>
</vg-scrub-bar>
<vg-time-display>{{ totalTime | date:'mm:ss' }}</vg-time-display>
<vg-volume>
<vg-mute-button></vg-mute-button>
<vg-volume-bar></vg-volume-bar>
</vg-volume>
<vg-fullscreen-button></vg-fullscreen-button>
</vg-controls>
<vg-buffering></vg-buffering>
<vg-overlay-play></vg-overlay-play>
</videogular>
// html for video play with sub
<videogular ng-if="chapter.subtitle" vg-player-ready="ctrl.onPlayerReady($API)" vg-can-play="ctrl.videoCanPlay()" vg-theme="ctrl.mp4config.theme" vg-auto-play="true" vg-crossorigin="'anonymous'">
<vg-media vg-src="ctrl.mp4config.sources" vg-tracks="ctrl.mp4config.tracks"></vg-media>
<vg-controls vg-autohide="true" vg-autohide-time="1000">
<vg-play-pause-button></vg-play-pause-button>
<vg-time-display>{{ currentTime | date:'mm:ss' }}</vg-time-display>
<vg-scrub-bar>
<vg-scrub-bar-current-time></vg-scrub-bar-current-time>
</vg-scrub-bar>
<vg-time-display>{{ totalTime | date:'mm:ss' }}</vg-time-display>
<vg-volume>
<vg-mute-button></vg-mute-button>
<vg-volume-bar></vg-volume-bar>
</vg-volume>
<vg-fullscreen-button></vg-fullscreen-button>
</vg-controls>
<vg-buffering></vg-buffering>
<vg-overlay-play></vg-overlay-play>
</videogular> -->
</div>
<div ng-switch-when="pdf" style="margin-top:-25px;">
<div ng-include="'components/pdfviewer/pdf-viewer.html'"></div>
<!-- video exist -->
<div class="ppt_video pdf" draggable="false" ng-if="ctrl.chapter.video">
<video autoplay="" class="audio_aln" controls="true">
<source ng-src="{{ ctrl.getvideoUrl(ctrl.chapter.video) }}" type="video/mp4">
{{ 'Your browser does not support the video element' | translate }}
</video>
</div>
</div>
<div ng-switch-when="flash" class="title-v1">
<div class="col-md-12">
<h1 translate>Flash not supported on mobile Browser</h1>
</div>
</div>
<div ng-switch-when="test" class="test_container col-lg-12" style="background:#fff;">
<div style="padding:15px 0" class="test_scroll">
<div ng-repeat="question in chapter.questions" class="border-top padding-top-10 first_brdr_remove">
<h4>
Q{{ $index + 1 }}.
<span class="qstn_typ pstn_no">
{{ ctrl.typename[question.type] | translate }}
</span>
<i class="{{ resulticon[question.judgement] }}" ng-if="chapter.showresult">
</i>
<span ng-class="{'missedQuestion':question.judgement=='Not Attempted' , 'wrongQuestion':question.judgement=='Wrong', 'correctQuestion':question.judgement=='Correct'}" ng-if="question.judgement=='Not Attempted'">{{chapter.showresult? question.judgement : ''}}</span></h4>
<div ng-include="'app/course/question.html'"></div>
</div>
<div class="heading heading-v1">
<h2>END</h2>
</div>
</div>
<div class="slide_exam_but">
<a class="btn btn-u btn-sm" ng-click="ctrl.submitChapterTest($index)" | translate><i class="glyphicon glyphicon-ok"></i>Submit</a>
<a class="btn btn-u btn-sm" ng-click="ctrl.retestChapter($index)" | translate><i class="glyphicon glyphicon-refresh"></i>Retest</a>
</div>
</div>
<div ng-switch-when="html" class="html_container">
<span ng-include="'app/course/chapter/html.html'">
</span>
</div>
<div class="frame_container" ng-switch-when="word">
<div ng-controller="WordChapterCtrl as wctrl" ng-include="'app/course/chapter/word.html'" ng-init="wctrl.init(ctrl.wordchapter)" style="height: 100%; overflow-y: auto; overflow-x: hidden;">
</div>
</div>
<div class="frame_container" ng-switch-when="reading">
<div ng-controller="ReadingChapterCtrl as wctrl" ng-include="'app/course/chapter/reading.html'" ng-init="wctrl.init(chapter)" style="height: 100%; overflow-y: auto; overflow-x: hidden;">
</div>
</div>
<div class="frame_container" ng-switch-when="idiom">
<div ng-controller="IdiomChapterCtrl as wctrl" ng-include="'app/course/chapter/idiom.html'" ng-init="wctrl.init(ctrl.chapter)" style="height: 100%; overflow-y: auto; overflow-x: hidden; background: #fff; padding: 15px;">
</div>
</div>
<div class="frame_container" ng-switch-when="fillblank">
<div ng-controller="IdiomFillBlankChapterCtrl as wctrl" ng-include="'app/course/chapter/fillblank.html'" ng-init="wctrl.init(ctrl.chapter)" style="height: 100%; overflow-y: auto; overflow-x: hidden; background: #fff; padding: 15px;">
</div>
</div>
<div class="frame_container" ng-switch-when="bishun">
<span ng-include="'app/course/chapter/bishuns.html'" style="height: 100%; overflow-y: auto; overflow-x: hidden;">
</span>
</div>
<div ng-switch-when="ppts" class="frame_container" style="overflow:auto">
<span ng-include="'app/course/chapter/mobileppts.html'">
</span>
</div>
<!-- mp4quiz-->
<div class="frame_container white-bg" ng-switch-when="mp4quiz">
<!-- <span ng-include="'app/course/chapter/mp4quiz.html'"> </span>-->
<courseware-video-quiz chapter="chapter" callback="ctrl.getMvsubjectInfo(bool)"></courseware-video-quiz>
</div>
<div ng-switch-when="mp4ppt" ng-class="{'mp4ppt_half':ctrl.displayImg}" class="frame_container">
<span ng-include="'app/course/chapter/mobilemp4ppt.html'">
</span>
</div>
<div class="videogular-container frame_container mp4ppt" ng-switch-when="mp3ppt" style="overflow:hidden">
<span ng-include="'app/course/chapter/mp3ppt.html'">
</span>
</div>
<div ng-switch-when='exam' class="frame_container" style="overflow:auto;">
<span class="second_theme_exam" ng-include="'app/course/chapter/mobileexam.html'">
</div>
<div class="test_container col-lg-12" ng-switch-when="chapterexam">
<div class="test_scroll btn_hide">
<span ng-include="'app/course/chapter/chapterexam.html'">
</span>
</div>
<div class="slide_exam_but">
<a class="btn btn-u" href="{{ appUrl }}/exam/test/course/{{chapter._id}}/{{chapter.taskFlag?'1':''}}" style="padding:7px 30px">{{'Start' | translate}}</a>
<a class=" btn btn-info" ng-if="chapter.result" ui-sref="index.myspace.exams.result({ paperid:chapter.result.eid,recordid: chapter.result._id, type:'Paper'})">{{ {'View Result' | translate}| trans}}</a>
</div>
</div>
<div ng-switch-when='quiz' class="row col-md-12 frame_container">
<span ng-include="'app/course/chapter/mobile_quiz.html'"></span>
</div>
<div ng-switch-when='assignment' class="pdf_container">
<div class="pdf-viewer algn" ng-controller="CourseAssignmentCtrl as actrl" ng-include="'app/course/mobile_assignmentcontent.html'" ng-init="actrl.init(chapter.content)">
</div>
</div>
<div id="pptaudiodiv" class="col-md-12 audio_div" ng-if="audio||topLevelAudio"></div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<div class="sidebar_responsive_holder">
<script type="text/ng-template" id="menuTree.html">
<ol class="{{(item.index==ctrl.index) ? 'active' : ''}} side-nav">
<a class="pull-right" ng-if="item.items.length>0 && !item.extFlag" ng-click="ctrl.extItem(item)" style="padding-right: 10px;cursor: pointer;"><i class="fa fa-chevron-right"></i>
</a>
<a class="pull-right" ng-if="item.extFlag" style="padding-right: 10px;cursor: pointer;" ng-click="ctrl.hideItem(item)"><i class="fa fa-chevron-down"></i>
</a>
<a class="{{(item.index==ctrl.index) ? 'active' : ''}} list " ng-style="{'padding-left': (item.level * 12+12) + 'px'}" ng-click="ctrl.showchapter(item.index,item)" ng-class="{'disable': item.disable, 'milestone_course': item.taskFlag}">
<i class="{{ctrl.typeclassname[item.type]}}"></i>
<span style="cursor: pointer;"> {{item.title}}
<span ng-if="ctrl.chapters[item.index].type == 'mp4' && ctrl.chapters[item.index].duration" class="drtn_tmr"> ({{ctrl.chapters[item.index].duration | secondsToDateTime | date:'HH:mm:ss'}})</span>
<!-- display duration for mp4 type chapter -->
</span>
<i class="fa fa-flag milestone_icon" ng-class="{'pass':item.pass}" ng-if="item.taskFlag" tooltip-placement="top-left" uib-tooltip="{{'You must complete this resource before proceeding' | translate}}"> </i>
<i class="fa fa-star score_icon" ng-if="item.score"> </i>
</a>
<ul ng-if="item.extFlag" style="background:none;">
<li ng-repeat="item in item.items" ng-include="'menuTree.html'">
</li>
</ul>
</ol>
</script>
<ul class="sidebar_responsive video_sidebar" ng-if="ctrl.showlist">
<li class="sidebar_responsive_active">
<div class="mbl_sec_title">{{'Sections' | translate}}
<a ui-sref="index.courses.course.section.discuss" style="margin-top: -4px;" class="btn btn-u btn-sm pull-right" translate="">Discussion</a>
</div>
<ul class="list-group sidebar-nav-v1" style="float:left; margin:0;">
<li ng-repeat="item in items" ng-include="'menuTree.html'" class="list-group-item "></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearfix"></div>
</div>
<!-- <script>
function showWiki(key) {
angular.element('#chapter_id').scope().showWiki(key);
}
function showhtmlImage(src) {
angular.element('#chapter_id').scope().showImage(src);
}
function showHtmlVideo(title, url, isOnlineVideo) {
angular.element('#chapter_id').scope().showVideo(title, url, isOnlineVideo);
}
</script> -->