public function approve()
 {
     if (Request::ajax()) {
         $pending = PendingEnrollment::find(Input::get('id'));
         SectionCode::find($pending->section_code_id)->push('students_id', $pending->student_id, true);
         $pending->delete();
         return Response::json(array('code' => "00", 'stats' => MessageController::getStats()));
     }
 }
Esempio n. 2
0
@extends(Auth::user()->rank.'.master')
@section('content')
	<div class="content">
		<div class="row">
			<div class="panel-heading">
				@yield('header')
			</div>
		</div>
		<div class="row inbox">
			<div class="col-md-2 mail-left-box">
				<?php 
$stats = MessageController::getStats();
?>
				<a data-toggle="modal" data-target="#sendMessage" class="btn btn-block btn-compose btn-lg"><i class="fa fa-"></i>{{Lang::get('messages.compose')}}</a> 
				<div class="list-group inbox-options">
					<a href="{{Lang::get('routes.inbox')}}" class="list-group-item">
						<i class="fa fa-inbox"></i> {{Lang::get('messages.inbox')}} 
						@if($stats['inbox'] > 0)
							<span id="span_inbox" class="badge bg-primary">{{$stats['inbox']}}</span>
						@endif 
					</a> 
					<a href="{{Lang::get('routes.unread')}}"class="list-group-item">
						<i class="fa fa-bolt"></i> {{Lang::get('messages.unread')}} 
						@if($stats['unread'] > 0)
							<span id="span_unread" class="badge bg-primary">{{$stats['unread']}}</span> 
						@endif
					</a> 
					<a href="{{Lang::get('routes.mail_sent')}}" id="sent" class="list-group-item">
						<i class="fa fa-check-square-o"></i> {{Lang::get('messages.sent')}} 
						@if($stats['sent'] > 0)
							<span id="span_sent" class="badge  bg-primary">{{$stats['sent']}}</span> 
Esempio n. 3
0
 /**
  * Show all subjects of an University 
  * 
  * @return View
  */
 public function showAllSubjectsView()
 {
     return View::make('university.show_all_subjects')->with(array('subjects' => $this->getSubjects(), 'stats' => MessageController::getStats()));
 }
 /**
  *	Show all assigments view
  * 
  * @return View
  */
 public function showAllAssignmentsView()
 {
     return View::make('university.show_all_enrollment')->with(array('teachers' => TeacherController::getTeachers(), 'stats' => MessageController::getStats()));
 }
Esempio n. 5
0
 public function showApprovalStudentView()
 {
     $pending = PendingEnrollment::where('teacher_id', Auth::id())->get();
     if (count($pending) > 0) {
         return View::make('teacher.approval_student')->with(array('pending' => $pending, 'stats' => MessageController::getStats()));
     } else {
         return Redirect::to(Lang::get('routes.' . Auth::user()->rank));
     }
 }