@extends('layouts.master')
@section('navigation')
@if(Auth::user()->role==1)
@include('local.managers.admins._navigation')
@elseif(Auth::user()->role==2)
@include('local.managers.sCoords._new_navigation')
@elseif(Auth::user()->role==3)
@include('local.managers.pCoords._new_navigation')
@endif
@stop
@section('main')
Click on the values you want to change. Invalid values will be rejected automatically. To save your changes, click the 'Save' button at the bottom of the page.
Learning Outcome |
Definition |
Expected Value |
@foreach ($outcomes as $outcome)
{{ $outcome->name }} |
{{ $outcome->definition }} |
{{ $outcome->expected_outcome }} |
@endforeach
@stop
@section('javascript')
$('button').on('click', function(e)
{
e.preventDefault();
var outcomeArray= new Array();
// For each learning outcome, get its value and put it into an array
$('tbody tr').each(function( index )
{
var outcomeObject = new Object();
outcomeObject.id= $(this).data('id');
outcomeObject.name= $(this).children('.name').text();
outcomeObject.definition= $(this).children('.definition').text();
outcomeObject.expected_outcome= $(this).children('.expected-outcome').text();
if($(this).find('.glyphicon-eye-close').length>0)
{
outcomeObject.delete=1;
}
else
outcomeObject.delete=0;
var clone = jQuery.extend({}, outcomeObject);
outcomeArray.push(clone);
});
$.post(
"{{ URL::action('OutcomesController@update') }}",
{ outcomeArray: JSON.stringify(outcomeArray)},
function(data)
{
location.reload();
}
);
});
$('span').on('click', function()
{
if($(this).hasClass('glyphicon-eye-open'))
$(this).removeClass('glyphicon-eye-open').addClass('glyphicon-eye-close');
else
$(this).removeClass('glyphicon-eye-close').addClass('glyphicon-eye-open');
});
@stop