moodle-block_xp icon indicating copy to clipboard operation
moodle-block_xp copied to clipboard

Allow Teacher Leveling not just student

Open fxpar opened this issue 7 years ago • 8 comments

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 :

  • creating a course
  • adding an activity
  • Adding a question to the question bank
  • Assignment graded

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

fxpar avatar Jun 27 '17 13:06 fxpar

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

FMCorz avatar Jun 27 '17 15:06 FMCorz

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 avatar Jun 27 '17 19:06 fxpar

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

fxpar avatar Jun 28 '17 08:06 fxpar

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.

FMCorz avatar Jun 28 '17 08:06 FMCorz

;) 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 avatar Jun 28 '17 08:06 fxpar

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

fxpar avatar Jun 28 '17 08:06 fxpar

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

FMCorz avatar Jun 28 '17 08:06 FMCorz

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 (rule_event.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

fxpar avatar Jul 07 '17 17:07 fxpar