Skip to content

Commit 2716682

Browse files
author
Daniel Abbey
committed
Fixed inclusion of Exceptions namespace
1 parent 8d472a5 commit 2716682

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

app/locker/data/dashboards/AdminDashboard.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ public function lrsCount(){
5858
*
5959
**/
6060
public function actorCount(){
61-
$mbox = intval( \Statement::distinct('statement.actor.mbox')->remember(5)->get()->count() );
62-
$openid = intval( \Statement::distinct('statement.actor.openid')->remember(5)->get()->count() );
63-
$mbox_sha1sum = intval( \Statement::distinct('statement.actor.mbox_sha1sum')->remember(5)->get()->count() );
64-
$account = intval( \Statement::distinct('statement.actor.account.name')->remember(5)->get()->count() );
65-
return ($mbox + $openid + $mbox_sha1sum + $account);
66-
}
61+
62+
$mbox = intval( \Statement::distinct('statement.actor.mbox')->remember(5)->count() );
63+
$openid = intval( \Statement::distinct('statement.actor.openid')->remember(5)->count() );
64+
$mbox_sha1sum = intval( \Statement::distinct('statement.actor.mbox_sha1sum')->remember(5)->count() );
65+
$account = intval( \Statement::distinct('statement.actor.account.name')->remember(5)->count() );
66+
return ($mbox + $openid + $mbox_sha1sum + $account);
67+
}
6768

6869
/**
6970
* Count the number of users in Learning Locker.

app/locker/repository/Query/EloquentQueryRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
use \Cache as IlluminateCache;
33
use \Carbon\Carbon as Carbon;
44
use \Locker\Helpers\Helpers as Helpers;
5+
use \Locker\Helpers\Exceptions as Exceptions;
56
use \Locker\Repository\Statement\EloquentRepository as StatementsRepo;
67

78
class EloquentQueryRepository implements QueryRepository {
@@ -152,7 +153,7 @@ public function aggregateObject($opts, array $match) {
152153
* @return [String] Ids of the inserted statements.
153154
*/
154155
public function insert(array $pipeline, array $opts) {
155-
$statements = $this->aggregate($opts['lrs_id'], $pipeline)['result'];
156+
$statements = $this->aggregate($opts, $pipeline)['result'];
156157

157158
if (count($statements) > 0) {
158159
$opts['authority'] = json_decode(json_encode($opts['client']['authority']));

0 commit comments

Comments
 (0)