Explorar el Código

Se crea pagina de agreement para todos los usuarios. Se arregla texto en annual plans. Se anhade auto-sum en activities assess

Carlos J Corrada Bravo hace 2 años
padre
commit
2727fabe28

+ 1
- 1
app/config/app.php Ver fichero

@@ -15,7 +15,7 @@ return array(
15 15
 
16 16
 	//'debug' => $_ENV['APP_DEBUG'] ?: false,
17 17
 
18
-	'debug' => true,
18
+	'debug' => false,
19 19
 	/*
20 20
 	|--------------------------------------------------------------------------
21 21
 	| Application URL

+ 4
- 3
app/controllers/ActivitiesController.php Ver fichero

@@ -226,14 +226,15 @@ class ActivitiesController extends \BaseController
226 226
             ->addSelect('activity_criterion.activity_id', 'activity_criterion.weight', 'activity_criterion.id as activity_criterion_id')
227 227
             ->addSelect('rubric_criterion.rubric_id', 'rubric_criterion.id as rubric_criterion_id')
228 228
             ->get();
229
-
229
+$total_weights=0;
230 230
         foreach ($rubric_criterion as $index => $singleCR) {
231 231
             $singleCR->scales = json_encode(DB::table('scales')
232 232
                 ->join('criterion_scale', 'criterion_scale.scale_id', '=', 'scales.id')
233 233
                 ->where('criterion_scale.criterion_id', '=', $singleCR->criterion_id)
234 234
                 ->orderBy('position')
235 235
                 ->lists('description'));
236
-        }
236
+             $total_weights+=$singleCR->weight;
237
+       }
237 238
         $rubric_criterion_ids = DB::table('rubric_criterion')->where('rubric_id', '=', $rubric->id)->lists('id');
238 239
 
239 240
 
@@ -260,7 +261,7 @@ class ActivitiesController extends \BaseController
260 261
         }
261 262
 
262 263
 
263
-        return View::make('local.professors.assessment', compact('activity', 'title', 'students', 'course', 'rubric_criterion', 'assessments', 'scores_array', 'rubric'));
264
+        return View::make('local.professors.assessment', compact('total_weights', 'activity', 'title', 'students', 'course', 'rubric_criterion', 'assessments', 'scores_array', 'rubric'));
264 265
     }
265 266
 
266 267
     public function saveAssessment()

+ 117
- 0
app/controllers/AgreementController.php Ver fichero

@@ -0,0 +1,117 @@
1
+<?php
2
+
3
+class AgreementController extends \BaseController {
4
+
5
+	/**
6
+	 * Display a listing of the resource.
7
+	 *
8
+	 * @return Response
9
+	 */
10
+	public function index()
11
+	{
12
+		//
13
+			$user = Auth::user();
14
+		$title = "Agreement";
15
+	return View::make('global.agreement',compact( 'title', 'user'));
16
+	}
17
+
18
+
19
+	/**
20
+	 * Show the form for creating a new resource.
21
+	 *
22
+	 * @return Response
23
+	 */
24
+	public function agree()
25
+	{
26
+// 		var_dump(Input::get('submitbutton'));exit();
27
+		if(Input::get('submitbutton')=="Agree")
28
+		{
29
+			switch (Auth::user()->role) {
30
+		case 1:
31
+			return Redirect::intended('administrator');
32
+			break;
33
+
34
+		case 2:
35
+			return Redirect::intended('school-coordinator');
36
+			break;
37
+
38
+		case 3:
39
+			return Redirect::intended('program-coordinator');
40
+			break;
41
+
42
+		case 4:
43
+			return Redirect::intended('professor');
44
+			break;
45
+		}
46
+		}
47
+		else
48
+		{
49
+			return Redirect::intended('logout');
50
+
51
+		}
52
+	
53
+
54
+		//
55
+	}
56
+
57
+
58
+	/**
59
+	 * Store a newly created resource in storage.
60
+	 *
61
+	 * @return Response
62
+	 */
63
+	public function store()
64
+	{
65
+		//
66
+	}
67
+
68
+
69
+	/**
70
+	 * Display the specified resource.
71
+	 *
72
+	 * @param  int  $id
73
+	 * @return Response
74
+	 */
75
+	public function show($id)
76
+	{
77
+		//
78
+	}
79
+
80
+
81
+	/**
82
+	 * Show the form for editing the specified resource.
83
+	 *
84
+	 * @param  int  $id
85
+	 * @return Response
86
+	 */
87
+	public function edit($id)
88
+	{
89
+		//
90
+	}
91
+
92
+
93
+	/**
94
+	 * Update the specified resource in storage.
95
+	 *
96
+	 * @param  int  $id
97
+	 * @return Response
98
+	 */
99
+	public function update($id)
100
+	{
101
+		//
102
+	}
103
+
104
+
105
+	/**
106
+	 * Remove the specified resource from storage.
107
+	 *
108
+	 * @param  int  $id
109
+	 * @return Response
110
+	 */
111
+	public function destroy($id)
112
+	{
113
+		//
114
+	}
115
+
116
+
117
+}

+ 1
- 1
app/controllers/AnnualPlansController.php Ver fichero

@@ -1,7 +1,7 @@
1 1
 <?php
2 2
 
3 3
 use Barryvdh\DomPDF\PDF as PDF;
4
-use Response;
4
+// use Response;
5 5
 use Illuminate\Support\Facades\Auth;
6 6
 use Illuminate\Support\Facades\Input;
7 7
 use Illuminate\Support\Facades\View;

+ 5
- 3
app/controllers/AuthController.php Ver fichero

@@ -28,9 +28,9 @@ class AuthController extends \BaseController
28 28
 
29 29
 		if (!$validator->fails()) {
30 30
 			//			TODO: Remove this for production environment
31
-			if (App::environment('local', 'staging')) {
32
-				return $this->processLogin();
33
-			}
31
+// 			if (App::environment('local', 'staging')) {
32
+// 				return $this->processLogin();
33
+// 			}
34 34
 			try {
35 35
 				// User input
36 36
 				$username = str_replace('@upr.edu', '', Input::get('email'));
@@ -141,6 +141,7 @@ class AuthController extends \BaseController
141 141
 			}
142 142
 
143 143
 			// Redirect depending on user
144
+						return Redirect::intended('agreement');
144 145
 			switch (Auth::user()->role) {
145 146
 				case 1:
146 147
 					return Redirect::intended('administrator');
@@ -148,6 +149,7 @@ class AuthController extends \BaseController
148 149
 
149 150
 				case 2:
150 151
 					return Redirect::intended('school-coordinator');
152
+// 					return Redirect::intended('agreement');
151 153
 					break;
152 154
 
153 155
 				case 3:

+ 2
- 2
app/controllers/FeedbackController.php Ver fichero

@@ -80,10 +80,10 @@ class FeedbackController extends \BaseController {
80 80
           	Mail::send('emails.feedback-email-copy', $data, function($message){
81 81
         		$message
82 82
         		->to(Input::get('email'), Auth::user()->first_name.' '.Auth::user()->surnames)
83
-                ->cc('oeae.uprrp@upr.edu')
83
+                ->cc('peticiones.diia@upr.edu')
84 84
         		->subject('Feedback for OLAS');
85 85
     		});
86
-
86
+//peticiones.diia@upr.edu
87 87
             Session::flash('status', 'success');
88 88
             Session::flash('message', '<p>Success! Check your email for a copy of your message. Thank you for your feedback. </p>');
89 89
             return Redirect::back();

+ 4
- 1
app/routes.php Ver fichero

@@ -355,7 +355,10 @@ Route::group(array('before' => 'auth|has_access'), function () {
355 355
         array('only' => array('create'))
356 356
     );
357 357
 
358
-    // Show users all learning outcomes and criteria
358
+ 	Route::get('agreement', 'AgreementController@index');
359
+    Route::post('agreement/agree', array('before' => 'csrf', 'uses' => 'AgreementController@agree'));
360
+
361
+   // Show users all learning outcomes and criteria
359 362
     Route::get('learning-outcomes-criteria', 'CriteriaController@index');
360 363
     Route::post('fetchOutcome', array('before' => 'csrf', 'uses' => 'OutcomesController@fetchOutcome'));
361 364
     // Show users all objectives and criteria

+ 37
- 0
app/views/global/agreement.blade.php Ver fichero

@@ -0,0 +1,37 @@
1
+@extends('layouts.master')
2
+
3
+@section('main')
4
+
5
+    <div class="row">
6
+        <div class="col-md-12">
7
+The Family Educational Rights and Privacy Act of 1974 (FERPA) establishes parameters for the protection of the confidentiality of student academic information, recognizing their right to inspect and review their academic records. In 2012, an amendment was approved, which extended access conditions to any designated third party to private information of personal identification and to that found in academic records, including grades, with the purpose of academic progress evaluation. Consequently, seeking to improve, among many things, the effectiveness of said academic program. 
8
+</p><p>
9
+Student learning assessment is an activity mandated by the institutional rules, and a practice tied to the teaching process which seeks to measure the effectiveness and promote transformation aimed at excellence. OLAS, an online platform created on Campus, compiles information about the performance of students through assessment rubrics developed and used by its users (assessment coordinators of both the Division of Institutional Research and Assessment and of the faculties, as well as professors) who compile and receive data. 
10
+</p><p>
11
+FERPA defines an authorized representative as any entity or designated individual by a state or local authority, who conducts any audit or evaluation or any compliance activity in connection with federal legal requirements related to the programs. It could be any officer or university official that has a legitimate academic interest as part of his/her professional-administrative responsibilities, academic supervision, research, or support under the duties he/she carries. 
12
+</p><p>
13
+The Division of Institutional Research and Assessment (DIIA for its Spanish acronym) during the process of receiving, analyzing, and disseminating information contained in learning assessment reports generated by each faculty uses reasonable methods like the constant monitoring of the online platform, controlled access to the program, among other measures, to ensure that it keeps the identity of the student protected. 
14
+</p><p>
15
+Your login to this platform and the reading of the information related to the management of the student’s file, exposed above, implies that:
16
+</p><ul>
17
+<li>	you agree that the data located on and extracted from the platform is for educational purposes
18
+<li>	you act within the framework of its role as coordinator of the learning assessment  and/or professor and
19
+<li>	you are committed to safeguarding the principle of privacy and confidentiality of the student.
20
+</ul>
21
+
22
+            {{ Form::open(['action' => 'AgreementController@agree', 'class' => 'form-horizontal']) }}
23
+            <div class="form-group">
24
+             <div class="form-group">
25
+                <div class="col-md-6">
26
+                    {{ Form::submit('Do not Agree', ['class' => 'btn btn-lg btn-primary pull-right','name'=>"submitbutton"]) }}
27
+                </div>
28
+                <div class="col-md-6">
29
+                    {{ Form::submit('Agree', ['class' => 'btn btn-lg btn-primary pull-left','name'=>"submitbutton"]) }}
30
+                </div>
31
+            </div>
32
+
33
+            {{ Form::close() }}
34
+        </div>
35
+    </div>
36
+
37
+@stop

+ 1
- 1
app/views/global/feedback.blade.php Ver fichero

@@ -33,7 +33,7 @@
33 33
                             '3' => 'Other',
34 34
                         ],
35 35
                         null,
36
-                        ['class' => 'form-control', 'name' => 'type'],
36
+                        ['class' => 'form-control', 'name' => 'type']
37 37
                     ) }}
38 38
                 </div>
39 39
             </div>

+ 2
- 2
app/views/local/managers/shared/annual-plans.blade.php Ver fichero

@@ -273,7 +273,7 @@
273 273
                     $('.no-outcome').parent().hide();
274 274
 
275 275
                     $('#criteria_for_courses').html('Criteria for Courses Associated to ' + name);
276
-                    $('#transformative_title').html('Transformative Actions for ' + name);
276
+                    $('#transformative_title').html('Activities Assessment and Program Transformative Actions for ' + name);
277 277
                     $('#outcome-display .panel-title').html(name);
278 278
 
279 279
                     $('#submit_modal').hide();
@@ -521,7 +521,7 @@
521 521
                         $('#expected-outcome .form-control').val(expected_target.expected_target);
522 522
 
523 523
                         $('#criteria_for_courses').html('Criteria for Courses Associated to ' + name);
524
-                        $('#transformative_title').html('Transformative Actions for ' + name);
524
+                        $('#transformative_title').html('Activities Assessment and Program Transformative Actions for ' + name);
525 525
 
526 526
 
527 527
 

+ 12
- 2
app/views/local/professors/assessment.blade.php Ver fichero

@@ -109,6 +109,12 @@
109 109
                         Weight<input class="form-control" id="weight-{{$index}}" name='weight[]' type="text"  value="{{$criterion->weight}}" data-activity-criterion-id="{{$criterion->activity_criterion_id}}">
110 110
                         </div></th>
111 111
                 @endforeach
112
+                <th colspan=3>
113
+                <div class="th-box">
114
+                        
115
+                        Total<input class="form-control" id="total" name='total' type="text"  value="{{$total_weights}}" readonly>
116
+                        </div>
117
+                </th>
112 118
                 </tr>
113 119
                     <tr>
114 120
                         <th>
@@ -477,9 +483,10 @@ function percentagePerStudent(row)
477 483
     var max_score = parseInt($('#max').val());
478 484
     sum_of_weight = 0;
479 485
     per_of_weight =0;
480
-
486
+	var sum_of_weight_fixed=0.0;
481 487
     row.find('td.score-field').each(function(index)
482
-    {
488
+    {	
489
+    	sum_of_weight_fixed+=parseFloat($('#weight-'+index).val());
483 490
         var val = parseInt($(this).children('select').find(':selected').val());
484 491
         if(val % 1 === 0) //If number is integer
485 492
         {
@@ -490,6 +497,9 @@ function percentagePerStudent(row)
490 497
         }
491 498
 
492 499
     });
500
+    $('#total').val(sum_of_weight_fixed.toFixed(2));
501
+<!--     console.log(sum_of_weight_fixed); -->
502
+
493 503
     percentage_per_weight = (100 *(per_of_weight/(max_score*sum_of_weight))).toFixed(2);
494 504
     percentage =((sum/(total*max_score))*100).toFixed(2);
495 505