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.
ID
Learning Outcome
Definition
Expected Value
Activation date
Deactivation date
Level 1:undergrad, 2:grad, 3:both
Equivalent to
@foreach ($outcomes as $outcome)
{{-- @foreach ($semesters as $semester) --}}
{{-- display an outcome only if it is part of a currently selected semester --}}
@if ($outcome->deactivation_date == '0000-00-00' or $outcome->deactivation_date == '')
{{-- and ($outcome->activation_date >= $semester->start && $outcome->activation_date <= $semester->end)) --}}
{{ $outcome->id }}
{{ $outcome->name }}
{{ $outcome->definition }}
{{ $outcome->expected_outcome }}
{{ $outcome->activation_date }}
{{ $outcome->deactivation_date }}
{{ $outcome->level }}
@endif
{{-- @endforeach --}}
@endforeach
@foreach ($outcomes as $outcome)
{{-- @foreach ($semesters as $semester) --}}
{{-- display an outcome only if it is part of a currently selected semester --}}
@if ($outcome->deactivation_date != '0000-00-00' and $outcome->deactivation_date != '')
{{-- and ($outcome->deactivation_date != '0000-00-00') and ($outcome->deactivation_date != '')) --}}
{{ $outcome->id }}
{{ $outcome->name }}
{{ $outcome->definition }}
{{ $outcome->expected_outcome }}
{{ $outcome->activation_date }}
{{ $outcome->deactivation_date }}
{{ $outcome->level }}
{{ $outcome->new_outcome_id }}
@endif
{{-- @endforeach --}}
@endforeach
Add a new Learning Outcomes
{{-- For for adding a new outcome --}}
{{ Form::open(['action' => 'OutcomesController@create']) }}
Due to technical limitationss, the following must be edited after adding the new Outcome:
{{-- the technical limitation is: the Outcome Model has to be edited --}}
Expected Outcome
Activation Date
Deactivation Date
Level
{{ Form::close() }}
@stop
@section('javascript')
@foreach ($outcomes as $outcome)
$('#del{{ $outcome->id }}').on('click', function(e)
{
e.preventDefault();
//outcomeObject.id= $(this).data('id');
if(confirm("Are you sure you want to delete the outcome with id {{ $outcome->id }}"))
{
console.log("si");
var outcomeObject = new Object();
outcomeObject.id= {{ $outcome->id }};
outcomeObject.delete=1;
console.log("algo"+JSON.stringify({{ $outcome->id }}));
console.log("algo"+JSON.stringify(outcomeObject));
var clone = jQuery.extend({}, outcomeObject);
// outcomeArray.push(clone);
// console.log("algo"+JSON.stringify(outcomeArray));
$.post(
"{{ URL::action('OutcomesController@delete') }}",
{ outcomeArray: JSON.stringify(outcomeObject)},
function(data)
{
location.reload();
}
);
}
else
{
console.log("no");
// outcomeObject.delete=0;
}
});
@endforeach
$('#new_outcome_form').hide();
//show form
$('#show').on('click', function(e)
{
$('#new_outcome_form').show();
$('#show').hide();
});
//hide form
$('#hide').on('click', function(e)
{
$('#new_outcome_form').hide();
$('#show').show();
});
$('#save').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();
outcomeObject.activation_date= $(this).children('.activation-date').text();
outcomeObject.deactivation_date= $(this).children('.deactivation-date').text();
outcomeObject.level= $(this).children('.level').text();
if($(this).children('.new_outcome_id').text()!="")outcomeObject.new_outcome_id= $(this).children('.new_outcome_id').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@updateMore') }}",
{ 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