Best practice forum (Archived)

Language editing

 
??
Language editing
?? 发表于 2012年09月18日 Tuesday 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.

CogginsSimon
Re: Language editing
CogginsSimon 发表于 2012年09月18日 Tuesday 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
?? 发表于 2012年09月18日 Tuesday 17:13
 
I see, where do the $a-> variables come from? What other variables are available?
CogginsSimon
Re: Language editing
CogginsSimon 发表于 2012年09月18日 Tuesday 17:46
小组 Totara

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

Simon