/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: c11emian
  • Date: 2013-05-28 11:49:27 UTC
  • mto: This revision was merged to the branch mainline in revision 114.
  • Revision ID: c11emian@student.his.se-20130528114927-8vg65yivt86zjceq
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:
45
45
                        }
46
46
                }               
47
47
                
 
48
                public function test(){
 
49
                        
 
50
                        $result = $this->admin_model->getStudentCourses("student");
 
51
                        foreach($result as $res) {
 
52
                                echo $res->courseID. ' - ';
 
53
                                echo $res->name;
 
54
                                echo "<br>";
 
55
                                
 
56
                        }
 
57
                        
 
58
                        //var_dump($result);
 
59
                }
 
60
                
 
61
                
48
62
                /*
49
63
                 *      This function draws the cms page.
50
64
                 */