mebis-lp / mod_learningmap Goto Github PK
View Code? Open in Web Editor NEWGitHub Repository for mod_learningmap
Home Page: https://moodle.org/plugins/mod_learningmap
License: GNU General Public License v3.0
GitHub Repository for mod_learningmap
Home Page: https://moodle.org/plugins/mod_learningmap
License: GNU General Public License v3.0
Die mapworker method process_map_objects
has grown to a size of about 350 LOC which makes it really hard to see what the method in fact does. Thus, the method needs to refactored: Some things should be extracted to at least separate methods, maybe even separate objects.
In addition to that, new features and changes to the code are likely to break something and cause regressions, because we do not have good unit test coverage. So this refactoring would also allow us to unit test the extracted methods and classes separately to prepare the code for further nice features and improvements.
Current state: Visited places are in a specific colour.
Target state: Visited places can be made transparent.
Sample application 1: The background image contains objects like badges, flowers, trophies, smilies etc. which are covered by places that have not been visited yet. Once a place has been visited the corresponding object becomes visible in the node.
Sample application 2: The places to be visited stand for problems that need to be solved by users. As users go along solving problems, the background image becomes more and more visible to them.
Hello team and thank you for this cool practical plugin.
We're using moodle 3.10 & when we try to use the map on separate page, we get an error:
Coding error detected, it must be fixed by a programmer: Unknown property activityheader of $PAGE.
line 832 of /lib/pagelib.php: coding_exception thrown
line 41 of /mod/learningmap/view.php: call to moodle_page->__get()
Can you please help with this issue? 🙌🏻
A frequently asked question in our teacher community is if learningmap works with the app or what they have to do to make it work (due to the generic message in the app "Für Ihre Website ist ein Plugin installiert, das bisher nicht in der mobilen App unterstützt wird."
Since learningmap is a well-loved acitivity, I thought I'd asked the question here. Would be lovely to have it in the app as well as in browser.
I generally discourage from using AGPL for Moodle plugins. Even though I like the idea and the spirit of the license, and I appreciate the intention to use it in Moodle plugins, there is a narrow grey zone - see the second paragraph at https://www.gnu.org/licenses/license-list.en.html#AGPL
It is recommended that the plugins as packages are under GPLv3 - basically as a consequence of being part of Moodle which itself is GPLv3. Plugins may contain 3rd party libraries if they are compatible with GPLv3. So it is OK if the plugin ships with a library under AGPL, but it works better if the plugin itself is under GPL.
This is not an approval blocker, just something to re-consider maybe.
Hi,
Ampersand sign (&) in title of 2 activities that was used in learning map crashes the activity learning map upon saving the learningmap activity. Image vanishes, can't be re-uploaded. Learningmap activity had to be deleted and set up from start after removing the ampersand in the name of activities.
Problem reported with Moodle 4.1.6 and learningmaps 0.9.5.2
Adding 2 activities with a & in each activity crashes the learningmap activity
Example:
create an activity (page for example) named "&1"
create an other activity named "&2"
create a learningmap activity and add the activity &1 and &2 at the same time
Note that you can add the 2 activities separatly (add &1, save, add &2, save): in this case, the learningmap activity doesn't crash.
Originally posted by @gmanaud in #74 (comment)
At the moment every place on the the map is a circle of a certain colour. I suggest adding the possibility to replace this circle by an optional unicode character. This would also help to solve #52.
Example 1: In a language course their might be different acitivities like:
Example 2:
In a math course a teacher might like to differentiate tasks depening on how difficult there are to solve. Different symbols can help to make the students aware (of the danger) awaiting them.
Using such an approach, teachers and students would get a visual representation of the type of journey ahead of them. Especially when a course makes use of optional activities and allows for different paths to a certain destination.
Changing the code to display a unicode character instead of a circle will probably be trivial. However, to be able to choose an individual character for each place the user interface needs to be changed. In addition, in the database, you will have to add an additional field to store the unicode character for each place.
Furthermore, the ability to add unicode characters will probably lead to an additional feature request, asking for the possibility to use different fonts with the learning map.
Dear Stefan,
function "array_remove_by_value(.)" is missing in mod_learningmap 0.9 (build 2023011004)
. Could be fixed by including
include '../backup/cc/cc_lib/gral_lib/functions.php';
in mapworker.php
. Or is this already fixed in 0.9.2
?
Used moodle versions: 4.0.6
and 4.0.7
.
Best regards
Andreas
Current state:
Activities can be starting points and/or mandatory to get to another node. They can be targets and compulsory to complete the learning map activity itself. The different states are indicated in different ways. A distinction between recommended, supplementary, and compulsory activities is missing.
Requested state:
Activities can be classified as optional. For example, a dotted line could indicate this state.
This way, activities with further practice exercises, supplementary material, etc. can be identified as such prior to opening the activity and can be distinguished more easily from unvisited mandatory places.
I think it would be great, if you can choose the option of an „exposing landscape“. When you start, you don’t see the whole map, only an area around the starting place. And if you have finished the first place, the area around the second becomes visible.
For example, your learningmap is a footprint of a building and until you haven‘t finished the First Station, you don’t know which rooms are yet to come.
To reproduce:
Disable "Show map on course page", click on the module link to see the view page, you will see it twice:
Once without places and paths, right below with places and paths.
Tested on moodle 4.1dev (Build: 20220701), boost theme
Also the map always takes all the space available. Here a max-width attribute should be added, because in some cases it's not even possible to see the map as a whole. Zooming in and out in the browser even makes it worse / the map take even more space relative to everything else.
I had to popup the drawers left and right and then shrink the browser window to be able to at least get this screenshot.
Being in the map editor:
Current behavior: If the background picture is being replaced by a new version of this picture having the same filename, the old picture is being shown in the editor instead of the updated one
Expected: Whenever a new picture is being uploaded, it should be updated in the editor
When “Show map on course page” is disabled in the settings of a learning map activity, the learning map icon appears on the course page and can be clicked as well. When clicked, a page opens. The page, however, does not show the learning map. Instead, it says, “Coding error detected, it must be fixed by a programmer: Unknown property activityheader of $PAGE.” Returning into the settings and enabling "Show map on course page" again is still possible.
This is on moodle 3.11.5
Issues was reportet by a teacher and reproduces on Moodle 3.11.13
Ampersand sign (&) in titel of hp5-activity that was used in learning map crashes the activity learning map upon saving the learningmap activity. Image vanishes, cant't be re-uploaded. Learningmap activity had to be deleted and set up from start after removing the ampersand in the connected h5p-activity.
Moodle provides the ability to do an environment.xml where you describe which PHP version or PHP extensions your plugin needs.
Moodle core requires the GD extension, but doesn't check apart from "is this extension present".
You use freetype only functions, namely imagettfbbox()
:
mod_learningmap/classes/mapworker.php
Line 261 in 5ada8bc
Could you add an environment.xml with a "required" for GD and an "optional check" with a custom function checking if freetype is enabled?
It would help others to determine the requirements to use this plugin better.
Or you could just replace the function with something else ;-)
The JS module manual-completion-watch
tries to query all manual completion buttons of all visible course modules to update the learning map.
After implementing group mode (see #25) one student needs to reload the learningmap whenever another student has completed a task to continue working on the learning map. A nice feature would be to rework the module manual-completion-watch
and make use of the new state manager of the course editor API. This way the learning map also updates if activities are being completed in another tab or - in case of group mode - as soon as another student is completing an activity (no matter if manually or by fulfilling a condition).
The old way with the manual-completion-watch
module should still be kept for backwards compatibility reasons (moodle 3.11 and below) for a while I think.
Caveat: It could be pretty bad if updating the learning map is being done by reloading the page. If a student completes an activity another student should not have reloaded the page, but the learning map should be updated. Maybe just use a notification popup "The status of activities on the learning map has been changed. Please reload the page to update the learningmap"?
Is it possible to make the places configurable in size so that finished activities are indicated by larger or smaller places.
See title. The menu should be closable by clicking outside of it.
This would also make it match the behavior of the modal used to configure a place.
Current state:
Requested state:
Accessibility is a necessity for many Moodle users, and it appears the "Places" on the map are not able to be navigated to using a keyboard. Therefore, anyone needing to meet WCAG requirements would need to keep activities in an unhidden state as an alternative way to navigate the map.
Reported by:
https://bildung.social/@FrauBainski/109834002858374211
Possible solutions:
Probably the fallback to global namespace should be enforced in
mod_learningmap/classes/mapworker.php
Line 308 in 1f9f127
Maybe it is better to replace this function by just changing the line to array_values(array_diff($active, array($path['id'])));
cause array_remove_by_value has no phpdocs, proper type checks and so on.
Description
With Moodle 4.3, new modal boxes have been added for the group mode.
For standard activities, such as Wiki, this is displayed to the left of the completion.
For the learning map, the button appears left-aligned.
Goal
Testing
Currently, there is a lot of code duplication in the advancedsettings.mustache
, because we have the exactly same code for every config option checkbox.
It would be nice to use a separate option template, use a data object including all the available option strings and make mustache iterate over it to render the advanced settings menu
Especially the features "Show all places" (#24) and "Group mode" (#25) are increasing the complexity of when an activity is being shown and/or accessible to a user by a lot.
There should be extensive unit tests to test if an activity is visible and accessible by a user depending on:
We also need a test that tests if the completion modes are working properly, especially in group mode. Care: Moodle seems to have issues here with caching.
Eventually there also should be the corresponding tests for path visibility including the "hide paths" feature.
There is always a dependency on a higher version of Moodle, so all the versions will not run in 3.9. Can you please fix this problem?
/mod/learningmap/classes/completion/custom_completion.php
line 29: class custom_completion extends \core_completion\activity_custom_completion {
Error: Class 'core_completion\activity_custom_completion' not found
×Debug-Info:
Error code: generalexceptionmessage
×Stack trace:
line 29 of /mod/learningmap/classes/completion/custom_completion.php: Error thrown
line 132 of /lib/classes/component.php: call to include_once()
line ? of unknownfile: call to core_component::classloader()
line 162 of /mod/learningmap/mod_form.php: call to spl_autoload_call()
line 757 of /course/moodleform_mod.php: call to mod_learningmap_mod_form->add_completion_rules()
line 126 of /mod/learningmap/mod_form.php: call to moodleform_mod->standard_coursemodule_elements()
line 214 of /lib/formslib.php: call to mod_learningmap_mod_form->definition()
line 130 of /course/moodleform_mod.php: call to moodleform->__construct()
line 150 of /course/modedit.php: call to moodleform_mod->__construct()
When I try to install the plugin in Moodle 3.11.6, my instance throws the following error:
Warning: is_readable(): open_basedir restriction in effect. File(/db/renamedclasses.php) is not within the allowed path(s): (/home/httpd/vhosts/learn4school.ch/:/tmp/) in /home/httpd/vhosts/.../httpsdocs/.../lib/classes/component.php on line 1210
Is it possible that plugin assumes that Moodle should be installed in a /moodle/ directory?
Changing size of the used image fails, because of heigth and width is saved somewhere in the plugin and therefore not changeable.
Ref: https://docs.moodle.org/dev/Plugin_contribution_checklist#Namespace_collisions
Functions like get_learningmap()
or get_place_cm()
are defined in the global space without the expected prefix and there is a potential for a name collision.
Make it an option to add labels to individual nodes. The content to be set manually or automatically, similar to the labels that appear when you hover over a node, which show the name of the associated module. (I think that hovering is okay when working with a mouse, but not so much on tablets or smartphones.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.