Skip to content

Commit a226636

Browse files
authored
Merge pull request #833 from LearningLocker/develop
v1.13.2
2 parents d1f39b1 + f5fb66d commit a226636

File tree

9 files changed

+31
-23
lines changed

9 files changed

+31
-23
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
[![Build Status](https://travis-ci.org/LearningLocker/learninglocker.svg?branch=master)](https://travis-ci.org/LearningLocker/learninglocker)
55
[![Latest Stable Version](https://poser.pugx.org/learninglocker/learninglocker/v/stable.svg)](https://packagist.org/packages/learninglocker/learninglocker)
6-
[![Latest Unstable Version](https://poser.pugx.org/learninglocker/learninglocker/v/unstable.svg)](https://packagist.org/packages/learninglocker/learninglocker)
76
[![Total Downloads](https://poser.pugx.org/learninglocker/learninglocker/downloads.svg)](https://packagist.org/packages/learninglocker/learninglocker)
87
[![License](https://poser.pugx.org/learninglocker/learninglocker/license.svg)](http://opensource.org/licenses/GPL-3.0)
98
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/LearningLocker/learninglocker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -14,18 +13,19 @@
1413
Please see our [documentation](http://docs.learninglocker.net) for installation, configuration, and usage instructions.
1514

1615
## Developers
17-
You may contribute to this project via [issues](/issues) and [pull request](/pulls), however, please see the [guidelines](/contributing.md) before doing so. You can also contribute by updating our [documentation](https://github.com/LearningLocker/docs). More information about how you can get involved can be found on the [Learning Locker website](http://learninglocker.net/community/get-involved/). You can see our list of contributors in our [contributors.md file](/contributors.md).
16+
You may contribute to this project by:
1817

19-
### Getting Started
18+
- [Reporting issues](/issues).
19+
- [Updating code](/updating-code).
20+
- [Updating documentation](https://github.com/LearningLocker/docs).
21+
22+
### Updating Code
2023
1. Install Learning Locker's [requirements](http://docs.learninglocker.net/installation/#requirements).
2124
2. [Install and setup](http://docs.learninglocker.net/installation/) Learning Locker.
2225
3. Change the code.
23-
4. [Test](#testing) your code. See [testing](#testing) below for more information.
26+
4. [Test](#testing) your code by ensuring that `./vendor/bin/phpunit` runs without any errors.
2427
5. Repeat from Step 3 or continue to step 6.
2528
6. Commit and push your changes to Github.
2629
7. Create a [pull request](/pulls) on Github (ensuring that you follow the [guidelines](/contributing.md)).
2730

2831
Note that Learning Locker is built upon the [Laravel](http://laravel.com/) PHP framework. To learn more about the code structure, please view the [Laravel documentation](laravel.com/docs/).
29-
30-
### Testing
31-
You should try to ensure that `./vendor/bin/phpunit` runs without any errors before submitting a pull request.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.13.1
1+
1.13.2

app/database/migrations/2015_08_12_150203_ConsistentForeignKeyNames.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ public function up() {
1616
$this->changeForeignKey($db->reports, 'lrs', 'lrs_id', $lrs->_id, $convertToMongoId);
1717
$this->changeForeignKey($db->exports, 'lrs', 'lrs_id', $lrs->_id, $convertToMongoId);
1818

19-
$lrs->owner_id = $convertToMongoId($lrs->owner['_id']);
19+
if (isset($lrs->owner_id)) {
20+
$lrs->owner_id = $convertToMongoId($lrs->owner['_id']);
21+
}
22+
2023
$lrs->save();
2124

2225
echo 'Models for "'.$lrs->title.'" converted.'.PHP_EOL;

app/locker/repository/Statement/IndexOptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ class IndexOptions extends Options {
3434
'related_activities' => 'Boolean',
3535
'related_agents' => 'Boolean',
3636
'ascending' => 'Boolean',
37-
'format' => 'String',
37+
'format' => 'Str',
3838
'offset' => 'Integer',
3939
'limit' => 'Integer',
4040
'langs' => ['Language'],
4141
'attachments' => 'Boolean',
4242
'lrs_id' => null,
43-
'scopes' => ['String'],
43+
'scopes' => ['Str'],
4444
'client' => null
4545
];
4646

app/locker/repository/Statement/ShowOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class ShowOptions extends Options {
99
'lrs_id' => null,
1010
'voided' => 'Boolean',
1111
'active' => 'Boolean',
12-
'scopes' => ['String'],
12+
'scopes' => ['Str'],
1313
'client' => null
1414
];
1515
}

app/locker/repository/Statement/StoreOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class StoreOptions extends Options {
55
protected $types = [
66
'lrs_id' => null,
77
'authority' => 'Authority',
8-
'scopes' => ['String'],
8+
'scopes' => ['Str'],
99
'client' => null
1010
];
1111
}

app/models/Report.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,12 @@ public function getWhereAttribute() {
117117
}
118118
}
119119
}
120-
array_push($wheres, ['orArray', 'or', $actorArray]);
121-
array_push($wheres, ['orArray', 'or', $instructorArray]);
120+
if (!empty($actorArray)) {
121+
array_push($wheres, ['orArray', 'or', $actorArray]);
122+
}
123+
if (!empty($instructorArray)) {
124+
array_push($wheres, ['orArray', 'or', $instructorArray]);
125+
}
122126
}
123127

124128
$since = isset($reportArr['since']) ? $this->constructDate($reportArr['since']) : null;
@@ -132,6 +136,7 @@ public function getWhereAttribute() {
132136
$wheres[] = ['statement.timestamp', '<=', $until];
133137
}
134138

139+
135140
return $wheres;
136141
}
137142

composer.lock

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/assets/js/reports/reports/editLayout.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ define([
1818
if (query[field] == null) {
1919
query[field] = ['<>', '', ''];
2020
}
21-
22-
query[field][1 + !!min] = e.currentTarget.value;
21+
query[field][1 + !!min] = parseInt(e.currentTarget.value);
2322
});
2423
};
2524
var clearQueryField = function (field) {
@@ -125,4 +124,4 @@ define([
125124
languages: typeaheadHelpers.view('languages', 'Language', 'en-GB', typeaheadHelpers.displayItem)
126125
}
127126
});
128-
});
127+
});

0 commit comments

Comments
 (0)