Student follow up: Add iframe in myStudents.php BT#12723

pull/3932/head
Julio Montoya 5 years ago
parent b95df2b64c
commit ba727eda6e
  1. 25
      main/mySpace/myStudents.php
  2. 1
      plugin/studentfollowup/post.php
  3. 4
      plugin/studentfollowup/posts.php

@ -957,8 +957,31 @@ echo MyStudents::getBlockForSkills(
$courseInfo ? $courseInfo['real_id'] : 0,
$sessionId
);
echo '<br /><br />';
$installed = AppPlugin::getInstance()->isInstalled('studentfollowup');
if ($installed) {
echo Display::page_subheader(get_lang('Guidance'));
echo '
<script>
resizeIframe = function(iFrame) {
iFrame.height = iFrame.contentWindow.document.body.scrollHeight + 20;
}
</script>
';
$url = api_get_path(WEB_CODE_PATH).'plugin/studentfollowup/posts.php?iframe=1&student_id='.$student_id;
echo '<iframe
onload="resizeIframe(this)"
style="width:100%;"
border="0"
frameborder="0"
scrolling="no"
src="'.$url.'"
></iframe>';
echo '<br /><br />';
}
echo '<div class="row"><div class="col-sm-5">';
echo MyStudents::getBlockForClasses($student_id);
echo '</div></div>';

@ -114,7 +114,6 @@ if ($post) {
$query = $qb->getQuery();
$relatedPosts = $query->getResult();
}
//var_dump($post->getTitle());
$tpl = new Template($plugin->get_lang('plugin_title'));
$tpl->assign('post', $post);

@ -65,7 +65,9 @@ if ($totalItems > 1) {
$pagination .= '</ul>';
}
$tpl = new Template($plugin->get_lang('plugin_title'));
$showFullPage = isset($_REQUEST['iframe']) && 1 === (int) $_REQUEST['iframe'] ? false : true;
$tpl = new Template($plugin->get_lang('plugin_title'), $showFullPage, $showFullPage, !$showFullPage);
$tpl->assign('posts', $posts);
$tpl->assign('current_url', $url);

Loading…
Cancel
Save