I am using Moodle 3,4 and developing module for viewing map points in course.
Need help for this one because I am stuck here.
On course-view-topics page I need to alert view module instance to put some custom attributes somewhere.
Purpose is to show point on the map using js with custom point id. I need to push this id somehow to instance view object on course view.
I managed to change default behavior with js:
define(['jquery'], function($) {
return {
init: function() {
$('li.modtype_agis .activityinstance a').click(function(e) {
e.preventDefault();
alert("The paragraph was clicked."); // HERE SHOULD GET FEATURE ID AND RUN JS TO SHOW IT
});
}
};
});
I can get id from module from <a href=..., but I need featureid field from database to show point on the map.
Any suggestions on how to do this please