No Description

routes.php 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <?php
  2. // Event::listen('illuminate.query', function($sql, $params)
  3. // {
  4. // print_r($sql);
  5. // echo '<pre>';
  6. // print_r($params);
  7. // echo "</pre>";
  8. // });
  9. /*
  10. |--------------------------------------------------------------------------
  11. | Application Routes
  12. |--------------------------------------------------------------------------
  13. |
  14. | Here is where you can register all of the routes for an application.
  15. | It's a breeze. Simply tell Laravel the URIs it should respond to
  16. | and give it the Closure to execute when that URI is requested.
  17. |
  18. */
  19. // Route model bindings
  20. Route::model('template', 'Template');
  21. Route::model('program', 'Program');
  22. Route::model('five_year_plan', 'FiveYearPlan');
  23. // Composers
  24. View::composer(array(
  25. 'local.professors._navigation',
  26. 'local.managers.admins._navigation',
  27. 'local.managers.sCoords._navigation',
  28. 'local.managers.pCoords._navigation',
  29. ), function ($view) {
  30. // Get user's courses' numbers
  31. $courses = Auth::user()->courses;
  32. $schools = School::orderBy('name', 'asc')->get();
  33. $view->with('courses', $courses)->with('schools', $schools);
  34. });
  35. View::composer(array(
  36. 'local.professors.*',
  37. 'local.managers.admins._navigation',
  38. 'local.managers.sCoords._navigation',
  39. 'local.managers.pCoords._navigation',
  40. 'local.managers.shared.limited-course',
  41. 'local.managers.shared.school',
  42. 'local.managers.shared.school-uhs',
  43. 'local.managers.shared.programs',
  44. 'local.managers.shared.program',
  45. 'local.managers.shared.rubrics',
  46. 'global.view-learning-outcomes-criteria',
  47. 'global.view-learning-outcomes-criteria',
  48. 'global.view-three-year-plan'
  49. ), function ($view) {
  50. $view->with('role', Auth::user()->role);
  51. });
  52. /*
  53. * Login/logout routes
  54. */
  55. /** Use modified guest filter to redirect logged in user */
  56. Route::get('/', array('before' => 'guest', 'uses' => 'AuthController@showLogin'));
  57. Route::post('/login', array('uses' => 'AuthController@login'));
  58. /**
  59. * Protected Routes
  60. */
  61. Route::group(array('before' => 'auth|has_access'), function () {
  62. /**
  63. * Recalculate course outcomes
  64. *
  65. */
  66. Route::get('recalculateCourses', function () {
  67. DB::disableQueryLog();
  68. if (Auth::user()->id != 58)
  69. Redirect::action('AuthController@showLogin');
  70. try {
  71. $courses = Course::all();
  72. foreach ($courses as $course) {
  73. echo $course->id;
  74. // Recalculate course outcomes
  75. $activities = Activity::where('course_id', $course->id)
  76. ->whereNotNull('outcomes_attempted')
  77. ->where('draft', 0)
  78. ->get();
  79. //If there are still evaluated activities in the course, recalculate course outcomes
  80. if (!$activities->isEmpty()) {
  81. $outcomeCount = Outcome::all()->count();
  82. // Variables to hold recalculated outcomes for the course
  83. $course_outcomes_attempted = array_fill(1, $outcomeCount, 0);
  84. $course_outcomes_achieved = array_fill(1, $outcomeCount, 0);
  85. // For each activity
  86. foreach ($activities as $activity2) {
  87. // If activity has been assessed
  88. if ($activity2->outcomes_attempted != NULL) {
  89. echo '<ul>';
  90. // Get the achieved criteria
  91. $criteria_achievement = json_decode($activity2->criteria_achieved, true);
  92. foreach ($criteria_achievement as $criterion_id => $criterion_achieved) {
  93. // Find corresponding learning outcome;
  94. $criterion = Criterion::withTrashed()->where('id', $criterion_id)->first();
  95. print '<li>' . $criterion->id . '</li>';
  96. $outcome = Outcome::find($criterion->outcome_id);
  97. // If criterion is achieved (1), add 1 to both arrays
  98. if ($criterion_achieved === 1) {
  99. $course_outcomes_attempted[$outcome->id] += 1;
  100. $course_outcomes_achieved[$outcome->id] += 1;
  101. }
  102. // Else, only add to the attempted outcomes arrays
  103. elseif ($criterion_achieved === 0) {
  104. $course_outcomes_attempted[$outcome->id] += 1;
  105. }
  106. }
  107. echo '</ul>';
  108. }
  109. }
  110. // Update course
  111. DB::table('courses')
  112. ->where('id', $course->id)
  113. ->update(array(
  114. 'outcomes_attempted' => json_encode($course_outcomes_attempted),
  115. 'outcomes_achieved' => json_encode($course_outcomes_achieved),
  116. 'updated_at' => date('Y-m-d H:i:s')
  117. ));
  118. }
  119. // Otherwise, set them all to NULL
  120. else {
  121. DB::table('courses')
  122. ->where('id', $course->id)
  123. ->update(array(
  124. 'outcomes_attempted' => NULL,
  125. 'outcomes_achieved' => NULL,
  126. 'updated_at' => date('Y-m-d H:i:s')
  127. ));
  128. }
  129. }
  130. return 'success';
  131. } catch (Exception $e) {
  132. return 'failure (' . $e->getLine() . '): ' . $e->getMessage();
  133. }
  134. });
  135. /**
  136. * Shared Routes
  137. */
  138. Route::post('postActivityCriterionTrans/{activity_id}', array(
  139. 'as' => 'postActivityCriterionTrans/{activity_id}',
  140. 'uses' => 'TransformativeActionsController@postActivityCriterion'
  141. ));
  142. Route::post('changeStatusOfCriterion', array(
  143. 'as' => 'changeStatusOfCriterion',
  144. 'uses' => 'CriteriaController@changeStatus'
  145. ));
  146. Route::post('createThreeYearCycle', array(
  147. 'as' => 'createThreeYearCycle',
  148. 'uses' => 'ThreeYearPlanController@create'
  149. ));
  150. // Fetch all criteria associated to an outcome
  151. Route::post('fetchInfo', array(
  152. 'as' => 'fetchInfo',
  153. 'uses' => 'AnnualPlansController@fetchInfo'
  154. ));
  155. Route::post('fetchCriteria', array(
  156. 'as' => 'fetchCriteria',
  157. 'uses' => 'OutcomesController@fetchCriteria'
  158. ));
  159. Route::post('fetchCriterionWithTemplate', array(
  160. 'as' => 'fetchCriterionWithTemplate',
  161. 'uses' => 'CriteriaController@fetchCriterionWithTemplate'
  162. ));
  163. // Fetch a criterion for a rubric
  164. Route::post('fetchCriterion', array(
  165. 'as' => 'fetchCriterion',
  166. 'uses' => 'CriteriaController@fetchCriterion'
  167. ));
  168. // Fetch Criterions associated to programs
  169. Route::post('fetchAllCriterion', array(
  170. 'as' => 'fetchAllCriterion',
  171. 'uses' => 'CriteriaController@fetchAllCriterion'
  172. ));
  173. Route::post('deleteCriterion', array(
  174. 'as' => 'deleteCriterion',
  175. 'uses' => 'CriteriaController@delete'
  176. ));
  177. Route::post('delete', array(
  178. 'as' => 'delete',
  179. 'uses' => 'TransformativeActionsController@deleteTA'
  180. ));
  181. // Fetch a criterion for a rubric
  182. Route::post('fetchCriterionWithTrashed', array(
  183. 'as' => 'fetchCriterionWithTrashed',
  184. 'uses' => 'CriteriaController@fetchCriterionWithTrashed'
  185. ));
  186. //Fetch objectives for criteria when outcome is chosen
  187. Route::post('fetchObjectivesForSelect', array(
  188. 'as' => 'fetchObjectivesForSelect',
  189. 'uses' => 'CriteriaController@fetchObjectivesForSelect'
  190. ));
  191. // Fetch a criterion for a rubric with custom content
  192. Route::post('fetchRubricCriterion', array(
  193. 'as' => 'fetchRubricCriterion',
  194. 'uses' => 'RubricsController@fetchRubricCriterion'
  195. ));
  196. // Load a rubric template
  197. Route::post('loadTemplate', array('uses' => 'TemplatesController@fetch'));
  198. Route::post('filterSemesters', array('uses' => 'SemestersController@filterSemesters'));
  199. // Log out user
  200. Route::get('logout', 'AuthController@logout');
  201. // Edit and update user profile
  202. Route::get('profile', 'UsersController@edit');
  203. Route::post('profile/update', array('before' => 'csrf', 'uses' => 'UsersController@update'));
  204. // Allows users to give feeback
  205. Route::post('feedback/send', array('before' => 'csrf', 'uses' => 'FeedbackController@send'));
  206. Route::resource(
  207. 'feedback',
  208. 'FeedbackController',
  209. array('only' => array('create'))
  210. );
  211. // Show users all learning outcomes and criteria
  212. Route::get('learning-outcomes-criteria', 'CriteriaController@index');
  213. Route::post('fetchOutcome', array('before' => 'csrf', 'uses' => 'OutcomesController@fetchOutcome'));
  214. // Show users all objectives and criteria
  215. Route::get('learning-objectives-criteria', 'CriteriaController@objectivesIndex');
  216. Route::post('fetchObjectiveForCriteria', array('before' => 'csrf', 'uses' => 'ObjectivesController@fetchObjectiveForCriteria'));
  217. // Show professor overview to users with courses
  218. Route::get('professor', 'ProfessorsController@overview');
  219. // Assessment reports for users' courses
  220. Route::get('my-assessment-reports', 'OutcomesController@professorAssessmentReports');
  221. Route::post('objectives/fetch', array('before' => 'csrf', 'uses' => 'ObjectivesController@fetch'));
  222. // Transformative Actions for p-coordinators and professors
  223. Route::get('transformativeAction', array('uses' => 'TransformativeActionsController@editTA'));
  224. Route::post('transformativeAction/createTA', array('before' => 'csrf', 'uses' => 'TransformativeActionsController@createTA'));
  225. Route::post('transformativeAction/selectTA', array('before' => 'csrf', 'uses' => 'TransformativeActionsController@selectTA'));
  226. Route::post('transformativeAction/updateTA', array('before' => 'csrf', 'uses' => 'TransformativeActionsController@updateTA'));
  227. Route::post('transformativeAction/filterTA', array('before' => 'csrf', 'uses' => 'TransformativeActionsController@filterTA'));
  228. Route::post('transformativeAction/objectivesFromOutcome', array('before' => 'csrf', 'uses' => 'TransformativeActionsController@objectivesFromOutcome'));
  229. /**
  230. * Administrator Routes
  231. */
  232. Route::group(array('before' => 'admin'), function () {
  233. Route::get('/administrator', 'AdministratorsController@overview');
  234. Route::get('/administrator2', 'AdministratorsController@overview2');
  235. Route::post('/administrator2/filter', 'AdministratorsController@overview2_filter_results');
  236. Route::post('administrator/rubrics', array(
  237. 'as' => 'rubrics',
  238. 'before' => 'csrf',
  239. 'uses' => 'CriteriaController@fetch'
  240. ));
  241. Route::post('createOutcome', array('before' => 'csrf', 'uses' => 'OutcomesController@create'));
  242. Route::post('createCriterion', array('before' => 'csrf', 'uses' => 'CriteriaController@create'));
  243. Route::get('learning-outcomes', 'OutcomesController@index');
  244. Route::post('fetchObjectives', 'Objective2Controller@fetchAllObjectives');
  245. // TODO: Change later
  246. Route::get('new-learning-outcomes', 'OutcomesController@newIndex');
  247. Route::post('learning-outcomes/update', array('before' => 'csrf', 'uses' => 'OutcomesController@updateMore'));
  248. Route::post('learning-outcomes/update', array('before' => 'csrf', 'uses' => 'OutcomesController@update'));
  249. Route::post('crtiteria/update', array('before' => 'csrf', 'uses' => 'CriteriaController@update'));
  250. Route::delete('crtiteria/delete', array('before' => 'csrf', 'uses' => 'CriteriaController@destroy'));
  251. Route::get('administrator/users/{query?}', 'UsersController@index');
  252. Route::post('administrator/updateAccess', array('before' => 'csrf', 'uses' => 'UsersController@updateAccess'));
  253. Route::post('administrator/users/store', array('before' => 'csrf', 'uses' => 'UsersController@store'));
  254. Route::get('criteria', array('uses' => 'CriteriaController@edit'));
  255. Route::get('objectives', array('uses' => 'Objective2Controller@edit'));
  256. Route::get('administrator/semesters', 'SemestersController@edit');
  257. Route::post('administrator/semesters/update', 'SemestersController@update');
  258. Route::post('deleteObjective', 'Objective2Controller@delete');
  259. Route::get('assessment-report/{outcome_id}', 'OutcomesController@assessmentReport');
  260. // TODO: Change later
  261. Route::get('new-assessment-report/{outcome_id}', 'OutcomesController@newAssessmentReport');
  262. Route::get('template-list', 'TemplatesController@index');
  263. Route::get('template/{template}', 'TemplatesController@show');
  264. Route::post('onLoadFetch', 'TemplatesController@onLoadFetch');
  265. Route::get('courses/reassign', 'CoursesController@reassign');
  266. Route::post('courses/update', array('before' => 'csrf', 'uses' => 'CoursesController@update'));
  267. Route::get('activities/create', 'ActivitiesController@newCreate');
  268. });
  269. /**
  270. * School Coordinator Routes
  271. */
  272. Route::group(array('before' => 'scoord'), function () {
  273. Route::get('school-coordinator', 'SchoolCoordinatorsController@overview');
  274. Route::get('school/{id}', 'SchoolsController@show');
  275. Route::get('program/{id}', 'ProgramsController@show');
  276. Route::post('programs/report', 'ProgramsController@showReport');
  277. // Route::post('storeTypInfo', 'OutcomesController@storeCycleInfo'); //TODO: where is this route supposed to be placed?
  278. Route::get('programs', 'ProgramsController@index');
  279. Route::get('template-list', 'TemplatesController@schoolCoordinatorIndex');
  280. Route::post('deleteObjective', 'Objective2Controller@delete');
  281. // Print school report
  282. Route::get('print_school/{id}', 'SchoolsController@print_school');
  283. // Assessment reports
  284. Route::get('school-assessment-report/{outcome_id}', 'OutcomesController@schoolAssessmentReport');
  285. // Gabriel added this, so the school coordinator can add criterias and objectives
  286. Route::post('createCriterion', array('before' => 'csrf', 'uses' => 'CriteriaController@create'));
  287. Route::get('school-objective', 'Objective2Controller@editSchool');
  288. Route::get('school-criteria', 'CriteriaController@editSchool');
  289. Route::post('crtiteria/update', array('before' => 'csrf', 'uses' => 'CriteriaController@update'));
  290. //Show users annual plan
  291. Route::get('annual-plan-program/{program_id}/{typ_id?}', 'AnnualPlansController@showPlan');
  292. Route::post('annual-plan-fetchTYP/{program_id}/{typ_id}', 'AnnualPlansController@fetchTYP');
  293. Route::post('annual-plan-postOnChange', 'AnnualPlansController@postAnnualPlan');
  294. Route::post('annual-plan-deleteCriteria', 'AnnualPlansController@deleteCriteria');
  295. Route::get('annual-plan-show/{program_id}', 'AnnualPlansController@viewAllPlans');
  296. Route::post('fetchAllTables', 'AnnualPlansController@fetchAllTables');
  297. Route::post('annual-plan-postTA', 'AnnualPlansController@postTA');
  298. Route::post('annual-report-post', 'AnnualPlansController@postReport');
  299. Route::post('annual-plan-deleteTA', 'AnnualPlansController@deleteTA');
  300. Route::post('annual-plan-trans-report', 'AnnualPlansController@transformativeReport');
  301. // Show users plan de tres a~nos
  302. Route::get('three-years-plan', 'ThreeYearPlanController@threeYearsReport');
  303. Route::post('fetchThreeYears', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@fetchThreeYears'));
  304. Route::post('typ/lookUp', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@lookup_typ_semester_outcome'));
  305. Route::post('section2_arrive', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section2_arrive'));
  306. Route::post('section2_on_change', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section2_on_change'));
  307. Route::post('section3_arrive', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section3_arrive'));
  308. Route::post('section3_on_change', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section3_on_change'));
  309. Route::post('typ/getObjectives', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@getObjectivesForTYP'));
  310. Route::post('typ/updateOutcomeSemsters', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@typ_update_outcomes_semesters'));
  311. Route::post('typ/update', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@update_typ_outcomes_semesters'));
  312. Route::post('createAnnualPlan/{program_id}', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@createAnnualPlan'));
  313. });
  314. /**
  315. * Program Coordinator Routes
  316. */
  317. Route::group(array('before' => 'pcoord'), function () {
  318. Route::get('program-coordinator', 'ProgramCoordinatorsController@overview');
  319. Route::post('deleteObjective', 'Objective2Controller@delete');
  320. Route::get('rubrics', 'TemplatesController@newTemplate');
  321. Route::post('saveTemplate', array('before' => 'csrf', 'uses' => 'TemplatesController@create'));
  322. Route::post('updateTemplate', array('before' => 'csrf', 'uses' => 'TemplatesController@update'));
  323. Route::post('deleteTemplate', array('before' => 'csrf', 'uses' => 'TemplatesController@destroy'));
  324. Route::get('course/{id}', 'CoursesController@showLimited');
  325. Route::get('rubrics/{template_id}/download', 'TemplatesController@download');
  326. Route::post('program/fetch', array('before' => 'csrf', 'uses' => 'ProgramsController@fetch'));
  327. Route::post('createCriterion', array('before' => 'csrf', 'uses' => 'CriteriaController@create'));
  328. Route::get('printRubric/{id}', 'TemplatesController@printview');
  329. Route::get('rubric/{rubric_id}', 'RubricsController@show_limited');
  330. Route::get('grouped_course/{code}/{number}/{semester_code}', 'CoursesController@showGrouped');
  331. //Criteria and objectives
  332. Route::get('program-criteria', 'CriteriaController@editProgram');
  333. Route::post('crtiteria/update', array('before' => 'csrf', 'uses' => 'CriteriaController@update'));
  334. Route::get('program-objective', 'Objective2Controller@editProgram');
  335. // Print program report
  336. Route::get('print_program/{id}', 'ProgramsController@print_program');
  337. // Print course (grouped sections) report
  338. Route::get('print_course/{code}/{number}/{semester_code}', 'CoursesController@print_course');
  339. // Assessment reports
  340. Route::get('program-assessment-report/{outcome_id}/{program_id}', 'OutcomesController@programAssessmentReport');
  341. Route::get('assessment-reports', 'OutcomesController@managerAssessmentReports');
  342. // Learning Objectives
  343. Route::get('program/{program}/objectives', 'ObjectivesController@index');
  344. Route::post('updateObjective', array('before' => 'csrf', 'uses' => 'ObjectivesController@update'));
  345. Route::post('program/{id}/createObjective', array('before' => 'csrf', 'uses' => 'ObjectivesController@create'));
  346. Route::post('fetchObjective', array('before' => 'csrf', 'uses' => 'ObjectivesController@fetchObjective'));
  347. Route::post('fetchObjectivesForCriteria', array('before' => 'csrf', 'uses' => 'ObjectivesController@fetchObjectivesForCriteria'));
  348. //Objectives por Gabriel
  349. Route::get('objective', 'Objective2Controller@edit');
  350. Route::post('createObjective', array('before' => 'csrf', 'uses' => 'Objective2Controller@create'));
  351. Route::post('updateObjective', array('before' => 'csrf', 'uses' => 'Objective2Controller@update'));
  352. Route::post('fetchObjectiveWithTrashed', array('before' => 'csrf', 'uses' => 'Objective2Controller@fetchObjectiveWithTrashed'));
  353. // Five year plans,
  354. Route::get('five-year-plans', 'FiveYearPlansController@index');
  355. Route::get('program/{program}/five-year-plans/create', 'FiveYearPlansController@create');
  356. Route::get('program/{program}/five-year-plans/{five_year_plan}', 'FiveYearPlansController@show');
  357. Route::get('program/{program}/five-year-plans/{five_year_plan}/edit', 'FiveYearPlansController@edit');
  358. Route::get('five-year-plans/{five_year_plan}/ms-word', 'FiveYearPlansController@msWord');
  359. Route::post('five-year-plans/store', array('before' => 'csrf', 'uses' => 'FiveYearPlansController@store'));
  360. Route::post('five-year-plans/update', array('before' => 'csrf', 'uses' => 'FiveYearPlansController@update'));
  361. // Annual plans
  362. Route::get('annual-plans', 'AnnualPlansController@index');
  363. Route::get('program/{program}/annual-plans/create', 'AnnualPlansController@create');
  364. Route::get('program/{program}/annual-plans/{five_year_plan}', 'AnnualPlansController@show');
  365. Route::get('program/{program}/annual-plans/{five_year_plan}/edit', 'AnnualPlansController@edit');
  366. Route::post('annual-plans/store', array('before' => 'csrf', 'uses' => 'AnnualPlansController@store'));
  367. Route::post('annual-plans/update', array('before' => 'csrf', 'uses' => 'AnnualPlansController@update'));
  368. Route::get('learning-outcomes/show/{id}', 'OutcomesController@show');
  369. // TODO: Change route name
  370. Route::get('learning-outcomes/newshow/{id}', 'OutcomesController@newShow');
  371. Route::get('new-report/{id}', 'OutcomesController@newReport');
  372. Route::get('new-report-all', 'OutcomesController@newReportAll');
  373. Route::get('courses/{id}', 'CoursesController@newShow');
  374. Route::get('annual-plan-program/{program_id}/{typ_id?}', 'AnnualPlansController@showPlan');
  375. Route::post('annual-plan-fetchTYP/{program_id}', 'AnnualPlansController@fetchTYP');
  376. Route::post('annual-plan-postOnChange', 'AnnualPlansController@postAnnualPlan');
  377. Route::post('annual-plan-deleteCriteria', 'AnnualPlansController@deleteCriteria');
  378. //Gabriel added this
  379. Route::get('annual-plan-program/{program_id}/{typ_id?}', 'AnnualPlansController@showPlan');
  380. Route::post('annual-plan-fetchTYP/{program_id}/{typ_id}', 'AnnualPlansController@fetchTYP');
  381. Route::post('annual-plan-postOnChange', 'AnnualPlansController@postAnnualPlan');
  382. Route::post('annual-plan-deleteCriteria', 'AnnualPlansController@deleteCriteria');
  383. Route::get('annual-plan-show/{program_id}', 'AnnualPlansController@viewAllPlans');
  384. Route::post('fetchAllTables', 'AnnualPlansController@fetchAllTables');
  385. Route::post('annual-plan-postTA', 'AnnualPlansController@postTA');
  386. Route::post('annual-report-post', 'AnnualPlansController@postReport');
  387. Route::post('annual-plan-deleteTA', 'AnnualPlansController@deleteTA');
  388. Route::post('annual-plan-trans-report', 'AnnualPlansController@transformativeReport');
  389. // Transformative Actions
  390. Route::post('transformativeAction/approveTA', array('before' => 'csrf', 'uses' => 'TransformativeActionsController@approveTA'));
  391. // Show users plan de tres a~nos
  392. Route::get('three-years-plan', 'ThreeYearPlanController@threeYearsReport');
  393. Route::post('fetchThreeYears', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@fetchThreeYears'));
  394. Route::post('typ/lookUp', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@lookup_typ_semester_outcome'));
  395. Route::post('section2_arrive', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section2_arrive'));
  396. Route::post('section2_on_change', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section2_on_change'));
  397. Route::post('section3_arrive', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section3_arrive'));
  398. Route::post('section3_on_change', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@section3_on_change'));
  399. Route::post('typ/getObjectives', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@getObjectivesForTYP'));
  400. Route::post('typ/updateOutcomeSemsters', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@typ_update_outcomes_semesters'));
  401. Route::post('typ/update', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@update_typ_outcomes_semesters'));
  402. Route::post('createAnnualPlan/{program_id}', array('before' => 'csrf', 'uses' => 'ThreeYearPlanController@createAnnualPlan'));
  403. });
  404. /**
  405. * Professor Routes
  406. */
  407. Route::group(array('prefix' => 'professor', 'before' => 'prof'), function () {
  408. Route::post('program', array('before' => 'csrf', 'uses' => 'ProfessorsController@program'));
  409. Route::get('activities/{activity_id}/rubrics', 'RubricsController@newRubric');
  410. Route::get('activities/{activity_id}/other_method', 'RubricsController@newOtherMethod');
  411. Route::get('activities/{activity_id}/rubric', 'RubricsController@show');
  412. Route::get('activities/{activity_id}/rubric/{rubric_id}/download', 'RubricsController@download');
  413. Route::get('activities/{activity_id}/rubric/{rubric_id}/print', 'RubricsController@printview');
  414. Route::get('activities/{activity_id}/assess', 'ActivitiesController@assess');
  415. Route::get('activities/{activity_id}/view_assessment', 'ActivitiesController@viewAssessment');
  416. Route::get('activities/{activity_id}/print_assessment', 'ActivitiesController@printAssessment');
  417. Route::post('activities/saveAssessment', array('before' => 'csrf', 'uses' => 'ActivitiesController@saveAssessment'));
  418. Route::post('activities/deleteAssessment', array('before' => 'csrf', 'uses' => 'ActivitiesController@deleteAssessment'));
  419. Route::delete('activities/{activity_id}/delete', 'ActivitiesController@destroy');
  420. Route::post('activities/{activity_id}/update', array('before' => 'csrf', 'uses' => 'ActivitiesController@update'));
  421. Route::get('courses/{id}', 'CoursesController@show');
  422. Route::get('courses/{semester}/{id}/students/{number}', 'StudentsController@show');
  423. Route::get('courses/{semester}/{id}/students/{number}/print_report', 'StudentsController@printStudentReport');
  424. Route::get('activities/{id}', 'ActivitiesController@show');
  425. Route::post('activities/{id}', array('before' => 'csrf', 'uses' => 'ActivitiesController@create'));
  426. Route::get('students', 'StudentsController@students');
  427. Route::get('program', 'ProfessorsController@program');
  428. Route::get('personal-information', 'ProfessorsController@personalInformation');
  429. Route::get('manual', 'ProfessorsController@manual');
  430. Route::post('loadRubric', array('before' => 'csrf', 'uses' => 'RubricsController@fetch'));
  431. Route::post('saveRubric', array('before' => 'csrf', 'uses' => 'RubricsController@create'));
  432. Route::post('updateRubric', array('before' => 'csrf', 'uses' => 'RubricsController@update'));
  433. Route::post('deleteRubric', array('before' => 'csrf', 'uses' => 'RubricsController@destroy'));
  434. Route::get('learning-outcomes-criteria', 'CriteriaController@index');
  435. Route::get('learning-objectives-criteria', 'CriteriaController@objectivesIndex');
  436. Route::get('export_grades/{id}', 'CoursesController@exportGrades');
  437. Route::get('learning-objectives-criteria', 'CriteriaController@objectivesIndex');
  438. // Assessment reports
  439. Route::get('professor-assessment-report/{outcome_id}', 'OutcomesController@professorAssessmentReport');
  440. Route::get('professor-assessment-reports', 'OutcomesController@professorAssessmentReports');
  441. Route::get('general-studies-overview', 'ProfessorsController@generalStudiesOverview');
  442. });
  443. });