/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/cms.php

  • Committer: elof.bigestans at gmail
  • Date: 2013-05-28 14:50:02 UTC
  • mto: This revision was merged to the branch mainline in revision 124.
  • Revision ID: elof.bigestans@gmail.com-20130528145002-eqx49p6p2lihypt7
* Removed temporary functions from cms controller: tempLogin(), tempLogout(), test()
* Cleaned up ajax.php and cms.php

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
                }
15
15
                
16
16
                /*
17
 
                 *Temporary function to be able to be logged in to reach the page
18
 
                 */
19
 
                public function tempLogin() {
20
 
                        $this->load->model('user');
21
 
                        $loginDetails = array(
22
 
                        'username' => 'tempTeacher',
23
 
                        'name' => 'tempFoo',
24
 
                        'usertype' => 'Teacher',
25
 
                        'ssn' => '0000',
26
 
                        'activeCourse' => 'DA525G');
27
 
                        $this->session->set_userdata('authenticated', $loginDetails);
28
 
                        redirect(base_url().'cms', 'refresh');
29
 
                }
30
 
                public function tempLogout() {
31
 
                        $this->load->model('user');
32
 
                        $this->session->unset_userdata('authenticated');
33
 
                        redirect(base_url().'home', 'refresh');
34
 
                }
35
 
                
36
 
                /*
37
17
                 *      This function runs when the user navigates directly to this controller
38
18
                 */
39
19
                public function index() {
46
26
                        }
47
27
                }               
48
28
                
49
 
                public function test(){
50
 
                        
51
 
                        $result = $this->admin_model->getStudentCourses("student");
52
 
                        foreach($result as $res) {
53
 
                                echo $res->courseID. ' - ';
54
 
                                echo $res->name;
55
 
                                echo "<br>";
56
 
                                
57
 
                        }
58
 
                        
59
 
                        //var_dump($result);
60
 
                }
61
 
                
62
 
                
63
29
                /*
64
30
                 *      This function draws the cms page.
65
31
                 */