123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664 |
- @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._new_navigation')
- @elseif($role == 2)
- @include('local.managers.sCoords._new_navigation')
- @elseif($role == 3)
- @include('local.managers.pCoords._new_navigation')
- @else
- @include('local.professors._navigation')
- @endif
- @stop
-
- @section('main')
-
- <!-- Edit Activity -->
- <div class="modal fade" id="modal-edit-activity">
- <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">Edit Activity</h4>
- </div>
- <div class="modal-body">
- {{ Form::open(['action' => ['ActivitiesController@update', $activity->id]]) }}
- <div class="form-group">
- {{ Form::label('name', 'Name') }}
- {{ Form::text('name', $activity->name, ['class' => 'form-control']) }}
- </div>
- <div class="form-group">
- {{ Form::label('description', 'Description') }}
- {{ Form::textarea('description', $activity->description, ['class' => 'form-control', 'rows' => 4, 'placeholder' => 'Minimum 10 characters']) }}
- </div>
-
- <div class="form-group">
- {{ Form::label('date', 'Date') }}
- {{ Form::text('date', $activity->date, ['id' => 'date', 'class' => 'form-control', 'maxLength' => 10]) }}
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <input class="btn btn-primary" name="update_activity_information" value="Save" type="submit" />
- {{ Form::close() }}
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
-
- <!-- Edit Transforming Actions -->
- <div class="modal fade" id="modal-edit-transforming-actions">
- <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">Edit Formative Actions</h4>
- </div>
- <div class="modal-body">
- {{ Form::open(['action' => ['TransformativeActionsController@postActivityCriterion', $activity->id]]) }}
-
-
- <p>A Formative Action is the educational action to be taken to address the criteria of an unachieved
- Learning Outcome.</p>
- <p>Una acción formativa es una acción educativa a tomarse para atender el o los criterios de un dominio
- dado que no se alcanzaron.</p>
-
- <h5>Choose criteria for the transforming action <br>
- Escoge los criterion para la acción transformadora</h5>
-
- <div class="form-group">
-
- {{ Form::label('select-activity-criterion', 'Criteria') }}
-
- <select id='select-activity-criterion' name="trans_act[]" data-count="1"
- class="form-control selectpicker" data-live-search='true'>
- @foreach ($activity_criterion as $ac)
- <option value='{{ $ac->id }}' selected>{{ $ac->name }}</option>
- @endforeach
- </select>
- </div>
-
-
- <button id='button-add-activity-criterion' class='btn btn-md btn-secondary'>
- <span class='glyphicon glyphicon-plus'>
-
- </span>
- Add another Criteria
- </button>
- <hr>
-
- <div class="form-group">
- {{ Form::label('name_trans', 'Name of Formative Actions') }}
- {{ Form::text('name_trans', '', ['class' => 'form-control']) }}
- </div>
-
- <div class="form-group">
- {{ Form::label('transforming_actions', 'Formative Actions') }}
- {{ Form::textarea('transforming_actions', $activity->transforming_actions, ['class' => 'form-control', 'rows' => 4, 'placeholder' => 'Actions to improve student performance after assessment (optional)']) }}
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <input class="btn btn-primary" name="update_transforming_actions" value="Save" type="submit" />
- {{ Form::close() }}
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
-
- <!-- Edit Transforming Actions -->
- <div class="modal fade" id="modal-edit-assessment-comments">
- <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">Edit Assessment Comments</h4>
- </div>
- <div class="modal-body">
- {{ Form::open(['action' => ['ActivitiesController@update', $activity->id]]) }}
-
- <p>Write any additional comments about this activity.</p>
- <p>Escriba cualquier comentario adicional sobre esta actividad.</p>
-
- <div class="form-group">
- {{ Form::label('assessment_comments', 'Assessment Comments') }}
- {{ Form::textarea('assessment_comments', $activity->assessment_comments, ['class' => 'form-control', 'rows' => 4, 'placeholder' => '(optional)']) }}
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <input class="btn btn-primary" name="update_assessment_comments" value="Save" type="submit" />
- {{ Form::close() }}
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
-
- <!-- Delete Activity Modal -->
- <div class="modal fade" id="modal-confirm-delete-activity">
- <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">Delete Activity</h4>
- </div>
- <div class="modal-body">
- <p>Deleting this activity will also delete any related assessment data. Do you want to continue?</p>
- </div>
- <div class="modal-footer">
- <!-- Confirm deletion (must use form, because Laravel needs to use the DELETE method) -->
- {{ Form::open(['action' => ['ActivitiesController@destroy', $activity->id], 'method' => 'delete']) }}
- <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
- <button class="btn btn-primary" type="submit">Delete</button>
- {{ Form::close() }}
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
-
- <!-- Delete Assessment Modal -->
- <div class="modal fade" id="modal-confirm-delete-assessment">
- <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">Delete Assessment</h4>
- </div>
- <div class="modal-body">
- <p>Are you sure you want to delete the assessment results?</p>
- </div>
- <div class="modal-footer">
- <!-- Confirm deletion (must use form, because Laravel needs to use the DELETE method) -->
- {{ Form::open(['action' => ['ActivitiesController@deleteAssessment']]) }}
- <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
- <input type="hidden" id="id" name="id" value="{{ $activity->id }}">
- <button class="btn btn-primary" type="submit">Delete</button>
- {{ Form::close() }}
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
-
- <div class="row">
- <div class="col-md-9" id="graph"></div>
- <div class="col-md-3">
- <div class="btn-group-vertical btn-block" role="group" aria-label="...">
-
- <!-- If semester is active, allow users to delete the activity -->
- @if (in_array($course->semester->id, $active_semesters))
- <button class="btn btn-primary btn-sm btn-block" btn-block data-toggle="modal"
- data-target="#modal-edit-activity">Edit Activity Information</button>
- @endif
-
- <!-- If no rubric is assigned and the semester is active -->
- @if (count($activity->rubric) == 0 && in_array($course->semester->id, $active_semesters))
- {{ HTML::linkAction('RubricsController@newRubric', 'Assign Rubric', [$activity->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}
- <!--{{ HTML::linkAction('RubricsController@newOtherMethod', 'Assign Other Assessment Method', [$activity->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}-->
- @else
- @if (count($activity->rubric) != 0)
- {{ HTML::linkAction('RubricsController@show', 'View Rubric', [$activity->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}
- @else
- <h5>No rubric associated to this activity</h5>
- @endif
- <!-- If semester is active, allow users to change rubrics -->
- @if (in_array($course->semester->id, $active_semesters))
- {{ HTML::linkAction('RubricsController@newRubric', 'Change Rubric', [$activity->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}
- @endif
-
- <!-- If there is no assessment and the semester is active -->
- @if (!$activity->is_assessed() && in_array($course->semester->id, $active_semesters))
- {{ HTML::linkAction('ActivitiesController@assess', 'Assess', [$activity->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}
- @else
- @if ($activity->is_assessed())
- {{ HTML::linkAction('ActivitiesController@viewAssessment', 'View Assessment Sheet', [$activity->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}
- @else
- <h5>No assessment associated to this activity</h5>
- @endif
-
- <!-- If semester is active, allow users to edit assessments -->
- @if (in_array($course->semester->id, $active_semesters))
- {{ HTML::linkAction('ActivitiesController@assess', 'Edit Assessment', [$activity->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}
- <button class="btn btn-primary btn-sm btn-block" btn-block data-toggle="modal"
- data-target="#modal-confirm-delete-assessment">Delete Assessment</button>
- <button class="btn btn-primary btn-sm btn-block" btn-block data-toggle="modal"
- data-target="#modal-edit-transforming-actions">Formative Actions</button>
- <button class="btn btn-primary btn-sm btn-block" btn-block data-toggle="modal"
- data-target="#modal-edit-assessment-comments">Assessment Comments</button>
- @endif
- @endif
- @endif
-
- <!-- If semester is active, allow users to delete the activity -->
- @if (in_array($course->semester->id, $active_semesters))
- <button class="btn btn-primary btn-sm btn-block" btn-block data-toggle="modal"
- data-target="#modal-confirm-delete-activity">Delete Activity</button>
- @endif
- {{ HTML::linkAction('CoursesController@show', 'Back to Section', [$course->id], ['class' => 'btn btn-primary btn-sm btn-block']) }}
- </div>
-
- <hr>
- <h5>Description</h5>
- <p>{{ $activity->description }}</p>
- <?php
- $formative_actions = $activity->formativeActionsWithCriteria();
- ?>
- @if ($formative_actions != null)
- <hr>
- <h5>Formative Actions</h5>
- <p><strong>{{ $formative_actions[0]->at_text }}: </strong> {{ $formative_actions[0]->description }}
- </p>
- <h5>Formative Action's Associated Criteria</h5>
- <ul>
- @foreach ($formative_actions as $criteria)
- <li>{{ $criteria->name }}</li>
- @endforeach
- </ul>
- @endif
-
- @if ($activity->assessment_comments != null)
- <hr>
- <h5>Assessment Comments</h5>
- {{ $activity->assessment_comments }}
- @endif
- </div>
- </div>
- <div class="row">
- <div class="col-md-12" id="criteriaGraph"></div>
- </div>
-
- <script>
- $('#button-add-activity-criterion').on('click', function(e) {
- e.preventDefault();
-
- options = $('#select-activity-criterion').html();
- counter = $('#select-activity-criterion').data('count');
-
- var div = $('<div/>', {
- 'id': "selectFor" + counter
-
- });
- var divForSelect = $('<div/>', {
- 'class': 'col-12 form-group'
- });
- var select = $('<select/>', {
- 'class': 'selectpicker',
- 'data-live-search':'true',
- 'name': 'trans_act[]',
-
- })
-
-
-
- var $button = $('<button/>', {
- 'type': 'button',
- 'class': 'btn btn-primary',
- 'onclick': '$(this).parent().parent().remove();$("#button-add-activity-criterion").show(); '
- }).html('X');
-
- divForSelect.append(select);
- divForSelect.append($button);
- div.append(divForSelect);
-
- $('#select-activity-criterion').parent().parent().after(div);
- select.html(options);
-
- refreshSelects();
-
- countSelects = $('.selectpicker').length;
- countOptions = $('#select-activity-criterion option').length;
- if (countOptions == countSelects) {
- $('#button-add-activity-criterion').hide();
- }
-
-
-
- });
-
- function refreshSelects() {
- $('.selectpicker').each(function() {
- $(this).selectpicker('refresh');
- });
- }
- $(document).ready(function() {
-
- if ({{ count($transformative_actions) }}) {
- var trans_actions = {{ json_encode($transformative_actions) }};
- //$('#select-activity-criterion').val(trans_actions[0].activity_id);
- $('#name_trans').val(trans_actions[0].at_text);
- $('#transforming_actions').val(trans_actions[0].description);
- refreshSelects();
-
- for (index in trans_actions) {
- if (index == 0) continue;
- $('#button-add-activity-criterion').click();
- }
- $('.selectpicker').each(function(index) {
- $(this).val(trans_actions[index].activity_criterion_id);
- });
- refreshSelects();
- }
- });
- </script>
- @stop
-
- @section('included-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 () {
-
- $('#date').datepicker({
- dateFormat: "yy-mm-dd"
- });
-
- string_for_format = "";
-
-
- $('#criteriaGraph').highcharts({
- chart: {
- type: 'bar',
- height:
- @if ($activity->is_assessed())
- {{ count($activity->criteria_achieved()) * 22 + 225 }}
- @else
- {{ 22 + 225 }}
- @endif
- ,
- },
- title: {
- text: 'Criteria Achievement',
- },
- xAxis: {
- categories: [
- @if ($activity->is_assessed())
- @foreach ($activity->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->rubric[0]) and isset($activity->rubric[0]->expected_percentage))
- plotLines:[{
- value:{{ $activity->rubric[0]->expected_percentage }},
- color: '#000',
- width:3,
- zIndex:4,
- label:{
- text: 'Goal ({{ $activity->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>'+
- '{point.outcomes}',
- //'<tr><td style="color:{series.color};padding:0">Learning Outcomes:</td>'+
-
- // '<td style="padding:0">{point.outcomes}, <br>Outcome2</td></tr>',
-
- // '<td style="padding:0">{point.outcomes}, <br>Outcome2</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->is_assessed())
- @foreach ($activity->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)
- {y: {{ $crit->score_percentage }}, outcomes: "{{ $crit->outcome_names_html }}"},
- @else
- {y:0, outcomes:"{{ $crit->outcome_names_html }}"},
- @endif
- @endforeach
- @endif
- ],
- pointPadding: 0,
- }
-
- ]
- });
-
- $('#graph').highcharts({
-
- chart: {
- type: 'bar',
- },
- title: {
- text: 'Performance by Learning Outcome Criteria in {{ $title }}'
- },
- xAxis: {
- categories: [
- @foreach ($outcomes as $outcome)
- @if( array_key_exists($outcome->id, $outcomes_activity) &&
- $outcomes_activity[$outcome->id] //&&
- //array_key_exists($outcome->id, $outcomes_attempted) &&
- //$outcomes_attempted[$outcome->id] != 0
- )
-
- <?php
- $attempted = $outcomes_activity[$outcome->id]->attempted;
- $achieved = $outcomes_activity[$outcome->id]->achieved;
- ?>
-
- @else
- <?php
- $attempted = 0;
- $achieved = 0;
- ?>
- @endif
- "{{ $outcome->name }}<br> (N = {{$attempted}} , {{$achieved}})",
-
- @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'
- },
- @if($activity->course->program->expected_outcome_target == null)
-
- plotLines:[{
- value:70.00,
- color: '#000',
- width:3,
- zIndex:4,
- label:{
- text: 'Goal (70.00%)',
- style: {
- color: '#000',
- fontSize: '14px',
- }
-
- }
- }]
-
- @else
- plotLines:[{
- value:{{$activity->course->program->expected_outcome_target->expected_target}},
- color: '#000',
- width:3,
- zIndex:4,
- label:{
- text: 'Goal ({{$activity->course->program->expected_outcome_target->expected_target}})',
- 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.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( array_key_exists($outcome->id, $outcomes_activity) &&
- $outcomes_activity[$outcome->id] && $outcomes_activity[$outcome->id]->attempted!=0)
- {{$outcomes_activity[$outcome->id]->achieved / $outcomes_activity[$outcome->id]->attempted * 100}}
- {{-- ($outcomes_achieved[$outcome->id] / $outcomes_attempted[$outcome->id]) * 100 --}},
- {{--@if (is_array($outcomes_attempted) && array_key_exists($outcome->id, $outcomes_attempted) && $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,
- } --}}]
- });
-
-
-
- var chart = $('#graph').highcharts();
- var titletext = $('#graph').highcharts().options.title.text;
- var newtitletext = titletext.replace("'", "\'");
- chart.setTitle({text: newtitletext});
-
- // Include dummy graph for outcomes
- @include('global.dummy-outcomes')
- });
-
- @stop
|