Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .github/workflows/continous-integration.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/release.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
52 changes: 52 additions & 0 deletions controller/TaoFooBar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line,

<?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;

Choose a reason for hiding this comment

The 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');
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing \n

12 changes: 12 additions & 0 deletions controller/structures.xml
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>

Choose a reason for hiding this comment

The 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
for PHP --> psr12
for Js we have a specific tool

Empty file modified scripts/update/Updater.php
100644 → 100755
Empty file.
Empty file modified test
100644 → 100755
Empty file.
Empty file modified test2
100644 → 100755
Empty file.
Empty file modified views/build/grunt/sass.js
100644 → 100755
Empty file.
Empty file modified views/css/foo.css
100644 → 100755
Empty file.
Empty file modified views/css/foo.css.map
100644 → 100755
Empty file.
26 changes: 26 additions & 0 deletions views/js/controller/Foo/barex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@


define([], function(){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format check please,
also the second commit looks good but the initial one is not as you have not used the conventional commits

'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`);
}
};

});
Empty file modified views/js/controller/Foo/foodex.js
100644 → 100755
Empty file.
Empty file modified views/js/controller/Foo/index.js
100644 → 100755
Empty file.
Empty file modified views/js/controller/Foo/moodex.js
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion views/js/controller/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*
*/


//@see http://forge.taotesting.com/projects/tao/wiki/Front_js
define(function(){
'use strict';
Expand All @@ -29,7 +30,8 @@ define(function(){
'foodex' : 'controller/Foo/foodex',
'moodex' : 'controller/Foo/foodex',
'yoodex' : 'controller/Foo/foodex',
'ploodex' : 'controller/Foo/foodex'
'ploodex' : 'controller/Foo/foodex',
'barex' : 'controller/Foo/barex'
}
}
};
Expand Down
Empty file modified views/js/loader/taoFooBar.min.js
100644 → 100755
Empty file.
Empty file modified views/js/loader/taoFooBar.min.js.map
100644 → 100755
Empty file.
Empty file modified views/js/test.js
100644 → 100755
Empty file.
Empty file modified views/package-lock.json
100644 → 100755
Empty file.
Empty file modified views/package.json
100644 → 100755
Empty file.
Empty file modified views/scss/foo.scss
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions views/templates/foobar.tpl
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>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing \n