lab-exercises-detail.html 19.9 KB
<!--Body-->
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script>
    function labExModalClose()
    {
        $("#alertPopUp").css("display", "none");
    }
</script>
<div class="bodyWrap row" ng-controller="LabExercController">

    <div class="" ng-init="InitializeLabExercise()">
        <div class="col-sm-12 pageHeading" id="LabExPageHeading">
            <!--<button type="button" class="btn btn-default pull-left toggleBar hidden-lg"> <i class="fa fa-bars"></i> </button>
            <div class=" pull-left toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"> <i class="fa fa-bars"></i> </div>-->
            <h4 class="pull-left">Lab Exercise - {{LabExerciseName}}</h4>
            <div class="pull-right btn-group paddTop4"> <a href="#" class="btn btn-xs btn-default" ng-click="minLabExPanel()"><i class="fa fa-minus"></i></a> <a href="#" class="btn btn-xs btn-default"><i class="fa fa-clone"></i></a> <a href="lab-exercises" ng-click="IsVisible()" class="btn btn-xs btn-default"><i class="fa fa-close"></i></a> </div>
            <div class="clearfix"></div>
        </div>



        <!--report email pop up code-->




        <div id="labExModalbackground"></div>
        <!-- Lab Ex -->
        <div class="labExModal" id="labExModalID">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="closeLabExEmailModel()"><span aria-hidden="true">×</span></button>
                    <h4 class="modal-title" id="myModalLabel">Email your performance report</h4>
                </div>

                <div class="modal-body paddTop15">
                    <div class="modal-body paddTop15">

                        <form class="form-horizontal" name="LabExForm" id="LabExerciseForm" ng-submit="SendLabEXMailToUser(User)">
                            <div class="form-group">
                                <div class="col-sm-5 control-label">
                                    <label>*Email To: (Email address)</label>
                                </div>

                                    <div class="col-sm-7">
                                        <!--<input type="email" class="form-control" name="senderEmail" ng-model="User.EmailTo" required="required" />-->
                                    
                                        <input type="text" name="usremail" class="form-control" id="emailTo" multiple />
                                        <div class="help-block">*Use ',' to separate multiple email ids. </div>

                                        <!--<div class="help-block" style="color:red;" ng-if="LabExForm.senderEmail.$error.pattern">Please Enter valid Email Address</div>-->
                                    
                                      </div>
                                </div>

                            <div class="form-group">
                                <div class="col-sm-5 control-label">
                                    <label>*Your name:</label>
                                </div>
                                <div class="col-sm-7">
                                    <input type="text" name="name" class="form-control" ng-model="User.Name" ng-pattern="/^([a-zA-Z]+\s?)*$/" required="required" />
                                    <div class="help-block" style="color:red;" ng-if="LabExForm.name.$error.pattern"> Please enter your Name</div>
                                    <!--<div class="help-block" style="color:red;" id="nameHelpBlock"> Please Enter your Name </div>-->
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-5 control-label">
                                    <label for="">*Your Email Address:</label>
                                </div>
                                <div class="col-sm-7">
                                    <!--<input type="text" class="form-control" name="receiverEmail" ng-model="User.EmailAdd" ng-pattern="/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/" required="required" />-->
                                    <input type="text" class="form-control" name="receiverEmail" ng-model="User.EmailAdd" id="userEmailID" />

                                    <!--<div class="help-block" style="color:red;" id="emailHelpBlock"> Please Enter your Email Address </div>-->
                                    <!--<div class="help-block" style="color:red;" ng-if="LabExForm.receiverEmail.$error.pattern"> Please Enter valid Email Address</div>-->
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-5 control-label">
                                    <label for="">Send me a copy of the report</label>
                                </div>
                                <div class="col-sm-7">
                                    <input type="checkbox" style="margin-top: 12px;" ng-model="reportCopyStatus" />
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-5 control-label">
                                    <label for="">Note(optional)</label>
                                </div>
                                <div class="col-sm-7">
                                    <textarea name="" id="emailComment" class="form-control" cols="30" rows="5"></textarea>
                                    <!--<div class="help-block">255 character limit </div>-->
                                </div>
                            </div>


                            <div class="form-group">
                                <div class="col-sm-5 control-label">

                                </div>
                                <div class="col-sm-7">
                                    <button type="submit" class="btn btn-primary btn-block">Send Mail</button>

                                </div>
                            </div>

                        </form>

                    </div>

                </div>

            </div>
        </div>



        <div class="labExModal" id="alertPopUp" style="display: none;  position: absolute; z-index: 12000001; margin: auto; top: 0; left: 0; right: 0; bottom: 0; width: 400px;height:400px;">
            <div class="modal-content">
                <div class="modal-header">
                    <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
                    <h4 class="modal-title">Error</h4>
                </div>
                <div class="modal-body ">
                    <div class="modal-body" id="messageBody" style="padding:10px;font-size:15px;">
                      
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" onclick="labExModalClose()">Close</button>

                </div>
            </div>
        </div>





        
        <!-- Modal -->
        <!--<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
                    </div>
                    <div class="modal-body">
                        ...
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
                     
                    </div>
                </div>
            </div>
        </div>-->
       
        <div class="labExModal" id="labExEmailSentModalID" style="display: none;  position: absolute; z-index: 12000001; margin: auto; top: 0; left: 0; right: 0; bottom: 0; width: 400px;height:400px;">
            <div class="modal-content">
                <div class="modal-header">
                   
                    <h4 class="modal-title" id="myModalLabel">Email Your Performance Report</h4>
                </div>
                <div class="modal-body ">
                    <div class="modal-body" style="padding:10px;font-size:15px;">
                       Your report has been sent. A copy has been emailed to you for your records. 
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" ng-click="emailNotification()">Close</button>

                </div>
            </div>
        </div>







            <div class="col-sm-12">
                <div class="pull-left btn-group LabEx-Panel-state-minimized" id="LabExMinimizedId">
                    <p class="pull-left" style="color:#fff">LAB Ex ...</p>
                    <a href="#" class="btn btn-xs btn-default"><i class="fa fa-minus"></i></a> <a href="#" class="btn btn-xs btn-default" ng-click="maxLabExPanel()"><i class="fa fa-clone"></i></a> <a href="lab-exercises" ng-click="IsVisible()" class="btn btn-xs btn-default"><i class="fa fa-close"></i></a>
                </div>
            </div>

            <div class="col-sm-12">

                <div class="container-fluid main-full">
                    <div class="row">
                        <div class="panel panel-default" id="questionHtml" style="margin-bottom:0;">
                            <div class="col-xs-12 panel-heading">
                                <div class="col-xs-3" style="padding-left:5px;">
                                    {{activityTitle}}
                                </div>
                                <div class="col-xs-6 text-primary text-center">{{Title}}</div>
                                <div class="text-right col-xs-3" style="padding-right:5px;">
                                    Question <strong id="quizNo">{{quiznumber}}</strong> of {{TotalNumberofQuiz}}
                                </div>
                            </div>
                            <div class="panel-body" style="padding:2px;overflow:scroll">
                                <div id="textblock" style="margin: 80px 20px; display block;width:1200px;">
                                    <div style="margin: 20px;" ng-repeat="optionbox in LabExerciseModules.OptionBox" droppable="true" class="droppable ui-droppable options" id="blockbox-{{optionbox.BoxName}}">
                                        <div style="position:relative;" ng-bind-html="deliberatelyTrustDangerousSnippet(optionbox.QuizText)"></div>
                                    </div>
                                    <!--<ul>
                                    <li ng-repeat="optionbox in LabExerciseModules.OptionBox" droppable="true" ng-bind-html="'{{optionbox.QuizText}}' | to_trusted"></li>
                                </ul>-->
                                </div>
                                <div align="center" class="dragger">
                                    <!--<div class="col-sm-2" style="padding-top: 150px; height: 500px; " id="divleft" droppable="true">
                                    <div draggable="true" ng-repeat="option in LabExerciseModules.Options | filter:{'textalign':'left'}" ng-style="{'width': '150px', 'height':'40px','font-size':'8px;','valign':'middle','text-align':'center', 'vertical-align:middle','background-color': '#808080','margin':'10px !important','float':'{{option.textalign}}'} " style="margin-bottom: 10px !important; width: 180px; z-index:9;" class="thumbnail caption col-sm-2 col-lg-3  ui-draggable marginR5 " id="block-{{option.OptionNumber}}">{{option.OptionTitle}}</div>
                                </div>-->
                                    <div class="col-sm-12">
                                        <div style="position: relative;" id="imgdiv">
                                            <div id="imgblock">
                                                <img id="droppable" ng-src="content/images/LE/{{Imagepath}}" alt="" ng-click="onClick()" ondragstart="return false;" imageonload />
                                            </div>

                                            <div ng-show="IsVisible" ng-repeat="optionbox in LabExerciseModules.OptionBox" droppable="true" class="droppable ui-droppable options" id="blockbox-{{optionbox.BoxName}}" ng-style="{'top':{{optionbox.topcoord}}, 'left':{{optionbox.leftcoord}},'position': 'absolute',  'width': '155px', 'height':'30px', 'border':'0px solid #333', 'background': '#E8E8E8' }">{{optionbox.Answervalue}}</div>
                                            <div draggable="true" ng-repeat="ans in DraggedList" droppable="true" class="droppable ui-droppable answerdroppable" id="blockans-{{ans.id}}" draggedattr="{{ans.DraggedAttr}}" ng-style="{'top':{{ans.topcoord}}, 'left':{{ans.leftcoord}},'position': 'absolute',  'width': '158px', 'height':'30px', 'border':'0px solid #333', 'background': 'transparent','font-size': '12px','border-color':'#FF0000','padding-top':'4px','line-height':'1'}">{{ans.Value}}</div>
                                        </div>

                                        <div class="col-sm-12" style=" margin-top: 20px; min-height:100px;" id="divoptions" droppable="true">
                                            <!--<div class="col-sm-3 col-lg-3  ui-draggable" >-->
                                            <div draggable="true" ng-repeat="option in LabExerciseModules.Options" ng-style="{'width': '150px', 'height':'40px','font-size':'8px;','valign':'middle','text-align':'center', 'vertical-align:middle','background-color': '#808080','margin':'5px !important','float':'{{option.textalign}}'} " style="margin-bottom: 5px !important; width: 180px;" class="thumbnail caption col-sm-2 col-lg-3  ui-draggable marginR5 " id="block-{{option.OptionNumber}}">{{option.OptionTitle}}</div>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="col-sm-12" style="padding-top: 15px;min-height:100px;" id="divright" droppable="true">
                                <div draggable="true" ng-repeat="option in LabExerciseModules.Options" ng-style="{'width': '150px', 'height':'40px','font-size':'8px;','valign':'middle','text-align':'center', 'vertical-align:middle','background-color': '#808080','margin':'10px !important','float':'{{option.textalign}}'} " style="margin-bottom: 10px !important; width: 180px; z-index: 9;" class="thumbnail caption col-sm-2 col-lg-3  ui-draggable marginR5 " id="block-{{option.OptionNumber}}">{{option.OptionTitle}}</div>
                            </div>-->
                            </div>

                            <div class="panel-footer">
                                <div class="pull-left">
                                    <!--<p>Question <strong>{{quiznumber}}</strong> of {{TotalNumberofQuiz}}</p>-->
                                </div>
                                <div class="pull-right">
                                    <div class="btn-group pull-left marginR5">
                                        <button class="btn btn-sm btn-primary" style="display:none;" ng-click="SubmitAttempt()" id="quizSubmitBtn">Submit</button>
                                        <button class="btn btn-sm btn-primary" style="display:none;" id="reportBtn" ng-click="ReportGen()">Report</button>
                                        <button class="btn btn-sm btn-primary" id="saveBtn" ng-click="SaveAnswer()">Save</button>
                                        <button class="btn btn-sm btn-primary" id="reviewBtn" ng-click="ReviewAttempt()">Review Your Attempt</button>
                                        <button class="btn btn-sm btn-primary" id="resetBtn" ng-click="OnResetClick()">Reset</button>
                                    </div>
                                    <div class="btn-group">
                                        <button class="btn btn-sm btn-black" ng-click="prevQuiz()"><i class="fa fa-arrow-left"></i></button>
                                        <button class="btn btn-sm btn-black" ng-click="nextQuiz()"><i class="fa fa-arrow-right"></i></button>
                                    </div>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                    </div>


                    <div class="panel panel-default" id="submitResultHtml" style="display:none;">
                        <div class="panel-heading">
                            <div class="row">
                                <div class="col-sm-4 text-left"><strong>{{LabExerciseName}}</strong></div>
                                <div class="col-sm-4 text-center">Performance Report</div>
                                <div class="col-sm-4 text-right">Score:{{scoreResult}}% </div>
                            </div>
                        </div>
                        <div class="panel-body no-padding">
                            <div class="row">
                                <div class="col-sm-12 table-responsive ">
                                    <table class="table table-hover table-condensed bg-white" id="questionStatus">
                                        <thead>
                                            <tr class="active">
                                                <th class="text-center">Total Question</th>
                                                <th class="text-center">Correct Answers</th>
                                                <th class="text-center">Incorrect Answers</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr class="text-center">
                                                <td>{{TotalNumberofQuiz}}</td>
                                                <td>{{CorrectAnswer}}</td>
                                                <td>{{inCorrectAnswer}}</td>
                                            </tr>
                                        </tbody>
                                    </table>

                                </div>
                                <div class="col-sm-12 table-responsive">
                                    <table class="table table-hover table-condensed  bg-white">
                                        <thead>
                                            <tr class="active">
                                                <th>Question</th>
                                                <th>Activity Title</th>
                                                <th>Status</th>
                                                <th>Action</th>
                                            </tr>
                                        </thead>
                                        <tbody id="resultLabData"></tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <div class="panel-footer">
                            <div class="text-center">
                                <button class="btn btn-sm btn-primary" ng-click="sendMail()">
                                    Email
                                </button>

                            </div>
                            <div class="clearfix"></div>
                        </div>

                    </div>


                </div>
            </div>
        </div>



</div>