/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:46:36 UTC
  • mto: This revision was merged to the branch mainline in revision 124.
  • Revision ID: elof.bigestans@gmail.com-20130528144636-o8lj9sc4y2p7z5xc
* Moved login JS to bannermenu.js and removed login.js 
* Removed deprecated login CSS and JS 
* Fixed login functionality -- now shows validation errors directly in the login popup, works through ajax
* Added a nifty little icon to represent the disabled login hint button

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                        $userName = $this->user->getUserName();
68
68
                        $userType = $this->user->getUserType();
69
69
                        $activeCourse = $this->user->getActiveCourse();
70
 
                        //Creates an array with all courses.
71
 
                        $courses = $this->admin_model->getCourses();
 
70
 
 
71
                        if($userName != "" && $userType == "Teacher") {
 
72
                                //Creates an array with all courses.
 
73
                                $courses = $this->admin_model->getCourses();
 
74
                        } elseif($userName != "" && $userType == "Student") {
 
75
                                $courses = $this->admin_model->getStudentCourses($userName);
 
76
                        } else {
 
77
                                $courses = $this->admin_model->getPublicCourses();
 
78
                        }
 
79
 
 
80
 
72
81
                        //Creates an array with all categories for active course
73
82
                        $categories = $this->admin_model->getCategories($activeCourse['courseID']);
74
83