diff --git a/view/view_career_unit.php b/view/view_career_unit.php index 581a5c692364c1bedae765e1e4ed8aed249af9ea..c1bcad5a5575d1bed386fde014dd0f22d0e00fca 100644 --- a/view/view_career_unit.php +++ b/view/view_career_unit.php @@ -1,7 +1,7 @@ <?php $careerId = required_param("career", PARAM_INT); -global $DB; +global $DB, $CFG, $COURSE; $requete = $DB->get_record_sql('SELECT * FROM {block_career} WHERE id = ?', array($careerId)); $percent = 70; @@ -51,13 +51,15 @@ foreach ($sections as $value){ $sections = array_combine($keys,$sections); ksort($sections); +$cours_url = $CFG->wwwroot . "/course/view.php?id=" . $COURSE->id; ?> <section class="section"> - <h2 class="display-4"><?=$titre;?></h2> - <div class="career-descr"> + <h2 class="display-4" style="float: left;"><?=$titre;?></h2> + <a class="btn btn-primary" style="float: right;" href="<?php echo $cours_url; ?>">Retour au cours</a> + <div class="career-descr" style="clear: both;"> <?php echo $intro; ?> </div> <?php foreach ($sections as $section) : ?> @@ -78,7 +80,7 @@ ksort($sections); </h5> <img class="" alt="" src="<?php echo $CFG->wwwroot ?>/theme/image.php/boost/<?php echo $value->type ?>/1/icon>"> </div> - <!-- <div><?php echo $value->descrition;?></div> --> + <div><?php echo $value->descrition;?></div> </a> <?php endif;?> <?php endforeach;?>