Git Product home page Git Product logo

moodle-availability_sectioncompleted's Introduction

moodle-availability_sectioncompleted

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

Requirements

This plugin requires Moodle 3.9+

Motivation for this plugin

This plugin was built to enable teachers to easily restrict activities or sections to students that have completed another, usually the previous section.

This is currently already possible by adding several restrictions; this plugin simplifies that for the teacher – and has also the nice and intended side effect that it looks better for the student.

Installation

Install the plugin like any other plugin to folder /availability/condition/sectioncompleted

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

Usage & Settings

After installing the plugin, it is ready to use without the need for any configuration.

Teachers (and other users with editing rights) can add the "Section Complet" availability condition to activities / resources / sections in their courses. While adding the condition, they have to define the role which students have to have in course context to access the activity / resource / section.

If you want to learn more about using availability plugins in Moodle, please see https://docs.moodle.org/en/Restrict_access.

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 will be published and regularly updated in the Moodle plugins repository: https://moodle.org/plugins/availability_sectioncompleted

The latest development version can be found on Github: https://github.com/bdecentgmbh/moodle-availability_sectioncompleted

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/bdecentgmbh/moodle-availability_sectioncompleted/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

Please issue feature proposals on Github: https://github.com/bdecentgmbh/moodle-availability_sectioncompleted/issues

Please create pull requests on Github: https://github.com/bdecentgmbh/moodle-availability_sectioncompleted/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

This plugin is maintained for the two most recent major releases of Moodle as well as the most recent LTS release of Moodle.

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.

Copyright

bdecent gmbh bdecent.de

moodle-availability_sectioncompleted's People

Contributors

raja-lmsace avatar stefanscholz avatar vasanthlmsace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moodle-availability_sectioncompleted's Issues

function is_available is hidden sections in report

When you visit a completed report: https://example.com/report/outline/user.php?id=3&course=2&mode=complete, even though the student meets the condition of having finished the section, they are not appearing to the administrator / teacher.

I hack this including in the function is_available (classes/condition.php) that:

public function is_available($not, \core_availability\info $info, $grabthelot, $userid) {
global $USER , $CFG , $DB;
require_once("{$CFG->libdir}/completionlib.php");
$context = \context_course::instance($info->get_course()->id);

  •    if (has_capability('moodle/course:manageactivities', $context)) {
    
  •        return true; // Retorna true si el usuario es Manager.
    
  •    }
    

but i think that isn't the better way to solve it!

Thanks!

Condition does not work FIXED on 3.10 but not work 4.1.4 or later !

I previously believed that completion wasn't working because of the course format, but I did more tests and nothing changed. Now I believe that the reason is not the course format but because of the activity, which in my case we have a lot of h5p activities. But I'm not sure.

So, even though the session is completed, I don't have the release of the other one where I use the condition.

Thank you for your work, this plugin has a lot of potential.

Regards,

Plínio Felipe

Feature request: Restriction by completion of the previous section

Hi,
Very good your plugin, it really meets the needs.
You know if I can set "restrict completing the previous section". Because if we had this option, the mobility of the sections would certainly be more dynamic.
Just by dragging the section to the correct order, the plugin would already understand that the conclusion now becomes the previous section, avoiding changing the plugin settings again and manually to the correct section.
Thank you very much

Requirements Version 1.0

Description

An access restriction which can be used to restrict activities / sections to be only available if all activities in the specified section are completed.

Technical Solution

  • Create a new access restriction named "Section completed" and allow the user to select the section which needs to be completed
  • A section should be considered complete when all activities in the specified section which have activity completion configured are completed.
  • It needs to support backup/restore
  • Automated tests are required

Future Releases (out of scope)

  • Support "any" for activities (e.g. if there are 3 scorm files, one restricted to EN, one to FR, one to DE, the section should be considered complete if any of them are completed, instead of all)

Mockups

Configure restriction interface

Add restriction modal

condiction is not triggering

Hello,

I found this bug: The condiction is not triggering. All modules are concluded but the completion is not recognized. This happened in yhis specifica section... in others are ok.
Look at the print:
image

Performance: Do we need to load the section from the database?

Do we really need to touch the DB here?

$section = $DB->get_record('course_sections', array('id' => $this->sectionid));

What is the purpose? Every extra DB query contributes to DB load and has cumulative impact on performance.

Also, at the line below it, it does not look right to check if (isset($section)) - the get_record() would return false if the section did not exist. But it would still be set. Fixing this will also eliminate the need to use the at-sign operator in [@$section->section].

Mod Assign error

It seems a error about a condition not expected, it happened when I put a condition in a task type assignment.

Do you have any advice about it ?

Regards,

In Moodle 3.10.2

Erro de codificação detectado e deve ser corrigido por um programador: Not implemented (do not call unless is_applied_to_user_lists is true)

Outras informações sobre este erro
Informações de depuração:
Error code: codingerror
Rastreamento de pilha:

line 192 of /availability/classes/tree_node.php: coding_exception thrown
line 340 of /availability/classes/tree.php: call to core_availability\tree_node->filter_user_list()
line 640 of /availability/classes/info.php: call to core_availability\tree->filter_user_list()
line 109 of /availability/classes/info_module.php: call to core_availability\info->filter_user_list()
line 2171 of /mod/assign/locallib.php: call to core_availability\info_module->filter_user_list()
line 2291 of /mod/assign/locallib.php: call to assign->list_participants()
line 5664 of /mod/assign/locallib.php: call to assign->count_participants()
line 5746 of /mod/assign/locallib.php: call to assign->get_assign_grading_summary_renderable()
line 675 of /mod/assign/locallib.php: call to assign->view_submission_page()
line 55 of /mod/assign/view.php: call to assign->view()

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.