Coder Social home page Coder Social logo

jonof / moodle-block_completion_progress Goto Github PK

View Code? Open in Web Editor NEW
17.0 11.0 64.0 276 KB

A time management tool for students using activity completion

Home Page: https://moodle.org/plugins/block_completion_progress

License: GNU General Public License v3.0

PHP 88.15% JavaScript 4.74% CSS 2.71% Gherkin 4.40%

moodle-block_completion_progress's Introduction

Completion Progress block for Moodle

The Completion Progress block is a time-management tool for students. It visually shows what activities/resources a student is supposed to interact with in a course. It is colour-coded so students can quickly see what they have and have not completed/viewed. The block shows activities with activity completion settings.

To install, please refer to the Moodle documentation for installing plugins appropriate to your Moodle version.

Once the Completion Progress block is installed, you can use it in a course as follows.

  1. Turn editing on
  2. Create your activities/resources as normal
  3. Set completion settings for each activity you want to appear in the bar, including an expected by date
  4. Add the Completion Progress block to your page
  5. Move your block into a prominent position
  6. (Optional) Configure how the block should appear

Hidden items will not appear in the Completion Progress block until they are visible to students. This is useful for a scheduled release of activities.

moodle-block_completion_progress's People

Contributors

danmarsden avatar deraadt avatar ewallah avatar gemguardian avatar jazinheira avatar jonof avatar lucaboesch avatar markuskgit avatar micaherne avatar mwehr avatar nadavkav avatar nikpap avatar nmoller avatar pauldamiani avatar usqfowlerj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-block_completion_progress's Issues

Average progress of all or specific courses

Good day.

I would like to request for the feature of the title.... I explain myself better:

Let's assume the following scenario: I have 2 courses on my dashboard with different activities. One of the courses is 40% complete and the other course is 80% complete. It would be very useful a block on the dashboard to have a single progress bar showing the combined percentage of both courses which would be 60% in this example.

Hopefully you agree with me ;)
Kind regards.

Behat deprecated step

Just to let you know that there is an error when executing the behat tests for this plugin. The following step, on line 47 of tests/behat/block_completion_progress.feature is deprecated :

And I navigate to "Edit settings" node in "Quiz administration"

Why user selection & action has been removed from overview ?

The ability to send a message or write note, to selected users from the course completion overview page was great but has been removed. Is there a reason ? Is there a simple way reactivate the feature ?

The form used to do that is still there in the html (apparently uselessly). The checkboxes and action select dropdown, have been removed.

timeout when sorting by progress

hello
first of all thank you for this plugin :)
we installed it on our Moodle platform and integrated it into a course with 1300 students, however we encounter a timeout problem when we want to sort by progression. Is there another solution than to increase the different timeouts?

we are using Moodle 3.11.5+ and the plugin version 2021070900

thank you for your help.

Change submision status or Add submission status of 'Resubmitted' for assignments using attempt until activity is passed

When auto reopening of attempts until pass is on and submission is made on new 'attempt' and the grade is not pass, status remains as 'Completed' (green) even after student has resubmitted next attempt. Even if student remove the attempt the status remain as Completed. Users (mostly teacher) cannot see where resubmission has been made to previously failed attempt.

It would be great the possibility of a new status, in example a status with color yellow and red cross. That mean task is resumited (o edited) and not passed.

This enhancement maybe adds a new status for this purpose, including a new 'Resubmitted' language string and background colour (with setting).

Fix up the moodle plugins directory git repo links and canonical git repo for this plugin

The plugin dir links to this repo:

https://moodle.org/plugins/block_completion_progress

But it lists @jonof as the maintainer who has a different repo:

https://github.com/jonof/moodle-block_completion_progress

Can I please suggest that:

  1. Change the link to point to @jonof 's repo

  2. It would be much better that if @deraadt is no longer the lead maintainer then can this repo be properly transferred to @jonof 's github repo space (or a new organisation space?) rather than it being a github fork, because all the github issues and pull requests appear only in the deraadt canonical version. We just need to make sure any divergence is not lost in the transfer

This way we don't get pull requests like #33 going to the wrong place and stalling for 18 months

Submission state when working with groupings is not correct

Hi @deraadt

We've encountered following problem when working with groupings in assignments. The student which has submitted the work has the correct display, but the other students in the group has always the wrong. The same behavior is also when the group gets the grading.

Here two examples:
image


image


I was working already on a patch and it works with my first tests. The pull request will follow soon.

Greets,
Adrian

mod_assign grading page never loads due to a big number of Completion progress blocks

Hi,

In a Moodle 3.9 site with 8,000 Completions progress block instances teachers can't open assignment grading page. The /lib/ajax/service.php?sesskey=xxx&info=core_get_fragment' AJAX call takes ages to complete.

As I can see on_site_page() returns true

public static function on_site_page($page = null) {
because$page->pagetype is set to site-index for this call. Thus, get_content() iterates through all teacher's courses and then through all course blocks.

option to show hidden activity

I wonder if you can add a feature that allows the plugin to show the hidden activities. Maybe a switch that users can define what behavior they want?

Accessibility

Hi, I'm reviewing my site with a view to improving accessibility. One of the things I've noticed is that the progress bar uses colours to convey the completion status - and I do note that text appears under the progress bar when you hover over the items.

I also noticed that you give the teachers the capability to add icons in the progress bar itself, but by default this is off - with no way for the system admin to change that default.

Would it be possible to change this default to on?

Would it also be possible to show an icon for all states? It currently only shows an icon for 2.

Hide restricted activities from progress bar

Hi,

We've realized that the progress bar doesn't show hidden activities, but those activities with access restrictions are always shown even if they're not available, and that could confuse students.

It would be great if the progress bar could only show the activities each student could access, and therefore the percentage shown in the teachers' report would be more accurate too.

Remove support for Moodle 3.5–3.7

3.5 leaves security support in May 2021. 3.6 left security support in May 2020. 3.7 left security support in November 2020.

The Overview table can then be redesigned based on the modern core Participants table.

No keyboard accessibility support

The "What lessons have I viewed for this course?" and "Lessons completed" sections are not keyboard accessible. While mouse users are able to move focus between each individual lesson, keyboard users cannot do this. They will be unable to pull up the additional information that appears when users hover over a specific lesson. This will also mean that these users cannot use this section to quickly navigate to a specific lesson.

Each of these elements could be given a tabindex="0" attribute so that they will receive focus. Any device specific event handlers should be replaced to allow keyboard commands to accomplish the same task. For example, since onmouseover is used, the completion information will only update when a mouse is used, regardless of keyboard focus.

Clarify description for submitted but not completed

In my experience, students become confused by the description on partially completed activities. That is, when completion parameters are set to "require grade" or something other than "student must submit", the bar turns yellow after a student submits the assignment, but the description reads "Not completed (Submitted)".

The state of the activity could be more clearly described. I would suggest adding an additional description. In English, something like "Not Completed (Awaiting mark)" gives a better sense of the state of the submission. Having "Submitted" in the parentheses might lead the user to infer that there is something wrong with the submission state.

I might be missing something in the logic, but the above would seem to be easily fixed by:

  1. adding $string['markpending'] = 'Awaiting mark'; to lang file.
  2. add $stringpending = get_string('markpending', 'block_completion_progress'); to line 544 of lib.php.
  3. change "$stringsubmitted" to "stringpending" at line 580 and 581 (lib.php)
  4. add new icon for pending (clock with tick mark?)
  5. add new line after 580 in lib php: $icon = 'pending';

Thoughts on whether the above would work? I have tested this on my own site and it works nicely, but perhaps there are some 'gotchyas' I have not foreseen.

Red when a second assignment is submitted instead of yellow

picture

When a student has submitted one assignment and is graded below the limits he gets another try.
If the student submits a corrected one the color stays red instead of yellow.
This means that the teacher has to look through all the red ones for a second assignment.

If the teacher grades the new assignment over the limit the color show green as it should.

Thanks for a very useful plugin
Palle Nielsen

Workshop teacher multi "example" submissions shows up as duplicates

On one of the Workshop modules that have completion turned on, as a teacher, I add two "example" submissions. And got the following errors/warnings when debugging is turned on.

Did you remember to make the first column something unique in your call to get_records? Duplicate value '54' found in column 'id'.

line 1097 of /lib/dml/mysqli_native_moodle_database.php: call to debugging()line 76 of /blocks/completion_progress/lib.php: call to mysqli_native_moodle_database-get_records_sql()
line 254 of /blocks/completion_progress/block_completion_progress.php: call to block_completion_progress_student_submissions()
line 288 of /blocks/moodleblock.class.php: call to block_completion_progress-get_content()
line 230 of /blocks/moodleblock.class.php: call to block_base-formatted_contents()
line 976 of /lib/blocklib.php: call to block_base-get_content_for_output()
line 1028 of /lib/blocklib.php: call to block_manager-create_block_contents()
line 476 of /lib/outputrenderers.php: call to block_manager-ensure_content_created()
line 36 of /theme/essential/layout/tiles/header.php: call to core_renderer-standard_head_html()
line 28 of /theme/essential/layout/columns3.php: call to require_once()
line 1028 of /lib/outputrenderers.php: call to include()
line 958 of /lib/outputrenderers.php: call to core_renderer-render_page_layout()
line 244 of /course/view.php: call to core_renderer-header()

You might want to make "'workshop' => "SELECT c.id" into a DISTINCT ?
As it seems to solve this issue.

Class \course_backup\copy\copy is deprecated.

See MDL-74548

block_completion_progress\general_test::test_course_copy
Unexpected debugging() call detected.
Class \course_backup\copy\copy is deprecated. Please use the copy_helper class instead.

  • line 91 of /backup/util/ui/classes/copy/copy.php: call to debugging()
  • line 268 of /blocks/completion_progress/tests/general_test.php: call to core_backup\copy\copy->__construct()

Replace module.js with AMD equivalent

Main objectives:

  • Write a functionally equivalent replacement in AMD.
  • Reduce the amount repetitive HTML generated.
  • Replace inline JavaScript with delegated event handler-driven behaviour.
  • Adapt styling to use CSS as much as possible without needing specialised variants of the HTML to be emitted.
  • Remain IE11 compatible for the time being.

export overview percentages

I might be missing something, but a way to export the percentage of completed tasks or progress percentage shown in the overview of students would be great.

Scaling issue with large classes with high concurrent users

I'm debugging a scaling issue, the root cause appears to be contention with this query:

SELECT g.id, '' || i.itemmodule || '-' || i.iteminstance || '-' || g.userid as exclusion
FROM mdl_grade_grades g, mdl_grade_items i
WHERE i.courseid = $1
AND i.id = g.itemid
AND g.excluded <> 0

Which is queried via:

block_completion_progress_exclusions($course->id);

In 2 of the 3 places this function is called, we are only concerned with the current user, and not the whole class, so I am thinking of making a second optional argument:

block_completion_progress_exclusions($course->id, $user->id);

and if this is set it will do a smaller lookup. We are doing more profiling and should have a pr ready at some stage

Quiz with manual grading not showing "submitted but not graded"

I have a quiz with essay questions.
The student submits the quiz.
The gradebook says "Not yet graded".

The Completion progress block shows the same colour and message for this quiz as one that hasn't been attempted.

The colour is blue, not yellow. The message on hover is "Not completed".

This is a problem because it confuses students, where they see the quiz is not complete, open it, and discover that actually they have submitted, and it is waiting grading.

Let Parents view the Completion Progress block

Good day.

I would like to request for the feature of letting parents view the Modified Completion Progress block.
This will allow parents to know if their child is doing the required duties for a certain period, term, or semester.

Overview of Student page doesn't show relevant activity

Hi there,

We appear to have an issue with the latest release of this plug-in on Moodle 3.5.7, On the course page looking at the block hovering over the small blocks shows the relevant activity as expected, as below:

Screenshot_2019-07-10 Course Clinical Coaching Veterinary Nursing

However going to the Overview of Students results in this not happening:

Screenshot_2019-07-10 Overview of students

You can't see the pointer but it was certainly hovering over the blocks, clicking on the blocks still seems to work, it just doesn't show the name of the activity.

As you can see at the bottom there is also an error relating to note_get_state_names. The full error in the logs reads as:

Default exception handler: Exception - Call to undefined function note_get_state_names() Debug: \nError code: generalexceptionmessage\n* line 361 of /blocks/completion_progress/overview.php: Error thrown\n,

Any ideas what the cause of this issue might be? This appears to be happening on all instances of the block.

Kind regards,

Sam

Error on select when no student is checked

Hello,

After playing around with the plugin i noticed that when you navigate to "Overview of students", scroll down to "With selected users..." and select either "send a message" or "add a note" without selecting a user, it throws the following error:

image

This was tested on moodle 4.0, using the plugin version 2022042000.

A possible solution would be disabling this dropdown via javascript when no student is selected.

Best regards!!

test_assign_get_completion_state() fails on 3.4 and higher versions.

missing "timecreated" field when creating the block in the instances table.

Full error:

  1. block_completion_progress_base_testcase::test_assign_get_completion_state
    dml_write_exception: Error writing to database (ERROR: null value in column "timecreated" violates not-null constraint
    DETAIL: Failing row contains (9, completion_progress, 14, 0, 0, course-view-, null, side-post, 5, Tzo4OiJzdGRDbGFzcyI6Njp7czo3OiJvcmRlcmJ5IjtzOjExOiJvcmRlcmJ5dGlt..., null, null).
    INSERT INTO phpu_block_instances (blockname,parentcontextid,pagetypepattern,showinsubcontexts,defaultweight,defaultregion,configdata) VALUES($1,$2,$3,$4,$5,$6,$7) RETURNING id
    [array (
    'blockname' => 'completion_progress',
    'parentcontextid' => 14,
    'pagetypepattern' => 'course-view-
    ',
    'showinsubcontexts' => 0,
    'defaultweight' => 5,
    'defaultregion' => 'side-post',
    'configdata' => 'Tzo4OiJzdGRDbGFzcyI6Njp7czo3OiJvcmRlcmJ5IjtzOjExOiJvcmRlcmJ5dGltZSI7czo4OiJsb25nYmFycyI7czo3OiJzcXVlZXplIjtzOjE2OiJwcm9ncmVzc0Jhckljb25zIjtzOjE6IjEiO3M6MTQ6InNob3dwZXJjZW50YWdlIjtzOjE6IjAiO3M6MTM6InByb2dyZXNzVGl0bGUiO3M6MDoiIjtzOjE4OiJhY3Rpdml0aWVzaW5jbHVkZWQiO3M6MTg6ImFjdGl2aXR5Y29tcGxldGlvbiI7fQ==',
    )])

/lib/dml/moodle_database.php:489
/lib/dml/pgsql_native_moodle_database.php:248
/lib/dml/pgsql_native_moodle_database.php:969
/lib/dml/pgsql_native_moodle_database.php:1017
/blocks/completion_progress/tests/base_test.php:108
/lib/phpunit/classes/advanced_testcase.php:80

Extra info on hover on Overview page never collapses

Hello,

we are currently using this plugin as an easy way to show both students and teachers the progress of their current courses and it does a really good job at this. So first of all thank you for your time working on this plugin.

I just have one issue with it. On the overview page there is extra info shown when you hover over a row, but that info stays when the mousepointer moves on to the next row (or out of the table). I would expect the extra info row to collapse in this case. I have attached a Gif to illustrate the behaviour. I was wondering if that is intended or if it is something that could be changed for the next release.

We are on version 2020081000 on Moodle 3.9

Overview

Clicking overview button returns database read error - column s.userid does not exist

Getting the following error:

Debug info: ERROR: column s.userid does not exist
LINE 1: SELECT '' || s.userid || 0 || c.id
^
SELECT '' || s.userid || 0 || c.id
FROM mdl_workshop_submissions s, mdl_workshop w, mdl_modules m, mdl_course_modules c
WHERE s.workshopid = w.id
AND w.course = $1
AND m.name = 'workshop'
AND m.id = c.module
AND c.instance = w.id
[array (
0 => '44298',
)]
Error code: dmlreadexception

Stack trace:

line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 242 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 776 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 118 of /blocks/completion_progress/lib.php: call to pgsql_native_moodle_database->get_records_sql()
line 182 of /blocks/completion_progress/overview.php: call to block_completion_progress_course_submissions()

Tried changing s.userid to s.authorid on line 108 of lib.php as that is the name of the column in the db, seems to work

PHP Notice when using user field filter and enabled debugging

Hi team,

It seems like there is a PHP Notice displayed on the view report page when debugging is turned on and user filter is used for the report:

Notice
:  Undefined offset: 1 in /var/www/site/blocks/configurable_reports/components/filters/fuserfield/plugin.class.php on line 174

As I can see preg_split() returns an array with only one element:

root@003b7cbe0a84:/var/www/site# cat my.php
<?php
var_dump(preg_split('/:/', 'Some string'));
root@003b7cbe0a84:/var/www/site# php my.php
array(1) {
  [0]=>
  string(11) "Some string"
}

So list($field, $operator) causes PHP Notice.

SQL used in my report:

select *
from prefix_user u
where
  1 = 1 
  %%FILTER_USERS:u.firstname%%
  %%FILTER_USERS:u.lastname%%

Cheers,
Misha

Problem with restore and groups

Moodle 3.10. 4 - Plugin version 2021050400
when I do a full backup (with groups) a course that contains several completion progress block (each configured to be visible to a specific group), once I restore into a new course, only the first instance of a completion progress block restores, and it reconfigures to 'all participants'

Notice / warning on line 182 when no activities is set in the block

When theres no activities set in the block it casts a php notice and warning.

Notice: Undefined property: stdClass::$selectactivities in /var/www/moodle/blocks/completion_progress/lib.php on line 182

Warning: in_array() expects parameter 2 to be array, null given in /var/www/moodle/blocks/completion_progress/lib.php on line 182

Link to label blank

Hi Michael,

For activities in the progress bar, clicking on the cell in the bar takes you to the activity. Really nice! But if the cell is for a label, then the link doesn't work and it sends you to the site front page. Not so nice. I guess there is some property missing on labels that generates this link. Perhaps checking for an empty URL and adding the course main page if empty would solve it?

Thanks,
Aaron

No names/hover alt text read via screen reader on links

The links within the "What lessons have I viewed for this course?" section lack names which makes navigation via screen reader very difficult. In addition to this, the information that appears when a user hovers over a lesson is not read to screen reader users. They would have no way of easily accessing their progress and completion data.

Each of the links within this section should receive an aria-label that corresponds with the section's name. In addition to this, the other information regarding progress and whether or not a lesson has been completed should be included in an aria-describedby attribute.

Multilang Tags are not filtered properly.

Thank you for the great plugin.

Block Version for Moodle 2.7 onwards - 2016090500
Moodle Version - 3.1.3+ (Build: 20161208)
There is problem with Completion Progress which was not an issue in Progress Bar.
Multi lang Tags (old or the new "{mlang}") are not filtered properly and are visible when hovering over the completion blocks or in the overview mode.
Here is the view in old Progres Bar
2016-12-12 10_17_54-course_ pt 512 servant leadership - rick justice session 4 - 2016

Here is the view with Completion Progress

2016-12-12 10_14_00-course_ pt 512 servant leadership - rick justice georgia - 2017
2016-12-12 10_14_14-course_ pt 512 servant leadership - rick justice georgia - 2017
2016-12-12 10_20_11-overview of students

Is this fixable ? Should we continue on using the Progress Bar or should we wait for an update on Completion Progress ?

Thank you very much.

Privacy API in 3.5 seems not to work

Hey,
the privacy API seems not to be working. In the pluginregistry it's still on "This plugin does not implement the Moodle privacy API."

Moodle Version: 3.5 (Build: 20180517)
Plugin Version: 2018060700

Thank you!

Default color scheme failing accessibility compliance checks

It's been brought to our attention that the default green and white color scheme used within the "What lessons have I viewed for this course?" section do not meet color contrast requirements to meet accessibility standards. The green color of the background (#73A839) has a 2.8:1 contrast ratio with the white checkmark. Users with low vision might have a difficult time determining what has been completed, so a darker shade of green should be used to meet the 3:1 minimum contrast ratio required for non-text elements. Alternately, if the checkmark was changed to opposite colors (i.e. a green checkmark on a white background) then this would also resolve the issue.
Lessons-completed-section

Progress bar missing colors/styles

Hello, on version 2020081000 the progress bars are not filling up correctly and I can see in the browser console that the associated CSS styles file css.php is not being found. I can verify the css.php file is present in the blocks/completion_progress directory. I can replicate this issue on both a 3.9.3 and a 3.10 test site.

The error is not present if I downgrade to 2020072900, all works as expected.

progress-bar-blank

Snag_40da0ef

Tool tips for instructors

In the student view of the completion bar (which is great, btw), students receive hover-based explanations of what activity each block refers to. It would be great to do this for the instructor view as well -- I've had instructors ask for the ability to better understand what is not being done.

Overview table column widths are incorrect on 3.9

Since MDL-69336 was integrated to MOODLE_39_STABLE upstream, the overview table columns are now all equal width, ignoring what is declared in the PHP code. Best would be to define the column styles in CSS and avoid the problem.

Behavior of the “selected activities” configuration changed

Since the "big sweeping code reorganisation", the behavior of the “selected activities” configuration changed:

Before: when some activities had been selected for the block, it was possible to add more activities from the course on editing the block settings.
Now the other, unselected activities are not shown any more. To see them I have to change "Activities included" to “All activities with completion set”, save and then change it again for “selected activities”.

Is this inteded behaviour? And if so: why?
As I see it, you can remove the lines 434-437 in classes/completion_progress.php completly.

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.