/**
  * set up start
  */
 public function setUp()
 {
     parent::setUp();
     Session::start();
     // $this->mock = Mockery::mock('\App\Group');
     $this->id_test = Module::all()->first()->id;
 }
Пример #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $matieres = Matiere::all();
     $profs = Enseignant::activeEnseignants();
     $promos = Promo::activePromos();
     $modules = Module::all();
     return View('app/gestion_matieres', ['matieres' => $matieres, 'profs' => $profs, 'promos' => $promos, 'modules' => $modules]);
 }
Пример #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request)
 {
     $modules = Module::all();
     if ($modules) {
         return $this->respondWithCollection($modules, new ModuleTransformer());
     }
     return $this->errorNotFound('No modules found');
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $rows = Module::all();
     //$rows = Module::get()->sorted()->paginate();
     $table = Table::create($rows);
     // Generate a Table based on these "rows"
     return view('importmodules.index', compact('table'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $etudiants_count = Etudiant::count();
     $enseignants_count = Enseignant::count();
     $absences_count = Absence::count();
     $matieres_count = Matiere::count();
     $etudiants = Etudiant::etudiants_plus_3_absences();
     $modules = Module::all();
     foreach ($modules as $key) {
         $key->nbreAbsencesByModule();
     }
     return View('app/statistiques_module', ['etudiants_count' => $etudiants_count, 'enseignants_count' => $enseignants_count, 'absences_count' => $absences_count, 'matieres_count' => $matieres_count, 'etudiants' => $etudiants, 'modules' => $modules]);
 }
Пример #6
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $feature = Feature::find($id);
     $features = Feature::where('module_id', '=', $feature->module_id)->get();
     $modules = Module::all();
     $routeCollection = \Route::getRoutes();
     $routes = array();
     $jsroute = json_decode($feature->url_action);
     $routeselect = array();
     $routes += array("#" => "#");
     if ($jsroute != NULL) {
         foreach ($jsroute as $route) {
             $routeselect += array($route => $route);
         }
     } else {
         $routeselect = array($feature->url_action => $feature->url_action);
     }
     foreach ($routeCollection as $value) {
         if ($value->getName() != null) {
             $routes += array($value->getName() => $value->getName());
         }
     }
     if (is_null($feature)) {
         return redirect()->route('features.listfeature');
     }
     return View('features.editfeature', compact('feature', 'features', 'modules', 'routes', 'routeselect'));
 }
Пример #7
0
 public function getPermission($id)
 {
     $group = Group::findOrFail($id);
     $features = $group->feature()->get();
     $featurecheck = array();
     foreach ($features as $key => $value) {
         array_push($featurecheck, $value->id);
     }
     $modules = Module::all();
     return view('groups.permission', compact('modules', 'featurecheck', 'group'));
 }
Пример #8
0
 public function exportModules()
 {
     $modules = Module::all();
     Storage::put('packages.json', json_encode($modules, JSON_PRETTY_PRINT));
 }
Пример #9
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $modules = Module::all();
     $enseignants = Enseignant::all();
     return View('app/gestion_modules', ['modules' => $modules, 'enseignants' => $enseignants]);
 }
Пример #10
0
 /**
  * Show the form for editing the specified Role.
  * @param  int $id
  * @return Response
  */
 public function edit($id)
 {
     $role = $this->roleRepository->find($id);
     if (empty($role)) {
         Flash::error('Role not found');
         return redirect(route('roles.index'));
     }
     $modules = \App\Module::all();
     $modules = \App\Module::orderBy('slug')->get();
     $roleLocal = Sentinel::findRoleById($id);
     foreach ($modules as $module) {
         foreach ($module->actions as $action) {
             $items[] = $module->slug . "." . $action->slug;
             if ($roleLocal->hasAccess([$module->slug . "." . $action->slug])) {
                 $itemsOk[] = $module->slug . "." . $action->slug;
             }
         }
     }
     return view('roles.edit', compact('items'), compact('itemsOk'))->with('role', $role);
 }
Пример #11
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $modules = Module::all();
     $mymenu = Danhmucchucnang::findOrFail($id);
     return view('menu.edit')->with(array('modules' => $modules, 'mymenu' => $mymenu, 'menus' => $this->menus));
 }
 /**
  * Loads modules view
  * @return \Illuminate\View\View
  */
 public function modules()
 {
     $modules = Module::all();
     return view('pages.modules', compact('modules'));
 }