Skip to content

Commit

Permalink
elove: update - add removed code
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurauer committed Sep 29, 2016
1 parent 7342649 commit f4b58a1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions portfoliofile.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@
$epopaccess=false;

//authenticate the user
if ($token) {
// keep code for eLove - needed for teacher access to submitted files

$webservicelib = new webservice();
$authenticationinfo = $webservicelib->authenticate_user($token);
$accessPath = explode('/', $access);

if(strpos($accessPath[2],'-'))
$accessPath[2] = (explode('-', $accessPath[2])[0]);

$item = block_exaport_get_elove_item($itemid, $accessPath[2], $authenticationinfo);
if(!$item)
print_error("viewnotfound", "block_exaport");

if ($file = block_exaport_get_item_file($item)) {
send_stored_file($file);
} else {
not_found();
}
exit;
}

$authenticationinfo = null;
if ($wstoken) {
Expand Down

0 comments on commit f4b58a1

Please sign in to comment.