Commit c7332713 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1821107: Getting institution pages report graph to render"

parents 63f70958 83c1aaa5
......@@ -2948,8 +2948,10 @@ function institution_view_type_graph($type = null, $institutiondata) {
function institution_view_type_graph_render($type = null, $extradata) {
$data['graph'] = ($type) ? $type : 'pie';
$data['jsondata'] = get_field('institution_data','value','type','view-type-graph','institution', $extradata->institution);
return $data;
if ($jsondata = json_decode(get_field('institution_data','value','type','view-type-graph','institution', $extradata->institution))) {
$data['jsondata'] = json_encode($jsondata[0]);
return $data;
}
}
function institution_user_type_graph($type = null, $institutiondata) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment