123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- @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')
- <div class="row">
- <div class="col-md-12">
- <div class="btn-group pull-right">
- {{ HTML::linkAction('ActivitiesController@show', 'Back to Activity', array($activity->id), array('class'=>'btn btn-default')) }}
- {{ HTML::linkAction('RubricsController@printview', 'Print', array($activity->id, $rubric->id), array('class'=>'btn btn-default')) }}
- </div>
- <p id="course">Course: {{{ $course->code }}} {{{ $course->number }}}</p>
- <p id="section">Section: {{{ $course->section }}}</p>
- <p id="activity" data-activity-id="{{{ $activity->id }}}">Activity: {{{ $activity->name}}} </p>
- <p>Passing Criteria:
- <span id="expected_percentage">{{{ $rubric->expected_percentage }}}% of students must obtain at least </span>
- <span id="expected_points">{{{$rubric->expected_points}}}</span> points
- </p>
-
- <table class="table table-striped table-condensed">
- <thead>
- <tr>
- <th></th>
- <th>Criterion</th>
- <th>Beginning (1-2)</th>
- <th>In Progress (3-4)</th>
- <th>Good (5-6)</th>
- <th>Excellent (7-8)</th>
- <th>Learning Outcome</th>
- </tr>
- </thead>
- <tbody>
- @foreach(json_decode($rubric->contents) as $index => $criterion)
- <tr data-criterion-copyright="{{ $criterion->copyright }}" data-criterion-notes="{{ $criterion->notes }}">
- <td>{{ $index + 1 }}.</td>
- @if(isset($criterion->notes))
- <td>
- <span><em data-toggle="tooltip" data-placement="top" title="{{ $criterion->notes }}">{{{ $criterion->name }}}</em></span>
- <sup></sup>
- @if(property_exists($criterion, 'subcriteria'))
- <ul class="list-unstyled">
- @foreach($criterion->subcriteria as $subcriterion)
- <li>{{ $subcriterion }}</li>
- @endforeach
- </ul>
- @endif
- </td>
- @else
- <td>
- <span>{{{ $criterion->name }}}</span><sup></sup>
- @if(property_exists($criterion, 'subcriteria'))
- <ul class="list-unstyled">
- @foreach($criterion->subcriteria as $subcriterion)
- <li>{{ $subcriterion }}</li>
- @endforeach
- </ul>
- @endif
- </td>
- @endif
- <td>{{ nl2br($criterion->description12) }}</td>
- <td>{{ nl2br($criterion->description34) }}</td>
- <td>{{ nl2br($criterion->description56) }}</td>
- <td>{{ nl2br($criterion->description78) }}</td>
- <td>{{ Outcome::where('id', $criterion->outcome_id)->first()->name }}</td>
- </tr>
- @endforeach
- </tbody>
- </table>
-
-
- <div id="copyright-info">
- <hr>
- <p class="small"><strong>Copyright Information</strong></p>
- <ul id="copyright-list" class="list-unstyled small">
- </ul>
- <hr>
- </div>
- </div>
- </div>
- @stop
-
-
- @section('javascript')
-
- // --------------------------------------------------------------------------
- // Page load
- // --------------------------------------------------------------------------
-
- buildCopyrightList();
-
- // --------------------------------------------------------------------------
- // Functions
- // --------------------------------------------------------------------------
-
- // Build list from copyright info in rubric
- function buildCopyrightList()
- {
- // Empty the copyright list
- $('#copyright-list').empty();
-
- $('tbody tr').each(function( index )
- {
- var criterion = $(this);
- // If there's copyright info (in this particular view, it checks for empty strings)
- if(criterion.data('criterion-copyright')!='')
- {
- // console.log('Copyright for index '+index+' not null.');
- var copyright = criterion.data('criterion-copyright');
-
- // If there is anything in the copyright list
- if($('#copyright-list li').length>0)
- {
- // console.log('In index '+index+', copyright list not empty.');
-
- // Check copyright list for the same copyright text
- var found = false;
- $('#copyright-list li').each(function()
- {
- // If found, give the string its number
- if(copyright==$(this).find('span').text())
- {
- // console.log('In index '+index+', matching copyright test found.');
- copyrightNumber = Number.parseInt($(this).find('sup').text());
- // console.log('In index '+index+', the matching number is '+copyrightNumber);
-
- // console.log('In index '+index+', text is'+ criterion.children('td:nth-child(1)').text());
-
- criterion.children('td:nth-child(2)').find('sup').text(copyrightNumber);
- found =true;
-
- //to break
- return false;
- }
- });
-
- // Otherwise, give it the next number and append a new item to the
- // list
- if(!found)
- {
- // console.log('In index '+index+', matching copyright test NOT found.');
- var copyrightNumber = $('#copyright-list li').length+1;
- criterion.children('td:nth-child(2)').find('sup').text(copyrightNumber);
- $('#copyright-list').append('<li><sup>'+copyrightNumber+' </sup><span>'+copyright+'<span></li>');
- }
- }
- // Otherwise, give it number 1 and append it
- else
- {
- // // console.log('In index '+index+', copyright list is empty.');
-
- criterion.children('td:nth-child(2)').find('sup').text('1');
- $('#copyright-list').append('<li><sup>1 </sup><span>'+copyright+'<span></li>');
- }
- }
- });
-
- if($('#copyright-info li').length>0)
- {
- $('#copyright-info').show();
- }
- else
- {
- $('#copyright-info').hide();
- }
- }
-
- @stop
|