/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: Gustav Hatvigsson
  • Date: 2013-05-28 12:14:12 UTC
  • mfrom: (109.1.2 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130528121412-m9lt45yzezb2vqxy
Merged Andersson:s changes:
Added the functions getPublicCourses(), getPrivateCourses() and getStudentCourses().
* getPublicCourses() returns all the public courses.
* getPrivateCourses() returns the private and published courses a student is registred to.
* getStudentCourses() returns both public and private courses for a student.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
                        }
47
47
                }               
48
48
                
 
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
                
49
63
                /*
50
64
                 *      This function draws the cms page.
51
65
                 */