Your Moodle version

Blocks: People

block_people
Maintained by Picture of University of Ulm University of Ulm, Picture of Alexander Bias Alexander Bias
Moodle block which displays all teachers of a course with contact quicklinks, as well as a quicklink to the participants list
258
345
6

The block_people plugin displays a list of the course's teachers grouped by roles. The block shows the teacher's avatar, a quicklink to his/her profile and a quicklink to send him/her a message with the moodle message system. Furthermore, there is a quicklink to the participants list of the course.

See README file for details

Screenshots

Screenshot #0

Contributors

Picture of University of Ulm
University of Ulm (Lead maintainer)
Picture of Alexander Bias
Alexander Bias: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Alexander Bias
    Fri, Feb 20, 2015, 2:51 PM
    Hi José,

    this is an interesting scenario. However, I'm afraid that it is not supported by the block at the moment and we don't have the ressources to add this feature at the moment.

    If you have some developer skills or have a skilled developer near you, please have a look at block_people.php, line 74. There the get_role_users() is called which fetched the users who will be shown in the block. You might be able to use the $groups parameter of this function, which is currently not set, to limit the set of teachers to the ones you need. Alternatively, you fetch all teachers like it is done at the moment and add a step after that which drops all teachers who are not in the same group as the student.

    If you find a solution which covers the current scenario and your scenario at the same time, please feel free to create a pull request on https://github.com/moodleuulm/moodle-block_people/pulls.

    Thanks,
    Alex
  • Picture of José Montoya
    Tue, Feb 24, 2015, 5:22 AM
    Thanks a lot for your help, i´m not a developer but looking for that function i finally reached to show only the teachers for the group. isn't a good code but works for me. i'll put it here for someone else who wants to improve it for a better code.

    //get the current group
    $currentg=groups_get_user_groups($COURSE->id, $USER->id);
    $currentgp=$currentg[0];
    $currentgroup=$currentgp[0];

    // Do for every teacher with this role (now line 91)
    foreach ($tr as $t) {
    // get group's teacher
    $teacherg=groups_get_user_groups($COURSE->id, $t->id); $teachergp=$teacherg[0];
    $teachergroup=$teachergp[0];
    //check if teacher's group is the same that current user
    if($currentgroup==$teachergroup or $currentrol<2) {

    Thanks again.
    José
  • Picture of Alexander Bias
    Tue, Feb 24, 2015, 4:56 PM
    Thanks, José, for this code snippet. I won't be able to include it into the plugin (as we don't need this functionality in our university), but it might be useful for other users.

    Alex
  • Picture of Federica Marra
    Wed, Mar 4, 2015, 11:59 PM
    Hi Alexander, I like this plugin but I was looking for something to add in the Front page. Do you think that I can add the People block in the front page and set it up to show users that have been teacher at least one time in a course?
    Thanks!
  • Picture of Alexander Bias
    Thu, Mar 5, 2015, 2:47 AM
    Hi Federica,

    in fact, you can place the block to the frontpage. But it will only show the teachers which are enrolled in the "frontpage course". You're request should be quite easy to implement, you have "just" to play with the code in block_people.php line 66-76 where we are getting the list of teachers in a specific context. Do you have a developer near you who could have a look at this?

    Alex
  • Picture of Federica Marra
    Tue, Mar 10, 2015, 6:22 PM
    Ehi Alex, thanks for your answer.. Actually I tried to install it and -as you said- it is showing the administrators/teachers in front page.
    Unluckly I don't have any developer that can help me and I also don't have direct access to our server. Ideas?
  • Picture of Alexander Bias
    Wed, Mar 11, 2015, 4:55 PM
    Hi Federica,

    please see my private message as an answer to your question.

    Alex
  • Picture of Barbara S.
    Mon, Apr 20, 2015, 11:22 PM
    Hi Alexander
    Thanks for that contribution. We use it a lot.
    I have ecountered an issue. I am trying to remove somebody who has left the company from the block. I am not able though the person does not appear in the user list anymore due to LDAP authentication. Any idea how I can remove the person from the people block?
    Thanks! Barbara
  • Picture of Alexander Bias
    Tue, Apr 21, 2015, 3:19 PM
    Hi Barbara,

    if the user appears in the block, he is still enrolled in your course and has a role in your course. (It may only be that the enrollment is inactive and the block does not check that, I would have to check that).

    Have you already thought about deleting the user account from your Moodle completely? Or use the LDAP sync script (https://docs.moodle.org/28/en/LDAP_authentication#Cron_synchronization_script, located in /auth/ldap/cli/sync_users.php) to get rid of this vanished user account?

    Alex
  • Picture of Barbara S.
    Tue, Apr 21, 2015, 4:42 PM
    Hi Alex
    thanks for replying so quickly.
    I will talk to the Sysadmin about your suggestions.

    Have a nice day! smile
    Barbara
  • Picture of Barbara S.
    Tue, Apr 21, 2015, 11:56 PM
    Our solution: We will reactivate the users temporarily and remove the roles from those specific users.
  • C'est moi :-)
    Fri, Jun 17, 2016, 9:26 PM
    Hi Alexander,
    We appreciate your bloc, and use it in most of our courses. Do you plan to make it officially compatible with Moodle 3.1? It could then be installed/updated directly via Moodle web interface.
  • Picture of Alexander Bias
    Fri, Jun 17, 2016, 9:49 PM
    Hi Séverin,

    citing our Moodle release support statement from https://github.com/moodleuulm/moodle-block_people/blob/master/README.md:
    -----
    Due to limited resources, block_people is only maintained for the most recent major release of Moodle. However, previous versions of this plugin which work in legacy major releases of Moodle are still available as-is without any further updates in the Moodle plugins repository.

    There may be several weeks after a new major release of Moodle has been published until we can do a compatibility check and fix problems if necessary. If you encounter problems with a new major release of Moodle - or can confirm that block_course_overview_campus still works with a new major relase - please let us know on https://github.com/moodleuulm/moodle-block_people/issues
    -----

    Currently, we plan to work on 3.1 in July. But as far as I see, there are no fatal errors with the 3.0 version of this plugin on 3.1. Is there any problem for you with running the 3.0 version on 3.1 that requires the plugin to be marked officially compatible with 3.1?

    Thanks,
    Alex
  • C'est moi :-)
    Wed, Jun 29, 2016, 11:06 PM
    Hi Alex,

    Sorry for the late answer.
    For what i've seen, the 3.0 compatible version works well on 3.1.
    Having a plugin marked (officially / in Moodle plugins) compatible with later Moodle version just allows a more simple way to install/upgrade for administrators, and "prove" it's maintained. This way, people who decide to update to latest Moodle version (with compatible plugins) better trust it wink

    Séverin
  • Picture of Alexander Bias
    Mon, Jul 4, 2016, 9:31 PM
    Hi Séverin,

    thanks for your feedback about 3.1 and glad to hear that the 3.0 version still works.

    I fully understand your comment and marking the plugin as compatible with a certain version and we will do this as soon as we did our internal tests in July. I just asked because I thought you need the 3.0 version to be marked as compatible with 3.1 _now_

    Thanks,
    Alex
1 2
Please login to post comments