Best practice forum (Archived)

Language editing

 
? ?
Language editing
by ? ? - Tuesday, 18 September 2012, 2:27 PM
 

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
by Simon Coggins - Tuesday, 18 September 2012, 5:07 PM
Group 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
by ? ? - Tuesday, 18 September 2012, 5:13 PM
 
I see, where do the $a-> variables come from? What other variables are available?
Simon Coggins
Re: Language editing
by Simon Coggins - Tuesday, 18 September 2012, 5:46 PM
Group Totara

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

Simon