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