3 İşlemeler

Yazar SHA1 Mesaj Tarih
  onielm af5b5577e8 Create trabajoRealizado. primer semestre 2020-2021.pdf 4 yıl önce
  onielm 7a1294c83f Added search filters to "Learning Objectives and Criteria" and "Learning Outcomes and Criteria" 4 yıl önce
  onielm bdbcaf1262 Updated page to make Programs reports 4 yıl önce

+ 40
- 4
app/controllers/ProgramsController.php Dosyayı Görüntüle

@@ -82,13 +82,48 @@ class ProgramsController extends \BaseController
82 82
 
83 83
 public function showReport()
84 84
 {
85
+
86
+
87
+  // create an array with the ID of Semesters selected in the form
88
+  $selected_semesters_id = array();
89
+  $semesters = Semester::all();
90
+  foreach ($semesters as $semester) {
91
+    if ($semester->is_visible){
92
+      if (Input::get('semester'.$semester->id)!=null){
93
+        array_push($selected_semesters_id, $semester->id);
94
+      }
95
+    }
96
+  }
97
+  $selected_semesters = DB::table('semesters')
98
+                        ->wherein('semesters.id',$selected_semesters_id)
99
+                        ->get();
100
+
101
+  // create a srting with the selected metodos de divulgfacion
102
+  $selected_divulgaciones = '';
103
+  $divulgaciones = array('profesores','comiteDepartamental','comiteFacultadEscuela',
104
+                      'pleno','estudiantes','administrativos','senado','comunidadWeb',
105
+                      'otros');
106
+  foreach ($divulgaciones as $divulgacion) {
107
+    if (Input::get($divulgacion)!=null){
108
+      $selected_divulgaciones = $selected_divulgaciones.'\n'.Input::get($divulgacion);
109
+    }
110
+  }
111
+
85 112
   //OUTCOMES Join criteria join program
86 113
   $programs = DB::table('programs')
87
-                        ->select('id')
114
+                        ->select('id','name')
88 115
                         ->orderBy('name', 'asc')
89 116
                         ->get();
90 117
 
91 118
 
119
+
120
+   // $program
121
+   $tables_names = '{';
122
+   foreach ($programs as $program) {
123
+     $tables_names = $tables_names.'"table'.$program->id.'" : "'.$program->name.'",';// code...
124
+   }
125
+   $tables_names = $tables_names.'}';
126
+
92 127
    $title = "Programs Reports";
93 128
    // $title = "Program Report: ".$program->name;
94 129
 
@@ -102,7 +137,7 @@ public function showReport()
102 137
                            ->join('programs','programs.id','=','criteria.program_id')
103 138
                            ->join('courses','courses.program_id','=','programs.id')
104 139
                            ->where('programs.id',$program->id)
105
-                           ->select('outcomes.name')
140
+                           ->select('outcomes.name','outcomes.activation_date')
106 141
                            ->distinct()
107 142
                            ->orderBy('outcomes.name', 'asc')
108 143
                            ->get();
@@ -133,7 +168,7 @@ public function showReport()
133 168
    }
134 169
 
135 170
 
136
-   return View::make('local.managers.shared.program_report', compact('title','programs_info'));
171
+   return View::make('local.managers.shared.program_report', compact('title','programs_info','selected_divulgaciones','selected_semesters','tables_names'));
137 172
 }
138 173
 
139 174
   /**
@@ -197,8 +232,9 @@ public function showReport()
197 232
     $title = "Programs by School";
198 233
     $programs = Program::orderBy('name')->get();
199 234
     $schools = School::all();
235
+    $semesters = Semester::all();
200 236
 
201
-    return View::make('local.managers.shared.programs', compact('programs', 'schools', 'title'));
237
+    return View::make('local.managers.shared.programs', compact('programs', 'schools', 'semesters', 'title'));
202 238
   }
203 239
 
204 240
   /**

+ 1
- 1
app/routes.php Dosyayı Görüntüle

@@ -291,7 +291,7 @@ Route::group(array('before' => 'auth|has_access'), function()
291 291
         Route::get('school-coordinator', 'SchoolCoordinatorsController@overview');
292 292
         Route::get('school/{id}', 'SchoolsController@show');
293 293
         Route::get('program/{id}', 'ProgramsController@show');
294
-        Route::get('programs/report', 'ProgramsController@showReport');
294
+        Route::post('programs/report', 'ProgramsController@showReport');
295 295
         Route::get('programs', 'ProgramsController@index');
296 296
         Route::get('template-list', 'TemplatesController@schoolCoordinatorIndex');
297 297
 

+ 26
- 1
app/views/global/view-learning-outcomes-criteria.blade.php Dosyayı Görüntüle

@@ -13,10 +13,35 @@
13 13
 @stop
14 14
 
15 15
 @section('main')
16
+  {{-- TODO: look where to place this script.
17
+          if placed inside .ready() or before it,
18
+            an error that the function is not defined occurs. --}}
19
+  {{-- TODO: no reconoce acentos --}}
20
+  <script type="text/javascript">
21
+  function filterOutcomes() {
22
+    // Declare variables
23
+    var input, filter, div, li, i, outcomeText;
24
+    input = document.getElementById('userInput');
25
+    filter = input.value.toUpperCase();
26
+    div = document.getElementById("list");
27
+    li = div.getElementsByTagName('li');
28
+
29
+    // Loop through all list items, and hide those who don't match the search query
30
+    for (i = 0; i < li.length; i++) {
31
+      outcomeText = li[i].textContent;
32
+      if (outcomeText.toUpperCase().indexOf(filter) > -1) {
33
+        li[i].style.display = "";
34
+      } else {
35
+        li[i].style.display = "none";
36
+      }
37
+    }
38
+  }
39
+  </script>
16 40
 
17 41
   <div class="row">
18 42
     <div class="col-md-3">
19
-      <div class="list-group">
43
+      <input class="form-control" type="text" id="userInput" onkeyup="filterOutcomes()" placeholder="Search for Learning Outcomes..">
44
+      <div class="list-group" id='list'>
20 45
         @foreach ($outcomes as $outcome)
21 46
           @foreach ($semesters as $semester)
22 47
             @if(!$outcome->deleted_at && $outcome->activation_date >= $semester->start && $outcome->activation_date <= $semester->end)

+ 26
- 1
app/views/global/view-objectives-criteria.blade.php Dosyayı Görüntüle

@@ -13,10 +13,35 @@
13 13
 @stop
14 14
 
15 15
 @section('main')
16
+  {{-- TODO: look where to place this script.
17
+          if placed inside .ready() or before it,
18
+            an error that the function is not defined occurs. --}}
19
+  {{-- TODO: no reconoce acentos --}}
20
+  <script type="text/javascript">
21
+  function filterObjectives() {
22
+    // Declare variables
23
+    var input, filter, div, li, i, objectiveText;
24
+    input = document.getElementById('userInput');
25
+    filter = input.value.toUpperCase();
26
+    div = document.getElementById("list");
27
+    li = div.getElementsByTagName('li');
28
+
29
+    // Loop through all list items, and hide those who don't match the search query
30
+    for (i = 0; i < li.length; i++) {
31
+      objectiveText = li[i].textContent;
32
+      if (objectiveText.toUpperCase().indexOf(filter) > -1) {
33
+        li[i].style.display = "";
34
+      } else {
35
+        li[i].style.display = "none";
36
+      }
37
+    }
38
+  }
39
+  </script>
16 40
 
17 41
   <div class="row">
18 42
     <div class="col-md-3">
19
-      <div class="list-group">
43
+      <input class="form-control" type="text" id="userInput" onkeyup="filterObjectives()" placeholder="Search for Learning Outcomes..">
44
+      <div class="list-group" id='list'>
20 45
         @foreach ($objectives as $objective)
21 46
           <li data-objective-id="{{ $objective->id }}"class="list-group-item">{{ $objective->text }}</li>
22 47
         @endforeach

+ 2
- 2
app/views/layouts/master.blade.php Dosyayı Görüntüle

@@ -164,7 +164,7 @@
164 164
         /////
165 165
 
166 166
         var table = null;
167
-        var tables = [];
167
+        // var tables = [];
168 168
         $('.datatable').each(function()
169 169
         {
170 170
             table = $(this).DataTable({
@@ -271,7 +271,7 @@
271 271
                     }
272 272
                 ],
273 273
             });
274
-            tables.push(table);
274
+            // tables.push(table);
275 275
 
276 276
             // Apply the search
277 277
             table.columns().every( function ()

+ 185
- 6
app/views/local/managers/shared/program_report.blade.php
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 94
- 1
app/views/local/managers/shared/programs.blade.php Dosyayı Görüntüle

@@ -11,7 +11,76 @@
11 11
 @stop
12 12
 
13 13
 @section('main')
14
-  <a href="{{ action('ProgramsController@showReport'); }}" class="btn btn-primary pull-right" alt="print">Report</a>
14
+  <button class="btn btn-lg btn-primary pull-right" id='show'>Custom Report</button>
15
+  <div class="" id='make_report'>
16
+    <hr>
17
+    <b><h3>Report Options</h3><br></b>
18
+    {{-- For for adding a new outcome --}}
19
+    {{ Form::open(array('action' => 'ProgramsController@showReport')) }}
20
+    <div class="row">
21
+      <div class="col-md-1">
22
+      </div>
23
+      <div class="col-md-5">
24
+      {{ Form::label('name', 'Select which semesters to report on') }}<br>
25
+          @foreach ($semesters as $semester)
26
+            @if ($semester->is_visible)
27
+              <div class="form-group">
28
+                <input type="checkbox" id="semester{{$semester->id}}" name="semester{{$semester->id}}" value="semester{{$semester->id}}">
29
+                <label for="semester{{$semester->id}}">{{$semester->name}}({{$semester->code}})</label>
30
+                {{-- {{ Form::checkbox('semester'.$semester->id, $semester->name, array('class' => 'form-control', 'id'=>$semester->id)) }}
31
+                {{ Form::label('semester'.$semester->id, $semester->name.'('.$semester->code.')') }}<br> --}}
32
+              </div>
33
+            @endif
34
+          @endforeach
35
+      </div>
36
+      <div class="col-md-6">
37
+        {{ Form::label('divulgacion', 'Select metodos de divulgacion') }}<br>
38
+        <div class="form-group">
39
+          <input type="checkbox" id="profesores" name="profesores" value="Profesores (pares)">
40
+          <label for="profesores">Profesores (pares)</label>
41
+        </div>
42
+        <div class="form-group">
43
+          <input type="checkbox" id="comiteDepartamental" name="comiteDepartamental" value="Comites de curriculo departamental">
44
+          <label for="comiteDepartamental">Comites de curriculo departamental</label>
45
+        </div>
46
+        <div class="form-group">
47
+          <input type="checkbox" id="comiteFacultadEscuela" name="comiteFacultadEscuela" value="Comites de curriculo  de Facultad o Escuela">
48
+          <label for="comiteFacultadEscuela">Comites de curriculo  de Facultad o Escuela</label>
49
+        </div>
50
+        <div class="form-group">
51
+          <input type="checkbox" id="pleno" name="pleno" value="Pleno de la Facultad">
52
+          <label for="pleno">Pleno de la Facultad</label>
53
+        </div>
54
+        <div class="form-group">
55
+          <input type="checkbox" id="estudiantes" name="estudiantes" value="Estudiantes">
56
+          <label for="estudiantes">Estudiantes</label>
57
+        </div>
58
+        <div class="form-group">
59
+          <input type="checkbox" id="administrativos" name="administrativos" value="Administrativos">
60
+          <label for="administrativos">Administrativos</label>
61
+        </div>
62
+        <div class="form-group">
63
+          <input type="checkbox" id="senado" name="senado" value="Senado">
64
+          <label for="senado">Senado</label>
65
+        </div>
66
+        <div class="form-group">
67
+          <input type="checkbox" id="comunidadWeb" name="comunidadWeb" value="Comunidad (pagina web)">
68
+          <label for="comunidadWeb">Comunidad (pagina web)</label>
69
+        </div>
70
+        <div class="form-group">
71
+          <input type="checkbox" id="otros" name="otros" value="Otros">
72
+          <label for="otros">Otro- <input type="text" id='otherBox'></label>
73
+        </div>
74
+      </div>
75
+    </div>
76
+    <div class="row">
77
+      <div class=""><button type="submit" id='submit' class="btn btn-lg btn-primary center-block">Create Report</button></div>
78
+    </div>
79
+    {{ Form::close() }}
80
+    <hr>
81
+    <button class="btn btn-lg btn-primary pull-right" id='hide'>Hide Form</button>
82
+  </div>
83
+
15 84
 <div class="row">
16 85
   <div class="col-md-12">
17 86
       <table class="table table-condensed table-stripedd datatable">
@@ -48,3 +117,27 @@
48 117
 @include('global._datatables_js')
49 118
 
50 119
 @stop
120
+
121
+@section('javascript')
122
+
123
+      $('#make_report').hide();
124
+
125
+      //show form
126
+      $('#show').on('click', function(e)
127
+      {
128
+        $('#make_report').show();
129
+        $('#show').hide();
130
+      });
131
+
132
+      //hide form
133
+      $('#hide').on('click', function(e)
134
+      {
135
+        $('#make_report').hide();
136
+        $('#show').show();
137
+      });
138
+
139
+      //on submit, change value of the checkbox input of id 'other'
140
+      $('#submit').click(function(){
141
+        $('#otros').val('Otro- '+$('#otherBox').val());
142
+      });
143
+@stop

BIN
trabajoRealizado. primer semestre 2020-2021.pdf Dosyayı Görüntüle