/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/application/controllers/ViewStudentsController.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-05-28 08:37:06 UTC
  • mfrom: (83.2.14 pvp)
  • Revision ID: gustav.hartvigsson@gmail.com-20130528083706-s3ik84n3929rldju
Merged Bigestans:s changes:

* Started work on the viewStudents functionality... So far, displaying users works and it outputs correct and standardized html.
* Still plenty to do though.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
class ViewStudentsController extends CI_Controller {
4
4
 
5
 
        public function index()
 
5
        public function index() {
 
6
                $this->load->model('user');
 
7
                $this->load->model('admin/admin_model');
 
8
 
 
9
                // NOTE: viewstudents is a deprecated model. Should eventually be replaced by a proper model
 
10
                $this->load->model('viewstudents');
 
11
 
 
12
                $userName = $this->user->getUserName();
 
13
                $userType = $this->user->getUserType();
 
14
                
 
15
                //Creates an array with the necessary css- and jsfiles needed for the views that are about to be shown.
 
16
                $headTagData = array(
 
17
                        'cssFiles' => array('bannermenu', 'sidemenu', 'dummieContent', 'viewStudents', 'body'),//cms tillfällig sida
 
18
                        'jsFiles' => array('bannermenu', 'viewStudents')
 
19
                );
 
20
                
 
21
                //Puts the array above in <head></head>
 
22
                $this->load->view('headTag', array('headTagData' => $headTagData));     
 
23
 
 
24
                $students = $this->viewstudents->getStudents();
 
25
                
 
26
                $this->load->view('viewStudentsBody', array('students' => $students));
 
27
        }
 
28
 
 
29
        public function index_old()
6
30
        {
7
31
                /* headData manages the <head>-tag and loads corresponding CSS.
8
32
                 * The views that are entered will load CSS with same name.