FMCorz / moodle-block_xp

A gamification plugin for Moodle allowing students to gain experience points and level up.
https://levelup.plus/?ref=github
150 stars 41 forks source link

Allow Teacher Leveling not just student #67

Open fxpar opened 7 years ago

fxpar commented 7 years ago

Hi, It seems that only "students" events trigger some points. Unfortunately, the staff is left out of the plugin "motivation reinforcement". Could you allow also Teacher event like :

Thank you for this plugin. (Sorry if I didn't post at the right place) François

FMCorz commented 7 years ago

Hi François,

This is the right place, and thanks for your suggestion. I agree that there is value in rewarding teachers, however that's not as simple as counting those events in. I can imagine that students would be confused to see their teachers competing with them on the ladder ;-).

I'll keep that in mind, perhaps another instance of the block?

Cheers, Fred

fxpar commented 7 years ago

Hi Fred,

Thank you for your answer. And indeed, it might be better to have another instance for teachers... (hadn't thought of that, of course)

Cheers François

fxpar commented 7 years ago

Hi,

I tweaked your module from xp to xpt (xp for teacher). ... seems to work with xp. (Sorry, no clue on what to do with it on github or moodle plugin directory)

screen_20170628_095650

block_xpt_moodle33_2017032900.zip

FMCorz commented 7 years ago

Thanks François. No doubt that would work, though I'm guessing there is a more elegant way to achieve this than duplicating the entire plugin. Though the plugin's architecture is oriented towards a single instance per course, perhaps there is a way to work it out.

fxpar commented 7 years ago

;) Definitely not the subtle way, for sure ;) Chose the easy / only way for me to do it.

Thanks again for this great plugin. François

fxpar commented 7 years ago

Some events don't show up though: forums for example.

FMCorz commented 7 years ago

Hey, you'll have to dig a bit more :-D.

fxpar commented 7 years ago

Hi,

Definitely didn't find the way to get hold of the whole list of events.

I tried to add the edulevel OTHER, but not much luck yet. $infos['edulevel'] == \core\event\base::LEVEL_OTHER _(ruleevent.php line 150; helper.php line 83)

I also erased the "isadmin" from the list of users we skip (helper.php line 76)

Any idea to get me on the right track? Have a nice week-end

Regards François