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

  • Committer: elof.bigestans at gmail
  • Date: 2013-05-28 11:22:15 UTC
  • mfrom: (112 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 113.
  • Revision ID: elof.bigestans@gmail.com-20130528112215-d6qidnvlxm7w29di
* Merged trunk AND
* Modified js/login.js and js/bannermenu.js, specifically functions related to the login popup! 

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
*/
12
12
class Codeviewer extends CI_Controller {
13
13
 
 
14
        /*Temporarily redirects the user to the startpage*/
 
15
        public function index(){
 
16
                redirect('/');
 
17
        }
 
18
 
14
19
        /**
15
20
        * This shows the codeviewer page
16
21
        */
17
 
        public function show($course, $example, $page){
 
22
        public function show($cid, $category, $subcategory, $example){
 
23
                $headTagData['cssFiles'] = array('headTag', 'header', 'codeviewer');
 
24
                $headTagData['jsFiles'] = array('ace/ace', 'header');
 
25
        
18
26
                $this->load->model('codeviewer/Codeviewer_model');
19
27
 
20
 
                $editorHTML = $this->Codeviewer_model->getCode($course, $example, $page);
21
 
 
22
 
                $doc = $this->Codeviewer_model->getDoc($course, $example, $page);
 
28
                $editorHTML = $this->Codeviewer_model->getCode($cid, $category, $subcategory, $example);
 
29
        
 
30
                $this->load->model('user');
 
31
                
 
32
                $userInfo = array(
 
33
                        'userType' => $this->user->getUserType(),
 
34
                        'userName' => $this->user->getUserName()
 
35
                );
 
36
                
 
37
                $this->load->helper('form');
 
38
                
 
39
                // $doc = $this->Codeviewer_model->getDoc($cid, $category, $subcategory, $example);
23
40
 
24
41
                // This loads the view. It's stored in application/views/codeviewer/codeviewer.php
25
42
                // Do note that application/views should not be in the first argument of view()
26
43
                // The second argument is data to be shown in the view. "editors" => "test" would
27
44
                // generate an $editors variable in the view containing "test"
28
 
                $this->load->view('codeviewer/codeviewer', array("editors" => $editorHTML, "documentation" => $doc));
 
45
                $this->load->view('headTag', array('headTagData' => $headTagData));
 
46
                $this->load->view('header', $userInfo);
 
47
                $this->load->view('codeviewer/codeviewer', array("editors" => $editorHTML));
29
48
        }
30
 
}
 
 
b'\\ No newline at end of file'
 
49
}