Skip to content
Snippets Groups Projects
Commit ca7d1cff authored by Thomas Fradet's avatar Thomas Fradet
Browse files

fix edit btn capacity

parent 3ad28502
No related branches found
No related tags found
No related merge requests found
<?php <?php
$careerId = required_param("career", PARAM_INT); $careerId = required_param("career", PARAM_INT);
global $DB, $CFG, $COURSE; global $DB, $CFG, $COURSE, $USER;
$requete = $DB->get_record_sql('SELECT * FROM {block_career} WHERE id = ?', array($careerId)); $requete = $DB->get_record_sql('SELECT * FROM {block_career} WHERE id = ?', array($careerId));
$percent = 70; $percent = 70;
...@@ -58,9 +58,11 @@ $edit_url = $CFG->wwwroot . "/blocks/career/career_setting.php?course=" . $COURS ...@@ -58,9 +58,11 @@ $edit_url = $CFG->wwwroot . "/blocks/career/career_setting.php?course=" . $COURS
<section class="section"> <section class="section">
<?php if (has_capability('moodle/course:update', $context = context_course::instance($COURSE->id), $USER->id)): ?>
<a class="btn btn-warning" style="float: right; margin-left: 0.25rem;" href="<?php echo $edit_url; ?>">Éditer</a> <a class="btn btn-warning" style="float: right; margin-left: 0.25rem;" href="<?php echo $edit_url; ?>">Éditer</a>
<?php endif; ?>
<a class="btn btn-primary" style="float: right;" href="<?php echo $cours_url; ?>">Retour au cours</a> <a class="btn btn-primary" style="float: right;" href="<?php echo $cours_url; ?>">Retour au cours</a>
<h2 class="display-4" style="clear: both;"><?=$titre;?></h2> <h2 class="display-4" style="clear: both;"><?=$titre;?></h2>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment