Commit b544595e authored by Robert Lyon's avatar Robert Lyon

Bug 1536393: tidying up some final bits of the plugin

1) Moving the template files to correct theme/raw/plugintype subdir
2) Removing the old thumb image
3) Removing the non english translation files - they should be
translated as part of the lang pack
4) Adding a basic behat test
5) Adding some warning styles to messages where there are no badges to choose from

Change-Id: I897f02bc233879296f3156cd282d84a61fc1df45
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 3835b699
......@@ -43,13 +43,17 @@ if ((badgegroups_hosts instanceof Array && badgegroups_hosts.length >= 1)
count++;
/* Fetching the badge info via ajax and render the pieform checkbox element */
sendjsonrequest(config['wwwroot'] + '/blocktype/openbadgedisplayer/badgegroupnames.json.php', params, 'POST', function(data) {
var icon = jQuery('<span class="icon icon-lg icon-exclamation-triangle left" aria-hidden="true" role="presentation"></span>');
var container = jQuery('<div class="alert alert-warning" role="alert">');
if (!data.uid) {
var msg = jQuery('<p>').text(data.nobackpackmsg);
jQuery("div#instconf_loadinginfo_container > div").append(msg);
var msg = jQuery('<span>').text(data.nobackpackmsg);
container.append(icon).append(msg);
jQuery("div#instconf_loadinginfo_container > div").append(container);
}
else if (!data.badgegroups || data.badgegroups.length === 0) {
var msg = jQuery('<p>').text(data.nobadgegroupsmsg);
jQuery("div#instconf_loadinginfo_container > div").append(msg);
var msg = jQuery('<span>').text(data.nobadgegroupsmsg);
container.append(icon).append(msg);
jQuery("div#instconf_loadinginfo_container > div").append(container);
}
else {
var htmlstr =
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2009 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* 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, either version 3 of the License, or
* (at your option) any later version.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage lang
* @author Discendum Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2011 Discendum Ltd http://discendum.com
* @copyright (C) 2006-2009 Catalyst IT Ltd http://catalyst.net.nz
*
*/
defined('INTERNAL') || die();
$string['badgedetails'] = 'Merkin tiedot';
$string['confighelp'] = 'Valitse merkkiryhmät, joiden merkit näytetään tässä lohkossa.<br> Kirjaudu seuraaviin palveluihin hallitaksesi merkkejä ja merkkiryhmiä:<br/>%s';
$string['criteria'] = 'Kriteeri';
$string['desc'] = 'Kuvaus';
$string['description'] = 'Näytä Open Badget';
$string['evidence'] = 'Todiste';
$string['expires'] = 'Vanhenee';
$string['issuancedetails'] = 'Myöntämistiedot';
$string['issuedon'] = 'Myönnetty';
$string['issuerdetails'] = 'Myöntäjän tiedot';
$string['name'] = 'Nimi';
$string['nbadges'] = array(
0 => 'yksi merkki',
1 => '%s merkkiä',
);
$string['nobackpack'] = 'Backpackia ei löydy.<br> Lisää <a href="%s">Backpackiin</a> kytketty sähköpostiosoite <a hreft="%s">profiiliisi.</a>';
$string['nogroups'] = 'Julkisia merkkejä ei löydy.';
$string['obppublicbadges'] = 'Kaikki julkiset merkit Open Badge Passportissa';
$string['organization'] = 'Organisaatio';
$string['title'] = 'Open Badge -merkit';
$string['title_backpack'] = 'Mozilla Backpack';
$string['title_passport'] = 'Open Badge Passport';
$string['url'] = 'URL';
\ No newline at end of file
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2009 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* 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, either version 3 of the License, or
* (at your option) any later version.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage lang
* @author Discendum Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2011 Discendum Ltd http://discendum.com
* @copyright (C) 2006-2009 Catalyst IT Ltd http://catalyst.net.nz
*
*/
defined('INTERNAL') || die();
$string['badgedetails'] = 'Badge Detaljer';
$string['confighelp'] = 'Välj badge samlingen som skall visas i detta block.<br> Gå till din <a href="%s">Ryggsäck</a> för att hantera samlingar och badges.';
$string['criteria'] = 'Kriterium';
$string['desc'] = 'Beskrivning';
$string['description'] = 'Visa Open Badges';
$string['evidence'] = 'Bevis';
$string['expires'] = 'Går ut';
$string['issuancedetails'] = 'Utfärdande Detaljer';
$string['issuedon'] = 'Beviljad På';
$string['issuerdetails'] = 'Utgivarens Detaljer';
$string['name'] = 'Namn';
$string['nbadges'] = array(
0 => '1 badge',
1 => '%s badges',
);
$string['nobackpack'] = 'Ingen ryggsäck hittades.<br> Lägg till din <a href="%s">Ryggsäcks</a> e-post adress till din <a href="%s">profil</a>.';
$string['nogroups'] = 'Inga allmänna badge samlingar hittades.';
$string['organization'] = 'Organisation';
$string['title'] = 'Open Badges';
$string['url'] = 'URL';
@javascript @core @blocktype @blocktype_openbadgedisplayer
Feature: The openbadges block should be present
In order to make sure it is installed
As a user I add the block to a page
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | member |
And the following "pages" exist:
| title | description| ownertype | ownername |
| Page 1 | page P1 | user | userA |
Scenario: Open badges block
# As the open badges block normally fetches user data from third
# party site we can't currently test that part and ship the details in this test
# So all we can do is check that the block exists and saves to a page
Given I log in as "userA" with password "Kupuhipa1"
And I choose "Pages" in "Portfolio"
And I follow "Edit \"Page 1\""
And I expand "External" node
And I wait "1" seconds
And I follow "Open Badges"
And I press "Add"
And I wait "5" seconds
Then I should see "Your email is not found in the service"
And I press "Save"
Then I should see "No public badge collections/badges found."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment