/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: b11johgu
  • Date: 2013-05-14 12:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 65.
  • Revision ID: b11johgu@student.his.se-20130514123038-rthxj3f34o32gpxy
ExamplesController:
- Added expand/collapse arrows for categories/subcategories.
- Added category positioning (incomplete).

more general changes made.

Show diffs side-by-side

added added

removed removed

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