Best practice forum (Archived)

Language editing

 
? ?
Language editing
על ידי ? ? בתאריך 18/09/2012, 14:27
 

Hi all, 

I am wanting to edit the lesson.php language file. 

I would like it to say "You have scored an "A" for this module". 

A would be the grade letter, got from the gradebook. 

So i would change " Your current grade is $a->grade out of $a->total "

to,"You have scored an "$a->" for this module". 

What I am after is what goes after the $a-> also it would help to know where to get this information for next time. 

Thanks, 

Matt.

Simon Coggins
Re: Language editing
על ידי Simon Coggins בתאריך 18/09/2012, 17:07
קבוצה Totara

Hi Matt,

I'm afraid that's not how the language string templates work, you can't just change the string and have it output different data because the system would need to know where to get that data from.

What you're asking isn't possible without a code change.

Simon

? ?
Re: Language editing
על ידי ? ? בתאריך 18/09/2012, 17:13
 
I see, where do the $a-> variables come from? What other variables are available?
Simon Coggins
Re: Language editing
על ידי Simon Coggins בתאריך 18/09/2012, 17:46
קבוצה Totara

No other variables are available - only the ones that are used in the original string will work.

Simon