profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ndunand/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Nicolas Dunand ndunand Switzerland

ndunand/moodle-mod_choicegroup 29

Moodle "Group Choice" plugin

ndunand/moodle-enrol_attributes 16

This plugin allows users to be enrolled according to any value stored in their user profile.

ndunand/moodle-atto_morefontcolors 4

Modification of the fontcolor plugin allowing the Moodle admin to define colors

Kury25/moodle-assignfeedback_editpdfplus 3

Fork of Moodle/editpdf, with custom options

ndunand/moodle-filter_html5avtomp4 3

Moodle HTML5 audio/video to MP4 filter

ndunand/moodle-atto_corrections 2

Inline corrections for Moodle Atto text editor

release ndunand/moodle-enrol_attributes

2021100800

released time in 15 days

created tagndunand/moodle-enrol_attributes

tag2021100800

This plugin allows users to be enrolled according to any value stored in their user profile.

created time in 15 days

push eventndunand/moodle-enrol_attributes

Nicolas Dunand

commit sha 6971e3d949c3b50d18d422a87eaba1ae3d284ed8

Clearer for when no groups in course

view details

Nicolas Dunand

commit sha 92fd737916a3ea3664c27d1119606c7fe2e082d2

Bumped version number for new release

view details

push time in 15 days

pull request commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

Merged! thanks @NicoAlexH and @DeleauRomain

NicoAlexH

comment created time in 15 days

push eventndunand/moodle-enrol_attributes

Romain Deleau

commit sha abc76ce0b062e9c1d6c5e852d6f347fd231c79ac

Groups assignation

view details

Nicolas Alexandropoulos

commit sha 884d80c80a5ba2cd679da2adfbbc001ea0428a45

Integration of Pedagotheque's groups assignation pr (#37) + corrections suggested by @ndunand

view details

Nicolas Alexandropoulos

commit sha f25bfeb4e3199ded422f0bcc8954fe94a172b0d6

Added warning if no custom user field has been defined

view details

Nicolas Alexandropoulos

commit sha baf7a510dfcaa6e23fd34b3595da85d29077db5c

code smells and optimizations

view details

Nicolas Alexandropoulos

commit sha 10b0b4c8d79e43fc6a606a14616a2c701c0d2f5b

fixed typo

view details

Nicolas Alexandropoulos

commit sha ab381ea39ae979864ed6150e253776b344553879

added unit tests

view details

Nicolas Alexandropoulos

commit sha b1ed11b4ef9f610f23f3347bddfb94368dc4e1b8

rewrote the purge_instance method

view details

Nicolas Alexandropoulos

commit sha 2bf62c0b184c0f8017408359a0a52604c379bda9

Merge branch 'dev'

view details

Nicolas Alexandropoulos

commit sha e2ca98b04c683fafb0ed601233afa03ad01b9858

fixed typo

view details

Nicolas Alexandropoulos

commit sha da41142284e5c8dcb98639f5149ff268dbfee036

fixes sugggested by @ndunand

view details

Nicolas Dunand

commit sha af367eda15fd96d19ae0c8e041108ce86af91d00

Merge pull request #38 from NicoAlexH/master Integration of pr #37, unit tests and some bug fixes

view details

push time in 15 days

PR closed ndunand/moodle-enrol_attributes

Fix most Moodle codechecker errors

I've run enrol/attributes through the codechecker with Moodle standards, here come the fixes for most errors.

(The debug block in edit.php should be removed from release branches too.)

+87 -83

1 comment

6 changed files

OdyX

pr closed time in 15 days

pull request commentndunand/moodle-enrol_attributes

Fix most Moodle codechecker errors

Hello Didier @OdyX , I'm closing this now as code has evolved quite a bit since. Thanks for sharing

OdyX

comment created time in 15 days

PR closed ndunand/moodle-enrol_attributes

Groups assignation

Hello,

We made modifications to add the following feature:

  • Group assignation

This feature may interest you or other users? If you want so you can contact me for further information. Regards Camille

+171 -2

2 comments

8 changed files

Pedagotheque

pr closed time in 15 days

pull request commentndunand/moodle-enrol_attributes

Groups assignation

This is now being continued in #38

Pedagotheque

comment created time in 15 days

issue commentndunand/moodle-mod_choicegroup

New Feature: Email Confirmation with ics upon 'Save my choice' and 'Remove my choice'

Just sending e-mail notifications would be really easy. A bit more work to make it a setting per activity. If you were to make and share the code changes, I'd be happy to review and integrate.

peter-lernyx

comment created time in 15 days

issue commentndunand/moodle-mod_choicegroup

New Feature: Email Confirmation with ics upon 'Save my choice' and 'Remove my choice'

Thanks for the scenario and description. Have you had a look at mod_scheduler yet? It looks more up to the task for what you're trying to achieve.

peter-lernyx

comment created time in 23 days

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

         $settings->add(new admin_setting_configmultiselect('enrol_attributes/profilefields',                 get_string('profilefields', 'enrol_attributes'), get_string('profilefields_desc', 'enrol_attributes'),                 [], $customfields));+    } elseif($PAGE->url->get_param('section') === 'enrolsettingsattributes'){+        $url = new moodle_url('/user/profile/index.php');+        \core\notification::warning(get_string('no_custom_field', 'enrol_attributes', $url->get_scheme() .'://'. $url->get_host() . $url->get_path()));

just put '/user/profile/index.php' as 3rd arg

NicoAlexH

comment created time in a month

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

 public static function process_enrolments($event = null, $instanceid = null) {             $arraysyntax = self::attrsyntax_toarray($enrol_attributes_record->customtext1);             $arraysql = self::arraysyntax_tosql($arraysyntax);             $dbquerycachekey = md5($select . serialize($arraysql) . $where);++            //TODO fix bug related to cache : users are not unenrolled             $users_cache = $cache->get($dbquerycachekey);             if ($users_cache) {                 $users = unserialize($users_cache);                 $nbcachequeries++;-            }-            else {+            } else {                 $users = $DB->get_records_sql($select . $arraysql['select'] . $where . $arraysql['where'],                         $arraysql['params']);                 $nbdbqueries++;                 $cache->set($dbquerycachekey, serialize($users));             }-            foreach ($users as $user) {+            foreach ($users ?? [] as $user) {

ok in PHP 7.2 ?

NicoAlexH

comment created time in a month

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

 public static function process_login(\core\event\user_loggedin $event) {             $mapping = array();             $mappings_str = explode("\n", str_replace("\r", '', get_config('enrol_attributes', 'mappings')));             foreach ($mappings_str as $mapping_str) {-                if (preg_match('/^\s*([^: ]+)\s*:\s*([^: ]+)\s*$/', $mapping_str, $matches) && in_array($matches[2],-                                $customfields) && array_key_exists($matches[1], $_SERVER)) {+                if (array_key_exists($matches[1], $_SERVER)

This can't work, no ? Using $matches before defining it.

NicoAlexH

comment created time in a month

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

 public static function process_enrolments($event = null, $instanceid = null) {             $arraysyntax = self::attrsyntax_toarray($enrol_attributes_record->customtext1);             $arraysql = self::arraysyntax_tosql($arraysyntax);             $dbquerycachekey = md5($select . serialize($arraysql) . $where);++            //TODO fix bug related to cache : users are not unenrolled             $users_cache = $cache->get($dbquerycachekey);             if ($users_cache) {                 $users = unserialize($users_cache);                 $nbcachequeries++;-            }-            else {+            } else {                 $users = $DB->get_records_sql($select . $arraysql['select'] . $where . $arraysql['where'],                         $arraysql['params']);                 $nbdbqueries++;                 $cache->set($dbquerycachekey, serialize($users));             }-            foreach ($users as $user) {+            foreach ($users ?? [] as $user) {

(since we support Moodle 3.5 (I think) we therefore also must support old PHP versions

NicoAlexH

comment created time in a month

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

+<?php+// This file is part of Moodle - http://moodle.org/+//+// Moodle is free software: you can redistribute it and/or modify+// it under the terms of the GNU General Public License as published by+// the Free Software Foundation, either version 3 of the License, or+// (at your option) any later version.+//+// Moodle is distributed in the hope that it will be useful,+// but WITHOUT ANY WARRANTY; without even the implied warranty of+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the+// GNU General Public License for more details.+//+// You should have received a copy of the GNU General Public License+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.++/**+ * ${PLUGINNAME} file description here.+ *+ * @package    ${PLUGINNAME}+ * @copyright  2021 SysBind Ltd. <service@sysbind.co.il>+ * @auther     alexandn

?

NicoAlexH

comment created time in a month

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

     redirect($return); } +/* No custom field defined */+if(!$DB->get_records('user_info_field')){+    $url = new moodle_url('/user/profile/index.php');+    \core\notification::warning(get_string('no_custom_field', 'enrol_attributes', $url->get_scheme() .'://'. $url->get_host() . $url->get_path()));

just put '/user/profile/index.php' as 3rd arg

NicoAlexH

comment created time in a month

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

  $string['group'] = 'Affectation aux groupes'; $string['group_help'] = 'Vous pouvez affecter aucun ou plusieurs groupes';+$string['no_custom_field'] = 'Il semblerait qu\'aucun attribut personnalisé ne soit défini. Cliquez <a href="{$a}" target="_blank">ici</a> pour en ajouter.';

"Aucun attribut n'est défini"

NicoAlexH

comment created time in a month

Pull request review commentndunand/moodle-enrol_attributes

Integration of pr #37, unit tests and some bug fixes

 public static function arraysyntax_tosql($arraysyntax, &$join_id = 0) {                 $select .= ' ' . $sub_sql['select'] . ' ';                 $where .= ' ( ' . $sub_sql['where'] . ' ) ';                 $params = array_merge($params, $sub_sql['params']);-            }-            else {-                if ($customkey = array_search($rule->param, $customuserfields, true)) {-                    // custom user field actually exists-                    $join_id++;-                    $data = 'd' . $join_id . '.data';-                    $select .= ' RIGHT JOIN {user_info_data} d' . $join_id . ' ON d' . $join_id . '.userid = u.id AND d' . $join_id . '.fieldid = ' . $customkey;-                    $where .= ' (' . $DB->sql_compare_text($data) . ' = ' . $DB->sql_compare_text('?') . ' OR ' . $DB->sql_like($DB->sql_compare_text($data),-                                    '?') . ' OR ' . $DB->sql_like($DB->sql_compare_text($data),-                                    '?') . ' OR ' . $DB->sql_like($DB->sql_compare_text($data), '?') . ')';-                    array_push($params, $rule->value, '%;' . $rule->value, $rule->value . ';%',-                            '%;' . $rule->value . ';%');-                }+            } elseif ($customkey = array_search($rule->param, $customuserfields, true)) {+                // custom user field actually exists+                $join_id++;+                $data = 'd' . $join_id . '.data';+                $select .= ' RIGHT JOIN {user_info_data} d' . $join_id . ' ON d' . $join_id . '.userid = u.id AND d' . $join_id . '.fieldid = ' . $customkey;+                $where .= ' (' . $DB->sql_compare_text($data) . ' = ' . $DB->sql_compare_text('?') . ' OR ' . $DB->sql_like($DB->sql_compare_text($data),+                                '?') . ' OR ' . $DB->sql_like($DB->sql_compare_text($data),+                                '?') . ' OR ' . $DB->sql_like($DB->sql_compare_text($data), '?') . ')';+                array_push($params, $rule->value, '%;' . $rule->value, $rule->value . ';%',+                        '%;' . $rule->value . ';%');

for readability, this should really go into a single "code reformating" single commit

NicoAlexH

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

startedethz-let/moodle-quizaccess_wifiresilience

started time in a month

issue commentwooclap/moodle-mod_wooclap

Cannot upgrade when not-connected to WooClap (for testing purposes)

@tchapeaux we have an ongoing subscription but dont want to go through requesting many keys for each personal (local) Moodle dev platform.

The idea is to upgrade Moodle within the team without necessarily using the wooclap plugin, therefore is the plugin does not work is unimportant, but if we can 't upgrade the whole Moodle platform because of that is a blocker.

dustinbrisebois

comment created time in 2 months

issue commentndunand/moodle-mod_choicegroup

Activity Completion not working

Thanks for reporting back here!

tbeachy

comment created time in 2 months

issue commentKury25/moodle-assignfeedback_editpdfplus

Exception thrown on creation of new assignment

@nsgreen749 if you can reproduce the error, can you please post reproducibility steps and details about:

  • Moodle version
  • the plugin version
  • the full stack trace (complete error message displayed when Moodle is set to display all errors for developers)
danawortman

comment created time in 2 months

issue commentKury25/moodle-assignfeedback_editpdfplus

Exception thrown on creation of new assignment

@danawortman as Moodle 3.8 is no longer supported (not even for security fixes), I guess that in the mean time you have migrated to a supported version. Is this the case?

@nsgreen749 what Moodle version are you using?

danawortman

comment created time in 2 months

issue commentwooclap/moodle-mod_wooclap

Cannot upgrade when not-connected to WooClap (for testing purposes)

This is a duplicate of #9 .

But indeed @tchapeaux it should not fail the whole Moodle upgrade process. We had the same issue on our test platform and had to hack the upgrade code to force the upgrade. Obviously we don't have a product key for every of our testing platforms.

dustinbrisebois

comment created time in 2 months

issue commentndunand/moodle-mod_choicegroup

Activity Completion not working

The newly released version now available on Moodle.org includes the fix.

tbeachy

comment created time in 2 months

created tagndunand/moodle-mod_choicegroup

tag2021083100

Moodle "Group Choice" plugin

created time in 2 months