-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/AUT-470/FooBar-Extension #192
base: master
Are you sure you want to change the base?
Changes from 2 commits
20eba6b
ffcf1a3
fbd1191
90fef07
8fb35b1
1df5004
10f1fc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
<?php | ||
|
||
/** | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2014-2020 (original work) Open Assessment Technologies SA; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bad year |
||
*/ | ||
|
||
namespace oat\taoF\controller; | ||
|
||
/** | ||
* Sample controller | ||
* | ||
* @author Open Assessment Technologies SA | ||
* @package taoFooBar | ||
* @license GPL-2.0 | ||
* | ||
*/ | ||
class TaoFooBar extends \tao_actions_CommonModule { | ||
|
||
/** | ||
* initialize the services | ||
*/ | ||
public function __construct(){ | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* A possible entry point to foobar | ||
*/ | ||
public function index() { | ||
$this->response = $this->getPsrResponse()->withBody(\GuzzleHttp\Psr7\stream_for(__('Hello World'))); | ||
} | ||
|
||
public function templateExample() { | ||
$this->setData('author', 'Open Assessment Technologies SA'); | ||
$this->setView('templates/foobar.tpl'); | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing \n |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE structures SYSTEM "../doc/structures.dtd"> | ||
<structures> | ||
<structure id="taoFooBar_main" name="taoFooBarLabel" level="15" group="main"> | ||
<description /> | ||
<icon id="icon-mobile-preview"/> | ||
<sections> | ||
<section id="taoFooBar_main" name="taoFooBarLabel" url="/taoFooBar/TaoFooBar/index" /> | ||
<section id="taoFooBar_other" name="Template" url="/taoFooBar/templates/foobar" /> | ||
</sections> | ||
</structure> | ||
</structures> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing \n also we need to allays format our code according to OAT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
|
||
define([], function(){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. format check please, |
||
'use strict'; | ||
|
||
return { | ||
start(){ | ||
|
||
if (!window.console) { | ||
return; | ||
} | ||
|
||
window.console.warn('Ooops'); | ||
window.console.log('My first tao Code') | ||
|
||
window.addEventListener('error', function(err){ | ||
window.console.error('oops error throwned',err); | ||
}); | ||
}, | ||
|
||
stop(){ | ||
window.console.log(`stop it`); | ||
} | ||
}; | ||
|
||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="main-container tao-scope"> | ||
<h1>Hello <?=(get_data('author'))?></h1> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing \n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line,