diff --git a/db/install.xml b/db/install.xml
index e4d3928..0e39c5f 100755
--- a/db/install.xml
+++ b/db/install.xml
@@ -9,6 +9,7 @@
+
diff --git a/db/upgrade.php b/db/upgrade.php
index 64b0180..7104e58 100755
--- a/db/upgrade.php
+++ b/db/upgrade.php
@@ -235,5 +235,20 @@ function xmldb_board_upgrade(int $oldversion) {
upgrade_mod_savepoint(true, 2022040110, 'board');
}
+ if ($oldversion < 2022040114) {
+
+ // Define field hidename to be added to board.
+ $table = new xmldb_table('board');
+ $field = new xmldb_field('hidename', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'name');
+
+ // Conditionally launch add field hidename.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+
+ // Board savepoint reached.
+ upgrade_mod_savepoint(true, 2022040114, 'board');
+ }
+
return true;
}
diff --git a/lang/en/board.php b/lang/en/board.php
index 99cb742..9d25bf8 100755
--- a/lang/en/board.php
+++ b/lang/en/board.php
@@ -53,6 +53,7 @@
$string['board:manageboard'] = 'Manage columns and manage all posts.';
$string['pluginadministration'] = 'Board module administration';
$string['hideheaders'] = 'Hide column headers from students';
+$string['hidename'] = 'Hide embedded board name (needed on some themes)';
$string['completiondetail:notes'] = 'Add notes: {$a}';
$string['completionnotesgroup'] = 'Require notes';
$string['completionnotes'] = 'Require students this number of notes to complete the activity';
diff --git a/lib.php b/lib.php
index 043e0b5..d2b3088 100755
--- a/lib.php
+++ b/lib.php
@@ -500,7 +500,9 @@ function board_cm_info_view(cm_info $cm) {
$width = get_config('mod_board', 'embed_width');
$height = get_config('mod_board', 'embed_height');
$output = html_writer::start_tag('div', ['class' => 'mod_board_embed_container']);
- $output .= html_writer::tag('h3', $board->name);
+ if (empty($board->hidename)) {
+ $output .= html_writer::tag('h3', $board->name);
+ }
$output .= html_writer::start_tag('iframe', [
'src' => new moodle_url('/mod/board/view.php', ['id' => $cm->id, 'embed' => 1]),
'width' => $width,
diff --git a/mod_form.php b/mod_form.php
index 3bfd8b0..d33418c 100755
--- a/mod_form.php
+++ b/mod_form.php
@@ -83,6 +83,9 @@ public function definition() {
$mform->addElement('checkbox', 'hideheaders', get_string('hideheaders', 'mod_board'));
$mform->setType('hideheaders', PARAM_INT);
+ $mform->addElement('advcheckbox', 'hidename', get_string('hidename', 'mod_board'));
+ $mform->setType('hidename', PARAM_INT);
+
$mform->addElement('select', 'sortby', get_string('sortby', 'mod_board'),
array(
board::SORTBYNONE => get_string('sortbynone', 'mod_board'),
diff --git a/version.php b/version.php
index 3269252..4f5c6e9 100755
--- a/version.php
+++ b/version.php
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die;
$plugin->component = 'mod_board'; // Full name of the plugin (used for diagnostics).
-$plugin->version = 2022040113; // The current module version Use 2022.04.01 as base for 4.00.
+$plugin->version = 2022040114; // The current module version Use 2022.04.01 as base for 4.00.
$plugin->requires = 2022041900; // Moodle 4.00 and up.
$plugin->release = '1.401.03 (Build 2022040112)';
$plugin->maturity = MATURITY_STABLE;