Skip to content

Commit

Permalink
move bootstrap css to sortable css
Browse files Browse the repository at this point in the history
  • Loading branch information
smmercuri committed Nov 13, 2023
1 parent 8a555d8 commit fbdf6e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion corsscripts/sortable.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions stack/cas/castext2/blocks/parsons.block.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php
// This file is part of Stateful
// This file is part of STACK
//
// Stateful is free software: you can redistribute it and/or modify
// STACK is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Stateful is distributed in the hope that it will be useful,
// STACK is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Stateful. If not, see <http://www.gnu.org/licenses/>.
// along with STACK. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();

require_once(__DIR__ . '/../block.interface.php');
Expand Down Expand Up @@ -94,10 +94,6 @@ public function compile($format, $options): ? MP_Node {

// Plug in some style and scripts.
$r->items[] = new MP_String('<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>');
$r->items[] = new MP_List([
new MP_String('style'),
new MP_String(json_encode(['href' => 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css']))
]);
$r->items[] = new MP_List([
new MP_String('style'),
new MP_String(json_encode(['href' => $css]))
Expand Down Expand Up @@ -138,8 +134,8 @@ public function compile($format, $options): ? MP_Node {
$importCode = "\nimport {stack_js} from '" . stack_cors_link('stackjsiframe.min.js') . "';\n";
$importCode .= "import {Sortable} from '" . stack_cors_link('sortable.min.js') . "';\n";
$importCode .= "import {preprocess_steps, stack_sortable} from '" . stack_cors_link('stacksortable.min.js') . "';\n";

$r->items[] = new MP_String($importCode);

// Extract the proof steps from the inner content
$r->items[] = new MP_String('var proofSteps = ');

Expand All @@ -158,7 +154,7 @@ public function compile($format, $options): ? MP_Node {
}
}

// parse steps and options separately if they exist
// parse steps and Sortable options separately if they exist
$code = 'var userOpts;' . "\n";
$code .= '[proofSteps, userOpts] = preprocess_steps(proofSteps, userOpts);' . "\n";

Expand Down

0 comments on commit fbdf6e3

Please sign in to comment.