Giter Site home page Giter Site logo

mebis-lp / mod_learningmap Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 5.0 1004 KB

GitHub Repository for mod_learningmap

Home Page: https://moodle.org/plugins/mod_learningmap

License: GNU General Public License v3.0

JavaScript 23.25% PHP 59.21% CSS 1.08% Mustache 16.46%
moodle moodle-mod moodle-plugin

mod_learningmap's People

Contributors

germanvaleroelizondo avatar phmemmel avatar pm84 avatar pmaneggia avatar sh-csg avatar tholudwig avatar trmsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mod_learningmap's Issues

Simplify method process_map_objects

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.

Feature request: Transparent visited places

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.

Getting error when using in separate page mode

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? 🙌🏻

Feature request: Learningmap in Moodle App

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.

Reconsider using the GNU Affero for it

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.

Ampersand in 2 activities title crashes learningmap

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)

Feature request: Unicode characters as places instead of circles

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.

Why the additional functionality?

Example 1: In a language course their might be different acitivities like:

  • vocabulary learning
  • grammar exercises
  • listening / reading comprehension
  • writing and speaking tasks
  • ...

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.

Things to consider

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.

Bug: array_remove_by_value(.) is missing

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

Feature request: Classification of places as "optional"

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.

Exposing landscape

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.

Bug: Moodle 4.0 shows learning map twice

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

grafik

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.

Bug: Map background not updating when replaced with identical filename

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

Error code when “Show map on course page” disabled

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

Ampersand in activity titel crashes learningmap

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.

Plugin uses GD extension with freetype enabled, but doesn't do required/optional in a environment.xml

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():

$bbox = imagettfbbox(20, 0, $CFG->dirroot . '/lib/default.ttf', $text->nodeValue);

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 ;-)

Feature request: Improve live updating of learning map

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"?

Feature request: Identification of starting points and targets

Current state:

  • In the editor, nodes which are starting points look the same as all other nodes (except for nodes which are targets), hence they cannot be spotted easily.
  • In the activity, starting points differ very little from the other types of nodes.
  • The symbol used for targets is not self-explanatory.

Requested state:

  • Nodes which are starting points can be identified by their look in the editor and optionally, also in the activity. For example, in the activity, unvisited starting points could have their own color or, preferably, their own symbol (e.g. a turn-on symbol, a location pin, a circle with an arrow pointing into it).
  • A self-explanatory symbol is used for targets , for example, a flag, a bull´s-eye, or a bull`s-eye with an arrow in its center.

Feature request: Keyboard navigation to "Places" on the map

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.

Call to undefined function mod_learningmap\array_remove_by_value

Reported by:
https://bildung.social/@FrauBainski/109834002858374211

Possible solutions:

  1. Probably the fallback to global namespace should be enforced in

    array_remove_by_value($active, $path['id']);

  2. 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.

Fix wrong display location button "Group mode" in Moodle 4.3

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.
groupemode_wiki

For the learning map, the button appears left-aligned.
groupmode_learningmap

Goal

  1. the button should be displayed for a uniform UX as with the standard activities

Testing

  1. create a course with activated group mode.
  2. create a learning map with display on the course page
  3. hover over the activities
  • Before the fix: Button is displayed left-aligned
  • after the fix: button is rendered in the correct position

Separate Template for options in options menu

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

Maintenance: Unit tests needed for availability of places/paths

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:

  • which group the user is member of and which group currently is being selected by the user in group mode
  • moodle core availability restrictions (e. g. restrict access by date, activity completion of another activity etc.)
  • "show all" mode of the learningmap
  • edit mode of the trainer

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.

Moodle 3.9 Error Class 'core_completion\activity_custom_completion' not found

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()

Big Problem: Error reading the database after update to v.0.9.6

Hello
I updated the plugin from v0.9.5.2 to v.0.9.6 on moodle version 4.1.8.
The learning map still appears in the course. None of the links work. Editing of the activity isn't possible.

There allway the same error:
Error reading the database

I hope you fix it soon...

error

Installation not working

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 image size fails

Changing size of the used image fails, because of heigth and width is saved somewhere in the plugin and therefore not changeable.

Feature request: Add Labels to Nodes

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.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.