Thanks in advance,
I have some customer requirements to change Moodle grade into score(literally the keyword).
I've tried to find the Grading method dropdown (present in "moodle/course/modedit.php") in database and the also in the code but unfortunately did't got the solution.
below mentioned is my findings of some presets in moodle\mod\quiz\lib.php
/**#@+
* Options determining how the grades from individual attempts are
combined to give
* the overall grade for a user
*/
define('QUIZ_GRADEHIGHEST', '1');
define('QUIZ_GRADEAVERAGE', '2');
define('QUIZ_ATTEMPTFIRST', '3');
define('QUIZ_ATTEMPTLAST', '4');
/**#@-*/
and in moodle\mod\quiz\mod_form.php
$mform->addElement('select', 'grademethod', get_string('grademethod',
'quiz'),quiz_get_grading_options());
need to know where it comes from?
function quiz_get_grading_options() {
/*
return array(
QUIZ_GRADEHIGHEST => get_string('gradehighest', 'quiz'),
QUIZ_GRADEAVERAGE => get_string('gradeaverage', 'quiz'),
QUIZ_ATTEMPTFIRST => get_string('attemptfirst', 'quiz'),
QUIZ_ATTEMPTLAST => get_string('attemptlast', 'quiz')
);
*/
// Commented and added by sherin on 07/05/2019
return array('Highest score','Average score','First attempt','Last
attempt');
}
I've edited the existing return array in the above mentioned function(present in mod\quiz\locallib.php) and it finally worked, do some one know where the actual data is comes from?
QUIZ_GRADEHIGHEST => get_string('gradehighest', 'quiz')
Hope you guys understand the problem, please help.
Sherin... If I understand your question correctly, I think you need to change the language file that is in the 'lang' directory.
In the path /mod/quiz/lang/ (/en/, /es/,... and so for each language you have installed) there is a php file with all the words that are displayed. If you do not find the files in that route, are probably located in the moodledata.