12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088 |
- @extends('layouts.master')
-
- @section('css')
- {{ HTML::style('vendor/jquery-ui-1.11.4.custom/jquery-ui.min.css') }}
- {{ HTML::style('vendor/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css') }}
- @stop
-
- @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')
-
-
-
-
-
-
-
-
-
-
- <div class="row">
- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
- <!-- For each grouped course -->
-
-
- <li role="presentation" class='first'>
- <a data-toggle="tab" href="#activity_1"
- role="tab">{{ strlen($activity_1->name) > 50 ? substr($activity_1->name, 0, 50) . '...' : $activity_1->name }}</a>
- </li>
- <li role="presentation">
- <a data-toggle="tab" href="#activity_2"
- role="tab">{{ strlen($activity_2->name) > 50 ? substr($activity_2->name, 0, 50) . '...' : $activity_2->name }}</a>
- </li>
-
-
- </ul>
- <div id="allLists" class="tab-content">
- <div role="tabpanel" class='tab-pane first' id="activity_1">
- <h3 style="text-align: center">Performance by Learning Outcome Criteria in {{ $activity_1->name }}</h3>
- <hr>
- <div class="col-md-9" id="graph_1"></div>
-
- </div>
-
- <div role="tabpanel" class='tab-pane' id="activity_2">
- <h3 style="text-align: center">Performance by Learning Outcome Criteria in {{ $activity_2->name }}</h3>
- <hr>
- <div class="col-md-9" id="graph_2"></div>
-
- </div>
-
- </div>
- </div>
- <div class="row">
-
- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
- <!-- For each grouped course -->
-
-
- <li role="presentation" class="first">
- <a data-toggle="tab" href="#activity_criteriaGraph_1"
- role="tab">{{ strlen($activity_1->name) > 50 ? substr($activity_1->name, 0, 50) . '...' : $activity_1->name }}</a>
- </li>
- <li role="presentation">
- <a data-toggle="tab" href="#activity_criteriaGraph_2"
- role="tab">{{ strlen($activity_2->name) > 50 ? substr($activity_2->name, 0, 50) . '...' : $activity_2->name }}</a>
- </li>
-
-
- </ul>
- <div id="allLists" class="tab-content">
- <div role="tabpanel" class='tab-pane first' id="activity_criteriaGraph_1">
- <h3 style="text-align: center">Criteria Achievement {{ $activity_1->name }}</h3>
- <hr>
- <div class="col-md-9" id="criteriaGraph_1">
-
- </div>
- </div>
- <div role="tabpanel" class='tab-pane' id="activity_criteriaGraph_2">
- <h3 style="text-align: center">Criteria Achievement {{ $activity_2->name }}</h3>
- <hr>
- <div class="col-md-9" id="criteriaGraph_2">
-
- </div>
- </div>
- </div>
- </div>
- <div class="row">
-
- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
- <!-- For each grouped course -->
-
-
- <li role="presentation" class="first">
- <a data-toggle="tab" href="#activity_tabla_1"
- role="tab">{{ strlen($activity_1->name) > 50 ? substr($activity_1->name, 0, 50) . '...' : $activity_1->name }}</a>
- </li>
- <li role="presentation">
- <a data-toggle="tab" href="#activity_tabla_2"
- role="tab">{{ strlen($activity_2->name) > 50 ? substr($activity_2->name, 0, 50) . '...' : $activity_2->name }}</a>
- </li>
-
-
- </ul>
- <div id="allLists" class="tab-content">
- <div role="tabpanel" class='tab-pane first' id="activity_tabla_1">
-
-
- <h3 style="text-align: center;">{{ $activity_1->name }} </h3>
-
- <br>
- <br>
- <h5 style="display: inline;">Date: </h5>
- <p style="display: inline;">
- <strong>({{ $activity_1->date }})</strong>
- </p>
- <br>
-
- <h5 style="display: inline;">Performance Indicators: </h5>
- <?php
- Log::info($activity_1->rubric[0]);
- ?>
- <p style="display: inline;"><i>{{ $activity_1->rubric[0]->num_scales }} (
- <?php
- $titles = $activity_1->rubric[0]->getTitles();
- ?>
- @if (sizeof($titles) != 1)
- @foreach ($titles as $index5 => $rubric_title)
- @if ($index5 != $activity_1->rubric[0]->num_scales - 1)
- {{ $rubric_title->text }},
- @else
- and {{ $rubric_title->text }}
- @endif
-
- @endforeach
- )
- @else
- {{ $titles[0]->text }} )
- @endif
- </i></p>
- <br>
- <h5 style="display: inline;">Scale: </h5>
- @if ($activity_1->rubric[0]->max_score == 1)
- <p style="display: inline;">1 point scale</p>
- @else
- <p style="display: inline;">1-{{ $activity_1->rubric[0]->max_score }} point scale</p>
-
- @endif
- <br>
- <br>
- <h4>Performance of Students by Learning Outcome Criteria</h4>
- <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_1->rubric[0]->expected_points }} or more</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_1->rubric[0]->expected_percentage }} %</i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Criterion
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
- <th>
- Learning Outcomes
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_1->allActivityCriterionInfo() as $index5 => $ac_criterion)
- <tr>
- <td> {{ $ac_criterion->name }}</td>
- <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity_1->id) }}
- </td>
- <td>
- {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity_1->id) }}
-
- </td>
- <?php
-
- $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity_1->id);
- $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity_1->id);
-
- $percentage = 'N/A';
- $activity_1->getOutcomeReport();
-
- ?>
- @if ($out_att == 0)
- <td class="col-md-1 danger">{{ $percentage }}</td>
-
- @else
- <?php
- $percentage = round(($out_ach / $out_att) * 100, 2);
- ?>
- @if ($percentage >= $activity_1->rubric[0]->expected_percentage)
- <td class="col-md-1 success">{{ $percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $percentage }}%</td>
-
- @endif
- @endif
- <td>
-
- @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
-
- {{ $index6 + 1 }}. <?php echo $outcome->name . "\n\n\n <br>"; ?>
-
-
-
- @endforeach
-
-
- </td>
- </tr>
- @endforeach
- </tbody>
-
- </table>
-
- <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
- <?php $formative_actions = $activity_1->formativeActionsWithCriteria(); ?>
- @if ($formative_actions)
- <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
- </u>
-
- <i>{{ $formative_actions[0]->description }}
- </i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Formative Action's Associated
- Criteria: </h5>
- <ul style=" margin:30px;">
- @foreach ($formative_actions as $criteria)
- <li> <i>{{ $criteria->name }} <i></li>
-
- @endforeach
- </ul>
- @endif
- <br>
-
- <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
- @if ($activity_1->assessment_comments != null)
-
-
- <p style="display: inline;">{{ $activity_1->assessment_comments }}</p>
- @endif
- <hr>
- <br>
-
- <h4>Performance of Students by Learning Outcome</h4>
-
- <h5 style="text-align: center;">{{ $activity_1->name }} </h5>
- <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
- <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by outcome: </h5>
- <p style="display: inline;"> <i>
- <?php
- $expected = DB::table('target_outcomes_program')
- ->where('program_id', $course->program_id)
- ->where('semester_id', $course->semester_id)
- ->first();
- if (!$expected) {
- $expected = 'It has not been defined in the annual plan';
- }
- else{
- $expected = $expected->expected_target;
- }
-
- ?>
- {{ $expected }}
-
- </i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Learning Outcome
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
-
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_1->getOutcomeReport() as $outcome)
- <tr>
- <td>
- {{ $outcome->name }}
- </td>
- <td>
- {{ $outcome->attempted }}
- </td>
- <td>
- {{ $outcome->achieved }}
- </td>
- @if ($outcome->percentage >= $expected)
- <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
-
- @endif
-
-
-
-
-
- </tr>
-
- @endforeach
- </tbody>
- </table>
-
- <br>
- <hr>
-
-
-
-
-
-
-
- </div>
- <div role="tabpanel" class='tab-pane' id="activity_tabla_2">
-
-
- <h3 style="text-align: center;">{{ $activity_2->name }} </h3>
-
- <br>
- <br>
- <h5 style="display: inline;">Date: </h5>
- <p style="display: inline;">
- <strong>({{ $activity_2->date }})</strong>
- </p>
- <br>
-
- <h5 style="display: inline;">Performance Indicators: </h5>
- <?php
- Log::info($activity_2->rubric[0]);
- ?>
- <p style="display: inline;"><i>{{ $activity_2->rubric[0]->num_scales }} (
- <?php
- $titles = $activity_2->rubric[0]->getTitles();
- ?>
- @if (sizeof($titles) != 1)
- @foreach ($titles as $index5 => $rubric_title)
- @if ($index5 != $activity_2->rubric[0]->num_scales - 1)
- {{ $rubric_title->text }},
- @else
- and {{ $rubric_title->text }}
- @endif
-
- @endforeach
- )
- @else
- {{ $titles[0]->text }} )
- @endif
- </i></p>
- <br>
- <h5 style="display: inline;">Scale: </h5>
- @if ($activity_2->rubric[0]->max_score == 1)
- <p style="display: inline;">1 point scale</p>
- @else
- <p style="display: inline;">1-{{ $activity_2->rubric[0]->max_score }} point scale</p>
-
- @endif
- <br>
- <br>
- <h4>Performance of Students by Learning Outcome Criteria</h4>
- <h5 style="text-align: center;">{{ $activity_2->name }} </h5>
- <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_2->rubric[0]->expected_points }} or more</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_2->rubric[0]->expected_percentage }} %</i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Criterion
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
- <th>
- Learning Outcomes
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_2->allActivityCriterionInfo() as $index5 => $ac_criterion)
- <tr>
- <td> {{ $ac_criterion->name }}</td>
- <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity_2->id) }}
- </td>
- <td>
- {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity_2->id) }}
-
- </td>
- <?php
-
- $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity_2->id);
- $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity_2->id);
-
- $percentage = 'N/A';
- $activity_2->getOutcomeReport();
-
- ?>
- @if ($out_att == 0)
- <td class="col-md-1 danger">{{ $percentage }}</td>
-
- @else
- <?php
- $percentage = round(($out_ach / $out_att) * 100, 2);
- ?>
- @if ($percentage >= $activity_2->rubric[0]->expected_percentage)
- <td class="col-md-1 success">{{ $percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $percentage }}%</td>
-
- @endif
- @endif
- <td>
-
- @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
-
- <?php echo $outcome->name . "\n\n\n <br>"; ?>
-
-
-
- @endforeach
-
-
- </td>
- </tr>
- @endforeach
- </tbody>
-
- </table>
-
- <h5 style="display: inline; margin:30px;">Formative Actions: </h5>
- <?php $formative_actions = $activity_2->formativeActionsWithCriteria(); ?>
- @if ($formative_actions)
- <p style="display: inline;"> <u>{{ $formative_actions[0]->at_text }}:
- </u>
-
- <i>{{ $formative_actions[0]->description }}
- </i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Formative Action's Associated
- Criteria: </h5>
- <ul style=" margin:30px;">
- @foreach ($formative_actions as $criteria)
- <li> <i>{{ $criteria->name }} <i></li>
-
- @endforeach
- </ul>
- @endif
- <br>
- <h5 style="display: inline; margin:30px;">Assessment Comments: </h5>
- @if ($activity_2->assessment_comments != null)
-
-
- <p style="display: inline;">{{ $activity_2->assessment_comments }}</p>
- @endif
- <hr>
- <br>
-
- <h4>Performance of Students by Learning Outcome</h4>
- <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
- <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by outcome: </h5>
- <p style="display: inline;"> <i>
- <?php
- $expected = DB::table('target_outcomes_program')
- ->where('program_id', $course->program_id)
- ->where('semester_id', $course->semester_id)
- ->first(); //->expected_target;
- if (!$expected) {
- $expected = 'It has not been defined in the annual plan';
- }
- else{
- $expected = $expected->expected_target;
- }
- ?>
- {{ $expected }}
- </i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Learning Outcome
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
-
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_2->getOutcomeReport() as $outcome)
- <tr>
- <td>
- {{ $outcome->name }}
- </td>
- <td>
- {{ $outcome->attempted }}
- </td>
- <td>
- {{ $outcome->achieved }}
- </td>
- @if ($outcome->percentage >= $expected)
- <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
-
- @endif
-
-
-
-
-
- </tr>
-
- @endforeach
- </tbody>
- </table>
-
- <br>
- <hr>
-
-
-
-
-
-
-
- </div>
- </div>
- </div>
-
- @stop
- @section('included-js')
- @include('global._datatables_js')
- <!-- HighCharts -->
- <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
- <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
-
- <!-- Datepicker -->
- <script src="{{ asset('vendor/jquery-ui-1.11.4.custom/jquery-ui.min.js') }}"></script>
-
- @stop
-
-
- @section('javascript')
- $(function() {
-
-
-
- $('#criteriaGraph_1').highcharts({
- chart: {
- type: 'bar',
- height:
- @if ($activity_1->is_assessed())
-
- {{ count($activity_1->criteria_achieved()) * 22 + 225 }}
- @else
- {{ 22 + 225 }}
- @endif,
- },
- title: {
- text: ' ',
- },
- xAxis: {
- categories: [
- @if ($activity_1->is_assessed())
- @foreach ($activity_1->criteria_achieved() as $id => $value)
- "{{ Criterion::withTrashed()->find($id)->name }}",
- @endforeach
- @endif
- ],
- labels: {
- style: {
- fontSize: '12px'
- },
- 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'
- },
- @if (isset($activity_1->rubric[0]) and isset($activity_1->rubric[0]->expected_percentage))
- plotLines:[{
- value:{{ $activity_1->rubric[0]->expected_percentage }},
- color: '#000',
- width:3,
- zIndex:4,
- label:{
- text: 'Goal ({{ $activity_1->rubric[0]->expected_percentage }}%)',
- style: {
- color: '#000',
- fontSize: '14px',
- }
-
- }
- }]
- @endif
- },
-
- 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.1
- },
- },
- series: [{
- type: 'column',
- name: 'Passed',
- color: '#e70033',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @if ($activity_1->is_assessed())
- @foreach ($activity_1->cap_array as $id => $crit)
-
- //This conditional is to ignore criteria that weren't assessed. These would have a value of null.
- @if ($crit->score_percentage)
- {{ $crit->score_percentage }},
- @else
- 0,
- @endif
- @endforeach
- @endif
- ],
- pointPadding: 0,
- }]
- });
-
- $('#criteriaGraph_2').highcharts({
- chart: {
- type: 'bar',
- height:
- @if ($activity_2->is_assessed())
-
- {{ count($activity_2->criteria_achieved()) * 22 + 225 }}
- @else
- {{ 22 + 225 }}
- @endif,
- },
- title: {
- text: ' ',
- },
- xAxis: {
- categories: [
- @if ($activity_2->is_assessed())
- @foreach ($activity_2->criteria_achieved() as $id => $value)
- "{{ Criterion::withTrashed()->find($id)->name }}",
- @endforeach
- @endif
- ],
- labels: {
- style: {
- fontSize: '12px'
- },
- 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'
- },
- @if (isset($activity_2->rubric[0]) and isset($activity_2->rubric[0]->expected_percentage))
- plotLines:[{
- value:{{ $activity_2->rubric[0]->expected_percentage }},
- color: '#000',
- width:3,
- zIndex:4,
- label:{
- text: 'Goal ({{ $activity_2->rubric[0]->expected_percentage }}%)',
- style: {
- color: '#000',
- fontSize: '14px',
- }
-
- }
- }]
- @endif
- },
-
- 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.1
- },
- },
- series: [{
- type: 'column',
- name: 'Passed',
- color: '#e70033',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @if ($activity_2->is_assessed())
- @foreach ($activity_2->cap_array as $id => $crit)
-
- //This conditional is to ignore criteria that weren't assessed. These would have a value of null.
- @if ($crit->score_percentage)
- {{ $crit->score_percentage }},
- @else
- 0,
- @endif
- @endforeach
- @endif
- ],
- pointPadding: 0,
- }]
- });
-
-
- $('#graph_1').highcharts({
- chart: {
- type: 'bar',
- },
- title: {
- text: ' '
- },
- 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_1) && array_key_exists($outcome->id, $outcomes_attempted_1) && $outcomes_attempted_1[$outcome->id] != 0)
- {{ ($outcomes_achieved_1[$outcome->id] / $outcomes_attempted_1[$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_1) && array_key_exists($outcome->id, $outcomes_attempted_1) && $outcomes_attempted_1[$outcome->id] != 0)
- {{ $outcome->expected_outcome }},
- @else
- 0,
- @endif
- @endforeach
- ],
- pointPadding: 0,
- }]
- });
-
- $('#graph_2').highcharts({
- chart: {
- type: 'bar',
- },
- title: {
- text:' '
- },
- 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_2) && array_key_exists($outcome->id, $outcomes_attempted_2) && $outcomes_attempted_2[$outcome->id] != 0)
- {{ ($outcomes_achieved_2[$outcome->id] / $outcomes_attempted_2[$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_2) && array_key_exists($outcome->id, $outcomes_attempted_2) && $outcomes_attempted_2[$outcome->id] != 0)
- {{ $outcome->expected_outcome }},
- @else
- 0,
- @endif
- @endforeach
- ],
- pointPadding: 0,
- }]
- });
-
- var chart = $('#graph_1').highcharts();
- var titletext = $('#graph_1').highcharts().options.title.text;
- var newtitletext = titletext.replace("'", "\'");
- chart.setTitle({
- text: newtitletext
- });
- var chart = $('#graph_2').highcharts();
- var titletext = $('#graph_2').highcharts().options.title.text;
- var newtitletext = titletext.replace("'", "\'");
- chart.setTitle({
- text: newtitletext
- });
- $('.first').each(function(){
- $(this).addClass('active');
- })
- // Include dummy graph for outcomes
- @include('global.dummy-outcomes')
-
-
- });
-
-
- @stop
-
- @section('included-js')
- @include('global._datatables_js')
- <!-- HighCharts -->
- <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
- <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
-
- <!-- Datepicker -->
- <script src="{{ asset('vendor/jquery-ui-1.11.4.custom/jquery-ui.min.js') }}"></script>
-
- @stop
|