GithubHelp home page GithubHelp logo

moodle-an-hochschulen / moodle-block_people Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 9.0 181 KB

Moodle block which displays all teachers of a course with contact quicklinks, as well as a quicklink to the participants list

License: GNU General Public License v3.0

PHP 70.57% CSS 1.73% Gherkin 27.70%
moodle moodle-plugin moodle-block

moodle-block_people's Introduction

moodle-block_people

Moodle Plugin CI

Moodle block which displays all teachers of a course with contact quicklinks, as well as a quicklink to the participants list

Requirements

This plugin requires Moodle 4.3+

Motivation for this plugin

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.

Installation

Install the plugin like any other plugin to folder /blocks/people

See http://docs.moodle.org/en/Installing_plugins for details on installing Moodle plugins

Usage & Settings

After installing the plugin, it can be directly used by users and can be added to course overview pages.

To configure the plugin and its behaviour, please visit: Site administration -> Plugins -> Blocks -> People.

There, you find three sections:

1. Roles

Show these roles

This setting allows you to control which users appear in this block. Users need to have at least one of these roles in a course to be shown in the block.

Show multiple roles

This setting allows you to control if users who have more than one of the roles configured above are listed once or multiple times in this block. If this setting is disabled, users will be only listed with the first role they have according to the global role sort order. If this setting is enabled, users will be listed within each of their roles.

2. Participants page

Show link to the participants page

By enabling this setting, a link to the participants page of the course will be shown within the block.

Please note: Even if this setting is enabled, this block only shows the link to the participants list if the user has the capability moodle/course:viewparticipants. If the user does not hold this capability, a hint "Viewing the participants list is prohibited in this course" will be shown in the block. See http://docs.moodle.org/en/Capabilities/moodle/course:viewparticipants for details on this capability.

3. Hiding the block

Hiding the block

By enabling this setting, the block can be hidden by users.

Important notice: Disabling this setting will entirely remove the showing / hiding the block menu item. This means, that users cannot hide this block anymore, but on the other hand, blocks that are already hidden cannot be shown anymore, too. If you want to enable this feature, consider using the following function to reset the visibility for all "block_people" instances.

Reset visibility

By enabling this checkbox, the visibility of all existing "block_people" instances will be set to visible (again).

Please note: After saving this option, the database operations for resetting the visibility will be triggered and this checkbox will be unticked again. The next enabling and saving of this feature will trigger the database operations for resetting the visibility again.

Fixed Behaviours

1. Links

block_people only allows to view the teacher's profile if the user has the capability moodle/user:viewdetails See http://docs.moodle.org/en/Capabilities/moodle/user:viewdetails for details on this capability

block_people only shows a quicklink to the message system if the user has the capability moodle/site:sendmessage and if the Moodle message system is turned on ($CFG->messaging) See http://docs.moodle.org/en/Capabilities/moodle/site:sendmessage for details on this capability and http://docs.moodle.org/en/Messaging for details on the messaging system

2. Roles sort order

block_people shows teacher role groups in the order defined in /admin/roles/manage.php. Please visit this settings page if you want to modify the sort order

Capabilities

This plugin also introduces these additional capabilities:

block/people:addinstance

This capability controls who is allowed to add a new people block to the Dashboard

block/people:myaddinstance

This capability controls who is allowed to add a new people block to all other pages

Block placement

block_people is used ideally as sticky block and appears on all of your course pages at the same position

See http://docs.moodle.org/en/Block_settings#Making_a_block_sticky_throughout_the_whole_site for details about sticky blocks

Theme support

This plugin is developed and tested on Moodle Core's Boost theme. It should also work with Boost child themes, including Moodle Core's Classic theme. However, we can't support any other theme than Boost.

Plugin repositories

This plugin is published and regularly updated in the Moodle plugins repository: http://moodle.org/plugins/view/block_people

The latest development version can be found on Github: https://github.com/moodle-an-hochschulen/moodle-block_people

Bug and problem reports / Support requests

This plugin is carefully developed and thoroughly tested, but bugs and problems can always appear.

Please report bugs and problems on Github: https://github.com/moodle-an-hochschulen/moodle-block_people/issues

We will do our best to solve your problems, but please note that due to limited resources we can't always provide per-case support.

Feature proposals

Due to limited resources, the functionality of this plugin is primarily implemented for our own local needs and published as-is to the community. We are aware that members of the community will have other needs and would love to see them solved by this plugin.

Please issue feature proposals on Github: https://github.com/moodle-an-hochschulen/moodle-block_people/issues

Please create pull requests on Github: https://github.com/moodle-an-hochschulen/moodle-block_people/pulls

We are always interested to read about your feature proposals or even get a pull request from you, but please accept that we can handle your issues only as feature proposals and not as feature requests.

Moodle release support

Due to limited resources, this plugin is only maintained for the most recent major release of Moodle as well as the most recent LTS release of Moodle. Bugfixes are backported to the LTS release. However, new features and improvements are not necessarily backported to the LTS release.

Apart from these maintained releases, 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 this plugin still works with a new major release - please let us know on Github.

If you are running a legacy version of Moodle, but want or need to run the latest version of this plugin, you can get the latest version of the plugin, remove the line starting with $plugin->requires from version.php and use this latest plugin version then on your legacy Moodle. However, please note that you will run this setup completely at your own risk. We can't support this approach in any way and there is an undeniable risk for erratic behavior.

Translating this plugin

This Moodle plugin is shipped with an english language pack only. All translations into other languages must be managed through AMOS (https://lang.moodle.org) by what they will become part of Moodle's official language pack.

As the plugin creator, we manage the translation into german for our own local needs on AMOS. Please contribute your translation into all other languages in AMOS where they will be reviewed by the official language pack maintainers for Moodle.

Right-to-left support

This plugin has not been tested with Moodle's support for right-to-left (RTL) languages. If you want to use this plugin with a RTL language and it doesn't work as-is, you are free to send us a pull request on Github with modifications.

Maintainers

The plugin is maintained by
Moodle an Hochschulen e.V.

Copyright

The copyright of this plugin is held by
Moodle an Hochschulen e.V.

Individual copyrights of individual developers are tracked in PHPDoc comments and Git commits.

Initial copyright

This plugin was initially built, maintained and published by
Ulm University
Communication and Information Centre (kiz)
Alexander Bias

It was contributed to the Moodle an Hochschulen e.V. plugin catalogue in 2022.

moodle-block_people's People

Contributors

abias avatar kathrin84 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moodle-block_people's Issues

Recommendation: Link Users name to profile, similar to the picture

It would be really great if the user's name would link to the user profile similar to the image. We're looking for a way to bring Professor Profiles to the forefront. This small change would make a significant difference! Any chance it would be helpful for your students too?

Can't Add People Block in All Courses Together

Moodle 4.1
I added People Block in one course by admin account. Then I configure it to Display on page types to 'Any Course Page'.
I also reset visibility setting. But It shows only my course home page. Not on all course home page.

Cache role names in course

On https://github.com/moodleuulm/moodle-block_people/blob/master/block_people.php#L121, the plugin fetches the role names everytime the block is displayed.
However, role_get_names() always triggers DB queries and does not cache the role list.

It would be worthwhile to implement a cache within the plugin which caches the role list per course and invalidate it in the case if a) the admin changes the plugin configuration and wants to display other roles or b) if the roles get renamed globally or c) if the role names are overwritten in the course settings.

Hide users with suspended enrolments

Following issue #7, it would be desirable to hide users with suspended enrolments from the user list in the block.
However, in contrast to #7, this isn't that straightforward as the block currently only checks roles and not enrolments.

Showing teachers not on the course

Just installed the plug-in on our Moodle (3.4).
It's showing teachers that are not connected to that course in the Block.

Any ideas?

bobby

Problem with users having several roles in the course

This block is really easy to use, and useful.

But i've seen a bug, with users having several roles in the course : the roles (names) are then mixed, and not the good (first classed) one...

Not sure to explain it clearly in just two small sentences, i hope screenshots will better help.

As you can see, user "SYLVAINE PERUZZETTO" should appear as "Responsable pédagogique", and there should not be "Enseignant" between "Responsable pédagogique" and "Responsable administratif"!

Séverin

bloc-people-roles
bloc-people-2
bloc-people-1

Suspended users shown

Really appreciate the plugin. Works really well.
One small issue we've noticed though is users that have been suspended show within the block.
Would it be possible to add a check to see if user is suspended before adding to the array?

Improve lib.php

By definition, lib.php should be as small as possible:

Moodle core often (but not always) loads all the lib.php files of the given plugin types. For the performance reasons, it is strongly recommended to keep this file as small as possible and have just required code implemented in it

Source: https://docs.moodle.org/dev/Plugin_files#lib.php

In this plugin, some additional functions are located in lib.php which could be moved to a locallib.php or to autoloaded classes.

Local settings

Hi Alexander,

we use this plugin in our university and I really appreciate what it does.

Now we need a new functionality, the possibility to have a local customization of roles listed in a specific block instance (i.e. local customization of global course contacts used by default).

If you want I can develop this new feature.

Show the block config directly when adding the block

In MDL-74465, block_html in Moodle core got the possiblity to show the block config directly when the block is added.
It would be worthwhile to investigate if this feature could be added to block_people as well.

Group support

Currently in the 3.10 version, if a course is set for Separate groups, and the groups consist of a Teacher and some students, the block does not respect this, but instead shows all the Teachers in the course.

Clicking the Participants link, of course, does respect this, so some Teachers may show up on the block but not on the Participants list for a student.

The same situation happens if the Non-editing teacher role is allowed, as in the case where a course has many Teaching Assistants with students assigned to them by group.

It would be very useful in courses with Separate groups that the block respect these views.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.