Skip to content

Commit a485e09

Browse files
committed
Merge pull request #612 from LearningLocker/develop
v1.3.11
2 parents 1626f14 + 27523bf commit a485e09

31 files changed

+806
-95
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ install:
1313
before_script:
1414
- phpenv config-add travisconfig.ini
1515
- sleep 3
16+
- sudo chmod -R 777 ./uploads
1617
- php artisan migrate --env="testing"
1718

1819
script: ./vendor/bin/phpunit
@@ -24,4 +25,4 @@ notifications:
2425
urls:
2526
- secure: "IH89fjFa94bV0+RCyoRYcUGpBDT/F87Vdpki+wH7HoowVN7Zsv0O+V6Bl6Xl31VqrEJ3KmBcVpm4KL3Fkv081NqRmC03pqyNmLhHzf10k2m6kFm52pwD6t8f4eoRHuCHnbFdAMBCBfQbXC8oVFXtSNtfISYikCrs6uZ/cwmAxWk="
2627
on_success: change
27-
on_failure: change
28+
on_failure: change

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.10
1+
1.3.11

app/controllers/LrsController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,10 @@ public function destroy($lrs_id){
191191
public function statements($lrs_id){
192192
$statements = (new StatementIndexer)->index(new IndexOptions([
193193
'lrs_id' => $lrs_id,
194-
'ascending' => false,
195194
'limit' => $this->statement->count([
196195
'lrs_id' => $lrs_id
197196
])
198-
]))->paginate(15);
197+
]))->orderBy('statement.stored', 'DESC')->paginate(15);
199198

200199
return View::make('partials.statements.list', array_merge($this->getLrs($lrs_id), [
201200
'statements' => $statements,

app/controllers/xapi/StatementIndexController.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,24 +94,27 @@ private function makeStatementsResult(array $statements, $count, array $opts) {
9494
* @return \stdClass
9595
*/
9696
private function makeAttachmentsResult(array $statements, $count, array $opts) {
97-
$content_type = 'multipart/mixed; boundary='.static::BOUNDARY;
98-
$statement_result = "Content-Type:application/json{static::EOL}{static::EOL}".$this->makeStatementsResult(
97+
$boundary = static::BOUNDARY;
98+
$eol = static::EOL;
99+
$content_type = 'multipart/mixed; boundary='.$boundary;
100+
$statement_result = "Content-Type:application/json$eol$eol".$this->makeStatementsResult(
99101
$statements,
100102
$count,
101103
$opts
102104
);
103-
$body = "--{static::BOUNDARY}{static::EOL}".implode(
104-
"{static::EOL}--{static::BOUNDARY}{static::EOL}",
105-
array_merge([$statement_result], array_map(function ($attachment) {
105+
106+
return "--$boundary$eol".implode(
107+
"$eol--$boundary$eol",
108+
array_merge([$statement_result], array_map(function ($attachment) use ($eol, $boundary) {
106109
return (
107-
'Content-Type:'.$attachment->content_type.static::EOL.
108-
'Content-Transfer-Encoding:binary'.static::EOL.
110+
'Content-Type:'.$attachment->content_type.$eol.
111+
'Content-Transfer-Encoding:binary'.$eol.
109112
'X-Experience-API-Hash:'.$attachment->hash.
110-
static::EOL.static::EOL.
113+
$eol.$eol.
111114
$attachment->content
112115
);
113116
}, $this->statements->getAttachments($statements, $opts)))
114-
)."{static::EOL}--{static::BOUNDARY}--";
117+
)."$eol--$boundary--";
115118
}
116119

117120
private function getMoreLink($count, $limit, $offset) {

app/controllers/xapi/StatementStoreController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(StatementRepo $statement_repo) {
2424
*/
2525
private function getParts() {
2626
$content = \LockerRequest::getContent();
27-
$contentType = \LockerRequest::header('content-type');
27+
$contentType = \LockerRequest::header('Content-Type');
2828
$types = explode(';', $contentType, 2);
2929
$mimeType = count($types) >= 1 ? $types[0] : $types;
3030

@@ -95,7 +95,7 @@ public function update($lrs_id) {
9595
* @return AssocArray Result of storing the statements.
9696
*/
9797
private function createStatements($lrs_id, Callable $modifier = null) {
98-
Helpers::validateAtom(new XApiImt(LockerRequest::header('Content-Type')));
98+
Helpers::validateAtom(new XApiImt(explode(';', LockerRequest::header('Content-Type'))[0]));
9999

100100
// Gets parts of the request.
101101
$parts = $this->getParts();

app/lang/de_DE/api.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
return [
4+
'errors' => [
5+
'not_found' => 'Die Klasse :class mit der id `:id` konnte nicht gefunden werden.'
6+
],
7+
'info' => [
8+
'trace' => 'Um einen Trace zu erhalten muss die Einstellung `debug` auf `true` gesetzt sein.'
9+
]
10+
];

app/lang/de_DE/apps.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
|----------------------------------------------------------------------------
5+
| Translations for APP / OAuth pages
6+
|----------------------------------------------------------------------------
7+
*/
8+
9+
return array(
10+
'list' => 'Apps',
11+
'create' => 'Neue App erstellen',
12+
'show' => 'App details',
13+
'no_data' => 'Keine Information vorhanden.',
14+
15+
//API calls
16+
'api' => array(
17+
'invalid_route' => 'Das ist eine ungültige Route. Die Gruppierung oder freie Filterung könnte eine Lösung darstellen.',
18+
),
19+
);

app/lang/de_DE/exporting.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
3+
/*
4+
|----------------------------------------------------------------------------
5+
| Translations for reporting
6+
|----------------------------------------------------------------------------
7+
*/
8+
9+
return [
10+
'title' => 'Exporte',
11+
'info' => 'Export information',
12+
'select' => [
13+
'report' => 'Report auswählen',
14+
'fields' => 'Felder auswählen'
15+
],
16+
'fields' => [
17+
'name' => 'Name',
18+
'description' => 'Beschreibung',
19+
'created' => 'Erstellt'
20+
],
21+
'actions' => [
22+
'saved' => 'Der Export wurde gespeichert.',
23+
'save' => 'Speichern',
24+
'download' => 'Download',
25+
'add' => [
26+
'field' => 'Feld hinzufügen',
27+
'export' => 'Export hinzufügen'
28+
],
29+
'edit' => 'Bearbeiten',
30+
'delete' => 'Löschen'
31+
],
32+
'new' => [
33+
'name' => 'Neuer Export',
34+
'description' => 'Ein neuer Export.'
35+
],
36+
'errors' => [
37+
'noReport' => 'Muss einen Report enthalten.',
38+
'noFields' => 'Muss mindestens ein Feld beinhalten.',
39+
'mustSave' => 'Dieser neue Report muss gespeichert werden, bevor man ihn herunterladen kann.',
40+
'notFound' => 'Der Export mit der id `:exportId` wurde nicht gefunden.',
41+
'reportExistence' => 'Dieser Report existiert nicht',
42+
'delete' => 'Der Report konnte nicht gelöscht werden.',
43+
'undefinedKey' => '`:key` ist nicht definiert.'
44+
],
45+
'placeholders' => [
46+
'statementField' => 'Statement Feldname',
47+
'userField' => 'Feldname',
48+
'name' => 'Name dieses Exports',
49+
'description' => 'Beschrebung dieses Exports'
50+
],
51+
'unknown' => 'Unbekannt'
52+
];

app/lang/de_DE/lrs.php

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
3+
/*
4+
|----------------------------------------------------------------------------
5+
| Translations for LRSs
6+
|----------------------------------------------------------------------------
7+
*/
8+
9+
return array(
10+
'add' => 'Neues LRS',
11+
'home' => 'LRS Übersicht',
12+
'create' => 'LRS erstellen',
13+
'delete_confirm' => 'Soll dieses LRS wirklich gelöscht werden? DIESE AKTION IST UNUMKEHRBAR UND ALLE STATEMENTS WERDEN UNWIEDERBRINGLICH GELÖSCHT.',
14+
'edit' => 'LRS bearbeiten',
15+
'new' => 'Neues LRS anlegen',
16+
'verify' => 'Die <a href=":verify_link">E-Mail muss verifiziert werden</a> um ein neues LRS erstellen zu können.',
17+
'list' => 'LRS List',
18+
'none' => 'Es sind keine LRSs vorhanden.',
19+
'reporting' => 'Reporting',
20+
'deleted' => 'Das LRS wurde gelöscht',
21+
'updated' => 'Das LRS wurde aktualisiert',
22+
'create_problem' => 'Es gab ein Problem bei der Erstellung des LRS.',
23+
'created' => 'Das LRS wurde erstellt.',
24+
'active' => 'Aktiv',
25+
26+
'sidebar' => array(
27+
'dash' => 'Dashboard',
28+
'edit' => 'LRS details bearbeiten',
29+
'endpoint' => 'xAPI statements',
30+
'api' => 'LRS API',
31+
'users' => 'Benutzer verwalten',
32+
'analytics' => 'Analytik',
33+
'reporting' => 'Report',
34+
'exporting' => 'Export'
35+
),
36+
37+
'endpoint' => array(
38+
'endpoint' => 'Endpoint',
39+
'basic_http' => 'Basic HTTP Authentifizierung',
40+
'submit' => 'Akzeptiere xAPI Statements',
41+
'instructions' => 'xAPI statements müssen mit Authentifizierung an den folgenden Enpoint übermittelt werden.',
42+
'new_key_secret' => 'Neuen Key und Secret erzeugen'
43+
),
44+
45+
'api' => array(
46+
'oauth' => 'OAuth 2.0',
47+
'settings' => 'API Einstellungen',
48+
'api' => 'LRS API'
49+
),
50+
51+
'client' => array(
52+
'manageclients' => 'Weiter Clients verwalten',
53+
'manageclients_intro' => 'Es kann für jede Anwendung oder benutzer der auf das LRS über die xapi zugreifen soll ein neuer Client angelegt werden.',
54+
'new_client' => 'Neuen Client erstellen',
55+
'unnamed_client' => 'Unbenannter Client',
56+
'created_fail' => 'Der Client konnte nicht erstellt werden.',
57+
'created_sucecss' => 'Der Client wurde erstellt.',
58+
'updated' => 'Der Client wurde aktualisiert.',
59+
'none' => 'Es sind keine Clients verfügbar.',
60+
'delete_client_success' => 'Der Client wurde gelöscht.',
61+
'delete_client_error' => 'Der Client konnte nicht gelöscht werden.',
62+
'authority' => array(
63+
'ifi' => 'Identifier',
64+
'mbox' => 'E-Mail',
65+
'mbox_sha1sum' => 'Verschlüsselte E-Mail',
66+
'openid' => 'OpenID',
67+
'account' => 'Account',
68+
'accountname' => 'Account Name',
69+
'accounthomepage' => 'Account Homepage'
70+
)
71+
72+
),
73+
74+
'update_key' => 'Der Key wurde aktualisiert.',
75+
'update_key_error' => 'Der Key und Secret konnten nicht aktualisiert werden.',
76+
'remove_user' => 'Der Benutzer wurde aus dem LRS entfernt.'
77+
);

app/lang/de_DE/pagination.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
return array(
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Pagination Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines are used by the paginator library to build
11+
| the simple pagination links. You are free to change them to anything
12+
| you want to customize your views to better match your application.
13+
|
14+
*/
15+
16+
'previous' => '&laquo; Zurück',
17+
18+
'next' => 'Weiter &raquo;',
19+
20+
);

0 commit comments

Comments
 (0)