moodlepeers / moodle-mod_groupformation

Formation of optimized learning groups - by topic preference or best match of individuals' characteristics and preferences; in one easy to use Moodle acticity
GNU General Public License v3.0
6 stars 5 forks source link

PHP 5.5 Abhängigkeit wegen self::class entfernen! #5

Closed jkonert closed 8 years ago

jkonert commented 8 years ago

Für den Einsatz im Mathevorkurs muss PHP 5.4 Kompatibilität her. Es wird aber im Code ein self::class verwendet, um auf die eigene Klasse zu verweisen. Das ist erst in V 5.5 gültig. Bspw. in /lib/classes/algorithms/basic_algorithm.php Zeile 174 $this->cohort->whichMatcherUsed = self::class;

Workaround: siehe http://stackoverflow.com/a/29862945 mit get_class($this) ?
Ausprobieren ob es das gleiche liefert.

rroepke commented 8 years ago

Gibt es auch Probleme mit den static::method_call() Aufrufen wie bspw. classes/moodle_interface/job_manager.php Zeile 80 ?

jkonert commented 8 years ago

unklar. Vermutlich nicht, da explizit das Schlüsselwort "class" in Version 5.4 sowie Version 5.6 nicht gültig ist. In Version 5.5 wohl nur.

jkonert commented 8 years ago

Current fixes in Development branch tested, commit 77559ae
runs PHP 5.4. FIXED