Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
25 changes: 0 additions & 25 deletions app/controllers/xapi/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,6 @@ public function getLrs(){
$this->lrs = $lrs;
}

public function returnArray( $statements=array(), $params=array() ){

$array = array(
'X-Experience-API-Version' => \Config::get('xapi.using_version'),
'route' => \Request::path()
);

$array['params'] = $params;

//replace replace &46; in keys with .
//see https://github.com/LearningLocker/LearningLocker/wiki/A-few-quirks for more info
if( !empty($statements) ){
foreach( $statements as &$s ){
$s = \app\locker\helpers\Helpers::replaceHtmlEntity( $s );
}
}

$array['statements'] = $statements;

$array['more'] = '';//if more results available, provide link to access them

return \Response::make( $array, 200 );

}


/**
* Get all of the input and files for the request and store them in params.
Expand Down
25 changes: 25 additions & 0 deletions app/controllers/xapi/StatementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,29 @@ public function checkAccess( $statement ){

}

public function returnArray( $statements=array(), $params=array() ){

$array = array(
'X-Experience-API-Version' => \Config::get('xapi.using_version'),
'route' => \Request::path()
);

$array['params'] = $params;

//replace replace &46; in keys with .
//see https://github.com/LearningLocker/LearningLocker/wiki/A-few-quirks for more info
if( !empty($statements) ){
foreach( $statements as &$s ){
$s = \app\locker\helpers\Helpers::replaceHtmlEntity( $s );
}
}

$array['statements'] = $statements;

$array['more'] = '';//if more results available, provide link to access them

return \Response::make( $array, 200 );

}

}