mod/termreview/tutor: Difference between revisions
Mike Worth (talk | contribs) No edit summary |
Mike Worth (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
You can also overwrite the whole function with any php function that returns true for tutor groups and false for everything else. | You can also overwrite the whole function with any php function that returns true for tutor groups and false for everything else. | ||
''' | |||
If being unable to change this is a problem, email me at michael_worth@btinternet.com and I'll try to write it for you (assuming you tell me the criteria)''' | '''If being unable to change this is a problem, email me at michael_worth@btinternet.com and I'll try to write it for you (assuming you tell me the criteria)''' |
Revision as of 12:17, 13 January 2009
Tutor groups are identified by a function in locallib.php. By default, it checks for the system at my college- a '/' somewhere in the shortname designates a tutor group. This can easily be changed- it is right at the top of locallib.php. If you just want to designate your tutorgroups by something ither than a '/' in the shortname simply change the / in
if(strpbrk($course->shortname,'/')){
to whatever you like (can be as long or short as you like). shortname can be changed to fullname or idnumber (or any other property, but these 3 are the most likely)
If you only want the class teacher or personal tutor functionality, replace
if(strpbrk($course->shortname,'/')){
with
if(true){
for everything to show as a tutor group, or
if(false){
for everything to show as a normal class.
You can also overwrite the whole function with any php function that returns true for tutor groups and false for everything else.
If being unable to change this is a problem, email me at michael_worth@btinternet.com and I'll try to write it for you (assuming you tell me the criteria)