mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Hide Create outage button if there is an ongoing outage #172.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
use auth_outage\output\manage\history_table;
|
||||
use auth_outage\output\manage\planned_table;
|
||||
use auth_outage\output\renderer;
|
||||
use auth_outage\dml\outagedb;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
@@ -47,9 +48,12 @@ echo $viewbag['warning'];
|
||||
$table->finish_output();
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<input type="button" class="form-submit"
|
||||
value="<?php echo get_string('outagecreate', 'auth_outage'); ?>"
|
||||
onclick="location.href='<?php echo $urlnew; ?>';"/>
|
||||
<?php $outage = outagedb::get_ongoing(); ?>
|
||||
<?php if (is_null($outage)): ?>
|
||||
<input type="button" class="form-submit"
|
||||
value="<?php echo get_string('outagecreate', 'auth_outage'); ?>"
|
||||
onclick="location.href='<?php echo $urlnew; ?>';"/>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section id="section_outage_history">
|
||||
|
||||
Reference in New Issue
Block a user