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
7k
2

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

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 Brian Peat
    Fri, Dec 14, 2012, 9:50 PM
    One more question...is there a way to change the title "Non-editing teacher" to "Instructor" ? I've change the labels in the course, and I even tried changing the language string in the language file, but it didn't change in your block. Thanks!
  • Picture of Brian Peat
    Fri, Dec 14, 2012, 9:51 PM
    I also can't seem to change the name of the block sad
  • Picture of Alexander Bias
    Mon, Dec 17, 2012, 5:16 PM
    Brian,

    > One more question...is there a way to change the title "Non-editing teacher" to "Instructor" ? I've change the labels in the course, and I even tried changing the language string in the language file, but it didn't change in your block. Thanks!

    I have published a new version of the block which now supports role names which have been renamed in course context. Please have a try smile

    > I also can't seem to change the name of the block

    Currently, there is no support for changing the name of the block and I don't plan this either. Please consider using the language customization which can be found in Language -> Language Customization. The name of the block is found in block -> block_people.php and it's identifier is "pluginname".
  • Picture of Mathieu Pelletier
    Fri, Mar 7, 2014, 1:33 AM
    Hello,

    I am on Moodle 2.6 and get the following when trying to install this block:

    Debug info: quizaccess_honestycheck
    Error code: codingerror
    Stack trace:
    line 514 of /lib/classes/update/deployer.php: coding_exception thrown
    line 163 of /lib/classes/update/deployer.php: call to core\update\deployer->component_writable()
    line 1334 of /admin/renderer.php: call to core\update\deployer->deployment_impediments()
    line 909 of /admin/renderer.php: call to core_admin_renderer->plugin_available_update_info()
    line 221 of /admin/renderer.php: call to core_admin_renderer->plugins_check_table()
    line 417 of /admin/index.php: call to core_admin_renderer->upgrade_plugin_check_page()

    3.367053 secs RAM: 43.7MB RAM peak: 44.8MB Included 1067 files Contexts for which filters were loaded: 0 Filters created: 0 Pieces of content filtered: 0 Strings filtered: 0 get_string calls: 600 Included YUI modules: 0 Other JavaScript modules: 1 DB reads/writes: 38/1 ticks: 338 user: 79 sys: 36 cuser: 0 csys: 0 Load average: 34.73 Session (core\session\file): 7.9KB Caches used (hits/misses/sets): 0/0/0
    This page is: General type: maintenance. Context System (context id 1). Page type admin-index.
  • Picture of Alexander Bias
    Fri, Mar 7, 2014, 6:17 PM
    Mathieu,

    i can't reproduce your problem. Are you really sure that this happens when you install my (and only my) plugin?

    Alex
  • Picture of Boris Mayencourt
    Thu, Mar 27, 2014, 11:33 PM
    Hello Alex.

    The teacher is shown in the course description but doesn't show up in the people block.

    For instance managers or students show in both.

    Do you have any idea how to fix this?

    Thanks a lot for your work

    Regards

    Swisside
  • Picture of Alexander Bias
    Fri, Mar 28, 2014, 5:26 PM
    Boris,

    please verify the "coursecontact" setting on /admin/settings.php?section=coursecontact. The people block displays users with these roles in your course.

    If the coursecontact setting is correct and the block still displays the wrong people, please send me screenshots of the coursecontact setting, of your user + role list in the moodle course and of the people block in the course so that I can replicate the problem.

    Alex
  • Picture of José Montoya
    Fri, Feb 20, 2015, 6:50 AM
    Hi, I love this block but I have a trouble, I need to show only the teacher for the current group. The course is forced by separated groups but the students of any group can see all the teachers and they are confused because they think all are from their groups, what can i do?
    Jose
  • 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
1 2
Please login to post comments