123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- @extends('layouts.master')
-
- @section('navigation')
- @if($role==1)
- @include('local.managers.admins._navigation')
- @elseif($role==2)
- @include('local.managers.sCoords._navigation')
- @elseif($role==3)
- @include('local.managers.pCoords._navigation')
- @else
- @include('local.professors._navigation')
- @endif
- @stop
-
- @section('main')
-
- <!-- New Activity Modal -->
- <div class="modal fade" id="newActivityModal" tabindex="-1" role="dialog" aria-labelledby="newActivityModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-sm">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
- <h4 class="modal-title" id="newActivityModalLabel">New Activity</h4>
- </div>
- <div class="modal-body">
- {{ Form::open(array('action' => array('ActivitiesController@create', $course->id))) }}
- <div class="form-group">
- {{ Form::label('name', 'Name') }}
- {{ Form::text('name', Input::old('name'), array('class' => 'form-control')) }}
- </div>
- <div class="form-group">
- {{ Form::label('description', 'Description') }}
- {{ Form::textarea('description', Input::old('description'), array('class' => 'form-control', 'rows'=> 5, 'placeholder'=>'Minimum 10 characters')) }}
- </div>
- <div class="btn-group" role="group">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <button type="submit" class="btn btn-default btn-primary">Submit</button>
- </div>
- {{ Form::close() }}
- </div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <p>{{$course->name}}</p>
-
- </div>
- </div>
-
- <div id="dummy-graph-container" class="row">
- @if(is_array($outcomes_attempted))
- <div class="col-md-12" id="graph"></div>
- @else
- <div id="overlay"><h2>No Data</h2></div>
- <div class="col-md-12" id="dummy"></div>
- @endif
- </div>
-
-
-
- <div class="row">
- <div class="col-md-7">
- <h3>Activities</h3>
-
- @if(!$activities->isEmpty())
-
- @if (in_array($course->semester->id, $active_semesters))
- <button data-toggle="modal" data-target="#newActivityModal" class="btn btn-sm btn-default pull-right"> New Activity</button>
- @endif
-
- <table class="table table-striped table-condensed">
- <thead>
- <tr>
- <th>Name</th>
- <th>Date</th>
- <th>Updated</th>
- <th>Assessed</th>
- <th>Published</th>
- <th>Diagnostic</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($activities as $activity)
- <tr>
- <td>{{ link_to_action('ActivitiesController@show', $activity->name, $parameters = array('id'=>$activity->id)) }}</td>
- <td>{{ date('M d, Y', strtotime($activity->date)) }}</td>
- <td>{{ date('M d, Y', strtotime($activity->updated_at)) }}</td>
- <td>
- @if($activity->o_att_array)
- <span class="glyphicon glyphicon-ok"></span>
- @endif
- </td>
- <td>
- @if($activity->o_att_array && !$activity->draft && !$activity->diagnostic)
- <span class="glyphicon glyphicon-ok"></span>
- @endif
- </td>
- <td>
- @if($activity->o_att_array && !$activity->draft && $activity->diagnostic)
- <span class="glyphicon glyphicon-ok"></span>
-
- @endif
- </td>
- </tr>
- @endforeach
-
- @if (!in_array($course->semester->id, $active_semesters))
- <tr>
- <td colspan="3"><div class="alert alert-info">The semester for this course is inactive. You cannot create any more activities.</div></td>
- </tr>
- @endif
- </tbody>
- </table>
-
- <p>Unplublished activity results are <strong>not considered</strong> in the graph above.</p>
-
- @else
- <div class="alert alert-info">
- @if(in_array($course->semester->id, $active_semesters))
- <p>
- No activities.
- <a data-toggle="modal" data-target="#newActivityModal">
- Create one.
- </a>
- </p>
- @else
- <p>The semester for this course is inactive. You cannot create any activities.</p>
- @endif
- </div>
- @endif
-
- <button class="btn-lg btn-primary" style="margin:5px;" data-toggle="modal" data-target="#compareActivities">Compare Activities</button>
- <div class="modal fade" id="compareActivities">
- <div class="modal-dialog modal-sm">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title">Compare Two Activities</h4>
- </div>
- <div class="modal-body">
-
-
- <p></p>
-
- <h5>Select two activities to compare and present their data. <br></h5>
-
- <div class="form-group">
-
- <label>Activity 1</label>
-
- <select id='select-activity-1' data-count = "1" class="form-control selectpicker" >
- @foreach ($activities as $activity)
- @if($activity->is_assessed())
- <option value='{{$activity->id}}' >{{$activity->name}}</option>
- @endif
- @endforeach
- </select>
- <hr>
- <label>Activity 2</label>
-
- <select id='select-activity-2' data-count = "1" class="form-control selectpicker" >
- @foreach ($activities as $activity)
- @if($activity->is_assessed())
- <option value='{{$activity->id}}' >{{$activity->name}}</option>
- @endif
- @endforeach
- </select>
- <hr>
- </div>
-
-
-
-
-
-
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <button type ="button" class= 'btn btn-primary' onclick ="goToURL()"
- @if(!count($activities))
- disabled
- @endif
- >Compare</button>
- {{ Form::close() }}
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div>
- </div>
-
- <div class="col-md-5">
- <h3>Students</h3>
- @if(!$students->isEmpty())
-
- <!-- If any section is assessed -->
- @if($course->outcomes_attempted!=NULL)
- {{ HTML::linkAction('CoursesController@exportGrades', 'Export grades to CSV file', array('id'=>$course->id), array('class'=>'btn btn-default btn-sm pull-right')) }}
- @endif
-
-
- <table class="table table-striped table-condensed">
- <thead><tr>
- <th></th>
- <th>Name</th>
- <th>Number</th>
- <th>School</th>
- <th>Major</th>
- </tr></thead>
- <tbody>
- @foreach ($students as $i => $student)
- <?php $formatted_student_number = substr($student->number, 0, 3).'-'.substr($student->number, 3, -4).'-'.substr($student->number, 5, 8); ?>
- <tr>
- <td>{{$i+1}}</td>
- <td><a href="{{ URL::action('StudentsController@show', array('semester'=>$course->semester_id, 'id'=>$course->code.$course->number.'-'.$course->section, 'number'=>$student->number)) }}">{{ $student->name }}</a></td>
- <td>{{ $formatted_student_number }}</td>
- <td>{{ $student->school_code }}</td>
- <td>{{ $student->conc_code }}</td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @else
- <div class="alert alert-info"><p>No students. <a href=""></a></p></div>
- @endif
- </div>
- </div>
- <script>
- function goToURL(){
- activity1 = $('#select-activity-1').val();
- activity2 = $('#select-activity-2').val();
- if(activity1 && activity2)
- window.open('../compare_activities/'+activity1+'/'+activity2,'_self');
-
- }
- </script>
- @stop
-
- @section('included-js')
-
- <!-- HighCharts -->
- <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
- <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
-
- @stop
-
- @section('javascript')
- $(function () {
- $('#graph').highcharts({
- chart: {
- type: 'bar'
- },
- title: {
- text: 'Performance by Learning Outcome Criteria in {{ $title }}'
- },
- xAxis: {
- categories: [
- @foreach($outcomes as $outcome)
- "{{{ $outcome->name }}}",
- @endforeach
- ],
- labels: {
- style: {
- fontSize:'11px'
- },
- step:1,
- useHTML:true,
- formatter: function() {
- return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
- },
- }
- },
- yAxis: {
- min: 0,
- max: 100,
- title: {
- text: 'Percentage'
- }
- },
- tooltip: {
- headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
- pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
- '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
- footerFormat: '</table>',
- shared: true,
- useHTML: true
- },
- plotOptions: {
- bar: {
- //grouping: false,
- shadow: false,
- borderWidth: 0,
- },
- series: {
- pointPadding: 0,
- groupPadding: 0.075
- },
- },
- series: [{
- name: 'Obtained Value',
- color: '#e70033',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y:-1
- },
- data:[
- @foreach($outcomes as $index => $outcome)
- @if(
- is_array($outcomes_attempted)
- && array_key_exists($outcome->id, $outcomes_attempted)
- && array_key_exists($outcome->id, $outcomes_achieved)
- && $outcomes_attempted[$outcome->id]!=0)
- {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
- @else
- 0,
- @endif
- @endforeach
-
- ],
- pointPadding: 0,
- }, {
- name: 'Expected Value',
- color: '#555555',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y:-1
- },
- data: [
- @foreach($outcomes as $index => $outcome)
- @if(
- is_array($outcomes_attempted)
- && array_key_exists($outcome->id, $outcomes_attempted)
- && $outcomes_attempted[$outcome->id]!=0)
- {{{ $outcome->expected_outcome }}},
- @else
- 0,
- @endif
- @endforeach
- ],
- pointPadding: 0,
-
- }]
- });
-
- // Include dummy graph for outcomes
- @include('global.dummy-outcomes')
- });
-
- @stop
|