fix: adjust script order and import Bootstrap
Reordered modal and script content to ensure proper functionality and added Bootstrap's JS bundle for enhanced UI components. Updated URL to use a CDN for better performance and integrity checks.
This commit is contained in:
parent
d41c70e50e
commit
5b4a28b00d
2 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
sws<?php
|
||||||
|
|
||||||
namespace mod_exp360\output;
|
namespace mod_exp360\output;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class renderer extends plugin_renderer_base {
|
||||||
private static $modals_rendered = false;
|
private static $modals_rendered = false;
|
||||||
|
|
||||||
public function render_activity($activity_id) {
|
public function render_activity($activity_id) {
|
||||||
$script = "<script data-activity-id='$activity_id' src='/mod/exp360/script.js'></script>";
|
$script = "<script src='https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js' integrity='sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz' crossorigin='anonymous'></script><script data-activity-id='$activity_id' src='/mod/exp360/script.js'></script>";
|
||||||
return $script;
|
return $script;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
lib.php
2
lib.php
|
@ -56,7 +56,7 @@ function mod_exp360_cm_info_dynamic(cm_info $cm)
|
||||||
$script = $renderer->render_activity($cm->id);
|
$script = $renderer->render_activity($cm->id);
|
||||||
|
|
||||||
$cm->set_no_view_link();
|
$cm->set_no_view_link();
|
||||||
$cm->set_content($script . $modals);
|
$cm->set_content($modals . $script);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue