Skip to content
Permalink
Browse files

MDL-35073 Open badges - close session before making curl request to c…

…heck backpack server.
  • Loading branch information...
damyon committed Apr 4, 2013
1 parent b38f932 commit 1b774df9a7963d9e3d4869f49877bfe8bd7cc389
Showing with 4 additions and 1 deletion.
  1. +4 −1 badges/ajax.php
@@ -33,11 +33,14 @@
$PAGE->set_url('/badges/ajax.php');
$PAGE->set_context(context_system::instance());
// Unlock session during potentially long curl request.
session_get_instance()->write_close();
$result = badges_check_backpack_accessibility();
$outcome = new stdClass();
$outcome->code = $result;
$outcome->response = get_string('error:backpacknotavailable', 'badges') . $OUTPUT->help_icon('backpackavailability', 'badges');
echo json_encode($outcome);
die();
die();

0 comments on commit 1b774df

Please sign in to comment.
You can’t perform that action at this time.