Skip to content

Commit

Permalink
Merge pull request #54 from integral-learning/dev
Browse files Browse the repository at this point in the history
Release v1.4.10
  • Loading branch information
jtgoltz authored Mar 6, 2023
2 parents 3390873 + 17c718a commit e37b3d2
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 23 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ jobs:
matrix:
include:
- php: '7.4'
moodle-branch: 'master'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'MOODLE_311_STABLE'
moodle-branch: 'MOODLE_401_STABLE'
database: 'mariadb'
- php: '7.3'
moodle-branch: 'MOODLE_310_STABLE'
- php: '7.4'
moodle-branch: 'MOODLE_400_STABLE'
database: 'pgsql'
- php: '7.2'
moodle-branch: 'MOODLE_39_STABLE'
database: 'mariadb'

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion amd/build/mod_form.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/mod_form.min.js.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions amd/src/mod_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ define(['jquery', 'core/templates', 'core/modal_factory', 'auth_mumie/mumie_serv

const problemSelectorController = (function() {
const problemSelectorButton = document.getElementById('id_prb_selector_btn');
const multiProblemSelectorButton = document.getElementById('id_multi_problem_selector_btn');
let problemSelectorWindow;
const mumieOrg = document.getElementsByName('mumie_org')[0].value;

Expand Down Expand Up @@ -137,6 +138,18 @@ define(['jquery', 'core/templates', 'core/modal_factory', 'auth_mumie/mumie_serv
}, false);

addMessageListener();

multiProblemSelectorButton.onclick = function(e) {
e.preventDefault();
problemSelectorWindow = window.open(
lmsSelectorUrl
+ '/lms-problem-selector?'
+ "serverUrl="
+ encodeURIComponent(serverController.getSelectedServer().urlprefix),
"_blank",
'toolbar=0,location=0,menubar=0'
);
};
},
disable: function() {
problemSelectorButton.disabled = true;
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# MumieTask - Changelog

All important changes to this plugin will be documented in this file.

## [v1.4.10] - 2023-02-27

### Changed
- Button to open a MUMIE Task in grading view is moved on top of the participant list

### Added
- The Multiple Problem Selector can now be opened directly from mod_mumie form

## [v1.4.9] - 2023-01-11

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion classes/mumie_calendar_service/mumie_calendar_service.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function update() {
$this->mumie->duedate
);
} else if ($this->event && $hasduedate) {
$update = new \stdClass();
$update = new \stdClass();
$update->name = $this->title;
$update->timestart = $this->mumie->duedate;
$this->event->update($update, false);
Expand Down
4 changes: 3 additions & 1 deletion lang/de/mumie.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
$string['mumie_form_complete_course'] = 'Ganzen Kurs verlinken';
$string['mumie_form_complete_course_help'] = 'Nutzer werden nur eingeloggt und dann zur Kursübersicht weitergeleitet. Leistungsdaten werden für diese MUMIE-Task <b>nicht</b> synchronisiert.';
$string['mumie_form_launchcontainer_info'] = 'Eingebettete MUMIE-Task führen auf manchen Browsern und Betriebssystemen zu technischen Problemen. Daher empfehlen wir MUMIE-Tasks in einem neuen Fenster zu öffnen.';
$string['mumie_form_prb_selector_btn'] = 'Aufgabenauswahl öffnen';
$string['mumie_form_prb_selector_btn'] = 'Aufgabenauswahl';
$string['mumie_form_multi_prb_selector_btn'] = 'Mehrfach-Aufgabenauswahl';
$string['mumie_form_updated_selection'] = 'Aufgabe erfolgreich ausgewählt';
$string['mumie_form_tasks_edit'] = 'In anderen MUMIE-Tasks übernehmen';
$string['mumie_form_tasks_edit_info'] = 'Sie können einige der oben gewählten Einstellungen auch automatisch in anderen MUMIE-Tasks dieses Kurses übernehmen';
Expand All @@ -113,6 +114,7 @@
$string['mumie_no_other_task_found'] = 'Keine andere MUMIE Tasks in Kurs gefunden';
$string['mumie_form_wiki_link'] = 'Bitte besuchen Sie unser <a target="_blank" href="https://wiki.mumie.net/wiki/MUMIE-Moodle-integration-for-teachers">Wiki</a> für weiterführende Informationen!';
$string['mumie_form_no_course_on_server'] = 'MUMIE-Server <b>{$a}</b> konnte nicht erreicht werden! Dieser Server wurde daher vorrübergehend aus der Auswahl entfernt.';
$string['mumie_multi_problem_selector'] = 'Alternativ können Sie auch mehrere MUMIE Tasks gleichzeitig mit der Mehrfach-Aufgabenauswahl erstellen. Ziehen Sie dazu einfach die gewünschten Aufgaben in ihren Kurs.<br><br>Für eine Kurzanleitung und weitere Informationen besuchen Sie unser <a target="_blank" href="{$a}">Wiki</a>';

// Used in duedate form.
$string['mumie_duedate_form'] = 'Abgabefrist verlängern';
Expand Down
4 changes: 3 additions & 1 deletion lang/en/mumie.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
$string['mumie_form_complete_course'] = 'Link the entire course';
$string['mumie_form_complete_course_help'] = 'The user will only be logged in and redirected to the course overview page. Grades will <b>not</b> be synchronized for this MUMIE Task.';
$string['mumie_form_launchcontainer_info'] = 'Embedded MUMIE Tasks tend to cause issues on some browsers and operation systems so we recommend using New-Window-mode.';
$string['mumie_form_prb_selector_btn'] = 'Open problem selector';
$string['mumie_form_prb_selector_btn'] = 'Problem selector';
$string['mumie_form_multi_prb_selector_btn'] = 'Multi Problem Selector';
$string['mumie_form_updated_selection'] = 'Successfully selected problem';
$string['mumie_form_tasks_edit'] = 'Apply to other MUMIE Tasks';
$string['mumie_form_tasks_edit_info'] = 'You can apply some of the settings selected above also automatically to other MUMIE Tasks of this course.';
Expand All @@ -97,6 +98,7 @@
$string['mumie_no_other_task_found'] = 'No other MUMIE Tasks found in course';
$string['mumie_form_wiki_link'] = 'For help and advanced features, please visit our <a target="_blank" href="https://wiki.mumie.net/wiki/MUMIE-Moodle-integration-for-teachers">Wiki</a>!';
$string['mumie_form_no_course_on_server'] = 'MUMIE server <b>{$a}</b> is not available! Temporarily removed this server from selection.';
$string['mumie_multi_problem_selector'] = 'Alternatively, you can also create multiple MUMIE Tasks at once simply via Multi Problem Selector by dragging them into your course. <br><br>For information on how to use this, have a look at our <a target="_blank" href="{$a}">wiki</a>';

// Used in mumieserver form.
$string['mumie_form_required'] = 'required';
Expand Down
7 changes: 7 additions & 0 deletions mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ public function definition() {
$mform->setType("task_display_element", PARAM_TEXT);

$contentbutton = $mform->addElement('button', 'prb_selector_btn', get_string('mumie_form_prb_selector_btn', 'mod_mumie'));
$wiki = 'https://wiki.mumie.net/wiki/MUMIE-Moodle-integration-for-teachers#how-to-create-mumie-tasks-with-drag-and-drop';
$this->add_info_box(
get_string(
"mumie_multi_problem_selector",
"mod_mumie",
$wiki));
$mform->addElement('button', 'multi_problem_selector_btn', get_string('mumie_form_multi_prb_selector_btn', 'mod_mumie'));

$launchoptions = array();
$launchoptions[MUMIE_LAUNCH_CONTAINER_EMBEDDED] = get_string("mumie_form_activity_container_embedded", "mod_mumie");
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2023011100; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2023022700; // The current module version (Date: YYYYMMDDXX).
$plugin->component = 'mod_mumie'; // Full name of the plugin (used for diagnostics).
$plugin->requires = 2020061500;
$plugin->requires = 2022041900;
$plugin->release = "v1.4.9";
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array(
Expand Down
13 changes: 6 additions & 7 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,20 @@

$redirecturl = new moodle_url('/mod/mumie/view.php', array('id' => $id, 'action' => 'open'));
echo $OUTPUT->header();
echo $grader->view_grading_table();
$buttonattributes = array(
"class" => "btn btn-primary",
"href" => $redirecturl,
"style" => "margin:10px auto; display: table;"
);
"class" => "btn btn-primary",
"href" => $redirecturl,
"style" => "margin:10px auto; display: table;"
);
if ($mumietask->launchcontainer == MUMIE_LAUNCH_CONTAINER_WINDOW) {
$buttonattributes["target"] = "_blank";
}

echo html_writer::tag(
"a",
"Open MUMIE Task",
get_string('mumie_open_task', 'mod_mumie'),
$buttonattributes
);
echo $grader->view_grading_table();

echo $OUTPUT->footer();
} else if ($action == "open") {
Expand Down

0 comments on commit e37b3d2

Please sign in to comment.