Bl4ckread / moodle-mod_adastra

Other
2 stars 0 forks source link

strange use of constants #7

Open danmarsden opened 3 years ago

danmarsden commented 3 years ago

There are a lot of places in code where you have put table names, and even the plugin name into a constant eg: mod_adastra\local\data\exercise_round::MODNAME This is hard to read, and does not follow moodle coding guidlines.

eg:

get_string('automaticsetup', mod_adastra\local\data\exercise_round::MODNAME),

Should be

get_string('automaticsetup', 'mod_adastra'),

and

$DB->get_record(mod_adastra\local\data\course_config::TABLE, array('course' => $cid));

should just be


$DB->get_record('adastra_course_settings', array('course' => $cid));
danmarsden commented 3 years ago

another example: https://github.com/Bl4ckread/moodle-mod_adastra/blob/master/classes/local/summary/user_module_summary.php#L101