@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')
Create
{{ Form::open(array('action' => 'CriteriaController@create')) }}
{{ Form::label('outcome_id', 'Associated Learning Outcome') }}
{{ Form::label('name', 'Name') }} {{ Form::text('name', '', array('class' => 'form-control')) }}
{{ Form::label('description12', 'Beginning (1-2)') }} {{ Form::textarea('description12', '', array('class' => 'form-control', 'rows'=>2)) }}
{{ Form::label('description34', 'In Progress (3-4)') }} {{ Form::textarea('description34', '', array('class' => 'form-control', 'rows'=>2)) }}
{{ Form::label('description56', 'Satisfactory (5-6)') }} {{ Form::textarea('description56', '', array('class' => 'form-control', 'rows'=>2)) }}
{{ Form::label('description78', 'Excellent (7-8)') }} {{ Form::textarea('description78', '', array('class' => 'form-control', 'rows'=>2)) }}
{{ Form::submit('Create', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }}
Edit
{{ Form::open(array('action' => 'CriteriaController@update')) }}
{{ Form::label('criterion_id', 'Criterion') }}
{{ Form::label('assoc_outcome_id', 'Associated Learning Outcome') }}
{{ Form::label('name', 'Name') }} {{ Form::text('name', Input::old('name'), array('class' => 'form-control', 'id'=>'criterion_name')) }}
{{ Form::label('description12', 'Beginning (1-2)') }} {{ Form::textarea('description12', Input::old('description12'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description12')) }}
{{ Form::label('description34', 'In Progress (3-4)') }} {{ Form::textarea('description34', Input::old('description34'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description34')) }}
{{ Form::label('description56', 'Satisfactory (5-6)') }} {{ Form::textarea('description56', Input::old('description56'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description56')) }}
{{ Form::label('description78', 'Excellent (7-8)') }} {{ Form::textarea('description78', Input::old('description78'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description78')) }}
{{ Form::submit('Update', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }}
Change Status

Use this form to deactivate or reactivate criteria. Inactive criteria will stay in the system, but will not be available to use in new rubrics.

{{ Form::open(array('action' => 'CriteriaController@destroy', 'method'=>'delete')) }}
{{ Form::label('criterion_id', 'Criterion') }}
{{ Form::label('status', 'Status') }}

{{ Form::submit('Change', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }}

CriterionBeginning (1-2)In Progress (3-4)Satisfactory (5-6)Excellent (7-8)

Select a Learning Outcome to view its criteria.

@stop @section('javascript') // -------------------------------------------------------------------------- // Page load // -------------------------------------------------------------------------- // Hide accordion panel contents by default $('.panel-group .panel-body').hide(); $('#outcome-display').parent().hide(); fetchOutcomeForEditing(); fetchCriterionForEditing(); setCriterionStatus(); // -------------------------------------------------------------------------- // Functions // -------------------------------------------------------------------------- // Fetch outcome info for editing function fetchOutcomeForEditing() { var id = $('#select-outcome').find(':selected').val(); $.post( "{{ URL::action('OutcomesController@fetchOutcome') }}", { id: id }, function(json) { var name = json.outcome.name; var definition = json.outcome.definition; //Display title and definition $('#outcome_name').val(name); $('#outcome_definition').text(definition); }, 'json' ); } // Fetch criterion info for editing function fetchCriterionForEditing() { var id = $('#select-criterion').find(':selected').val(); $.post( "{{ URL::action('CriteriaController@fetchCriterionWithTrashed') }}", { id: id }, function(json) { var name = json.name; var description12 = json.description12; var description34 = json.description34; var description56 = json.description56; var description78 = json.description78; // Display title and definition $('#criterion_name').val(name); $('#criterion_description12').text(description12); $('#criterion_description34').text(description34); $('#criterion_description56').text(description56); $('#criterion_description78').text(description78); // Select associated outcome $('#assoc_outcome_id').val(json.outcome_id); }, 'json' ); } // Set criterion status function setCriterionStatus() { $('#select-criterion-with-status').find(':selected').data('status') switch($('#select-criterion-with-status').find(':selected').data('status')) { case 1: $('#status').text('Inactive'); break; default: $('#status').text('Active'); break; } } // -------------------------------------------------------------------------- // Events // -------------------------------------------------------------------------- // When panel heading is clicked, toggle it $('.panel-group .panel-heading').on('click', function() { $(this).next().stop().slideToggle(); }) // When list item is clicked, load corresponding info $('.list-group-item').on('click', function() { var id = $(this).data('outcome-id'); $.post( "{{ URL::action('OutcomesController@fetchOutcome') }}", { id: id }, function(json) { var name = json.outcome.name; var definition = json.outcome.definition; var criteria =json.outcome.criteria; var deleted = json.outcome.deleted_at; $('#outcome-display').parent().show(); $('.no-outcome').parent().hide(); //Display title and definition $('#outcome-display .panel-title').html(name); $('#outcome-display .outcome-definition').html(definition); //Empty table body $('tbody').empty(); if(criteria.length>0) { $('table').show(); $.each(criteria, function(index, value) { $('tbody').append(''+value.name+''+value.description12+''+value.description34+''+value.description56+''+value.description78+''); }); } else { $('table').hide(); } }, 'json' ); }); // When list item is clicked, load corresponding info $('#select-outcome').on('change', function() { fetchOutcomeForEditing(); }); // When list item is clicked, load corresponding info $('#select-criterion').on('change', function() { fetchCriterionForEditing(); }); // When list item is clicked, load corresponding info $('#select-criterion-with-status').on('change', function() { setCriterionStatus(); }); @stop