GithubHelp home page GithubHelp logo

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

View Code? Open in Web Editor NEW
7.0 7.0 13.0 144 KB

Moodle availability plugin which lets users restrict resources, activities and sections based on roles

License: GNU General Public License v3.0

PHP 75.71% Gherkin 24.29%
moodle moodle-availability moodle-plugin

moodle-availability_role's People

Contributors

abias avatar andrewhancox avatar davosmith avatar kathrin84 avatar lucaboesch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-availability_role's Issues

Improve wording to consider users with moodle/course:viewhiddenactivities capability

Users who have the moodle/course:viewhiddenactivities capability in a course will be able to see the activity together with the note 'Not available unless: You are a(n) ':
grafik

However, as they have this capability, they can still access the activity by clicking on the activity link.
Against this background, the wording of the note is somehow misleading.

By contrast, the date condition for example has a better wording which works for users with and without this capability:
grafik

It would be worthwhile to improve the wording to consider users with the moodle/course:viewhiddenactivities capability.

teacher can view after restriction

Hello ,

i install this plugin on moodle 4.1

Restriction by course role
Moodle plugins directory: Restriction by course role

i'm moodle admin i want to add file inside thw course i want just only student can view this file,

this plugin don't need any configuration but it's not working

after i add the file and make restriction for who can view i select it's available just only for students and hidden otherwise
but still the instructor can view it ?

can you help me !!
Thanks

Pending pull request

Dear Alexander,

we had contact regarding the merger of my plugins availability_globalrole and availability_coursecatrole into availability_role. I made all required changes and set up a pull request, but it has not been accepted.

In the meanwhile it seems you have been working on the plugin, so my functionality is lost when updating.

Could you please integrate my changes?
#11

Best wishes
Robert

Missing privacy:metadata string

Debugging: Invalid get_string() identifier: 'privacy:metadata' or component 'availability_role'.
Perhaps you are missing $string['privacy:metadata'] = ''; in availability/condition/role/lang/en/availability_role.php?

Move away from YUI

This issue serves as a reminder that this plugin still uses YUI in its JavaScript code.
Currently, I am not aware that you can build availability_* plugins without YUI.
But as soon as Moodle core supports this, this plugin should be adapted.

V3.1-r3: error by import when role names are changed

Hello Alex,

I installed the V3.1-r3 on Moodle 3.1.
We have courses where we changed the role name in the course settings.
When we set the plug-in and we want to import the course into another course or make a back up and place the course back. We get the error below.

I don't have this error on other courses, just when we use the plug-in.

Gemma
ss 2017-11-02 at 09 59 19 2

Import of restricted activity doesn't complete cleanly

I have been testing a variety of scenarios using restrict by role in both Moodle 3.0.4 and Moodle 3.1.2 (with the appropriate versions of the plugin), and have found an issue with importing.

Steps to reproduce:

  1. Restrict an activity/resource to a role (e.g. student)
  2. Go to a different course and attempt to import the restricted activity

The import process halts with an error (screenshot attached below). However when you examine the second course, the activity has in fact been imported and restricted correctly.

Would you be able to take a look at this? Thanks!

import_error

restriction "is not"

Hi,
we are on 3.9, also tested in 3.10. Works good in positive mode with "must" be...!

But if I use under restrictions "must not" i.e. role non-editing teacher (and also deleted the right to "View hidden sections - moodle/course:viewhiddensections") the non-editing teacher still sees the section/activity.
Is this the problem, that the role non-editing teacher has by desing the right to see more things/all? So the little option to hide it with the eye under restrictions, is not a real hidden, as in Edit-hide, which i can change with the above right-deletion?
Do You plan to adapt it in future?

Unable to restore course with active availability role

I have a course with one instance (usage) of availability role, used to restrict availability of a section.
Trying to restore a successful backup of the course, I am getting the following error:
"error/setting_by_name_not_found"

With more details:
Debug info:
Error code: setting_by_name_not_found
$a contents: roles
Stack trace:
line 123 of /backup/util/plan/base_plan.class.php: base_plan_exception thrown
line 97 of /backup/util/plan/base_task.class.php: call to base_plan->get_setting()
line 106 of /backup/util/plan/base_task.class.php: call to base_task->get_setting()
line 66 of /availability/condition/role/classes/condition.php: call to base_task->get_setting_value()
line 668 of /availability/classes/tree.php: call to availability_role\condition->include_after_restore()
line 323 of /availability/classes/info.php: call to core_availability\tree->update_after_restore()
line 823 of /backup/moodle2/restore_stepslib.php: call to core_availability\info->update_after_restore()
line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_update_availability->define_execution()
line 181 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
line 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 333 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
line 224 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
line 111 of /backup/restore.php: call to restore_ui->execute()

Configure which roles can be used

Currently, the teacher can use all roles which he is allowed to assign in the course to restrict a activity.
However, in some setups, this list could be too long.

It would be worthwhile to build an admin setting where the admin can set a whitelist of roles which can be used to restrict activities.

Subscriber in the forum

Hello,
I have observed the following behavior of the Restriction by course role plugin:
In a course there are three roles: Leader, Assistant and Participant
A course section is only accessible for leader and assistant. In the course section there is the moodle standard forum. In the subscriber list of the forum there are also the participants. However, during a test I could not see that the participants also receive a message from the forum via email. They also do not seem to have access to the course section and the forum activity.
It is just a bit confusing that they just appear in the subscriber list. Maybe this bug can be fixed.
Best regards
Remo

Mark nonsensically role restrictions

With this plugin, teachers are able to set access restrictions which do not make sense or do not fulfil the expected results.

As an example, think about a Moodle installation which provides a special course role for teaching assistants. Users with this course role are allowed to use assignment activities, but they are not allowed to use forum activities.

If the teacher restricts the availability of an assignment activity to the teaching assistant role, everything is fine.
But if the teacher restricts the availability of a forum activity to the teaching assistant role, it does not automagically make the activity available for teaching assistant.

The plugin should consider such configurations and

  • assist the teacher on the activity settings page to avoid nonsensically role restrictions
  • add a warning to the availability information on the course overview page if the role restriction is nonsensical

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.