moodle: function commented out, it do not exsist in moodle assueme it is replced by $DB