Coder Social home page Coder Social logo

totara-mod-ojt's Introduction

Totara OJT activity

See https://github.com/catalyst/totara-mod-ojt/wiki for overview and help ;)

Branches

Totara version Branch
Totara 2.6 OJT_26
Totara 2.7 OJT_27
Totara 2.9 OJT_28
Totara 9 OJT_9
Totara 10 OJT_10
Totara 11 OJT_11
Totara 12 OJT_12
Totara 13+ master

Credits

  • Contributed to the open source community through development commissioned by Customs New Zealand :)
  • Developed and maintained by the Catalyst IT Elearning team (https://catalyst.net.nz)

totara-mod-ojt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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

totara-mod-ojt's Issues

receved error when trying to install the OJT plug-in on Totara 10

I was very excited to see your OJT plug-in. It is exactly what we need for a project we support, but when we tried to install it, received as error message (see image below).
Screenshot from 2019-11-14 16-43-07

Can you please let me know if there is a version of this plug-in that work with Totara 10 and eventually 12?

Sincerely,
Malinda Brown

Capabilities setting to allow user evaluate others but not themself

Hi,

There is no combination of mod/ojt:evaluate and mod/ojt:evaluateself that would enable a user to be able to evaluate others but not evaluate themself.

The issue is with the return value of the function ojt_can_evaluate() -

function ojt_can_evaluate($userid, $context) {

Currently the return value of that function is as indicated in the truth table below (note, in the scenario under consideration, $USER->id == $userid):

ojt:evaluate ojt:evaluateself function returns
TRUE TRUE TRUE
TRUE FALSE TRUE
FALSE TRUE TRUE
FALSE FALSE FALSE

The function should return false for the combination in the second line of the above table, ie. TRUE && FALSE should return FALSE.

BTW, the next line, FALSE && TRUE, should also return FALSE, however returning TRUE as the function currently does could be justified on the premise that there may be cases (unlikely) where a user should not be able to evaluate others but be able to evaluate themself.

Checkbox spinning in IE

When you tick then untick the checkbox in IE, the unticked checkbox begins to spin. It seems that clicking the checkbox causes a loading icon to appear for a split second, presumably while some backend processing is going on. The loading icon is a circle of spinning dots using two classes: "fa-spinner" (a circle of dots) and "fa-pulse" (a class that causes the other icon to spin). When you untick the checkbox, for some reason, in IE, the "fa-pulse" class doesn't get removed once the unticked checkbox icon is loaded. This results in a spinning unticked checkbox.

Totara 11.22 and manager sign-off

Hi,

this from Totara forums "It seems that staff can fully complete themselves - even when Manager Sign Off is turned on, and the completion criteria requires all sign offs to be undertaken. "

I found the same to be true when using Totara version 11.22: the OJT activity is marked as completed without the manager approval/sign-off. Any experiences with this?

Best,
Johanna Vehkanen, Discendum, Totara partner

Support for purge and export data (Totara 11)

Hi,

On Totara 11, there are features supporting EU's GDPR, i.e. purge and export user data.
On recent Totara webinar at Q/A session there was a following mention:

Q: If a partner-created custom plugin does not have ability to export and purge the data, what need to happen?
A: Third party plugin user data needs to be exportable and purgable as well, that is up to the partner to extend the existing export/purge functionality to cover their plugins. Totara does not currently supporting 3rd party plugins.

Do you have any plans to add export & purge functionality into OJT plugin?

Best regards,
Jani / Discendum

'position_assignment' not in join list for content

In the T12 version of the plugin, if you make a report using the totara report builder with the source OJT Topic item completion and enable the option Records for user's direct reports for any of the user's job assignments (under content), the report gives an error:

'position_assignment' not in join list for content

Debug info:
Error code: joinnotinjoinlist
Stack trace:
line 475 of /lib/setuplib.php: moodle_exception thrown
line 3247 of /totara/reportbuilder/lib.php: call to print_error()
line 3222 of /totara/reportbuilder/lib.php: call to reportbuilder->get_single_join()
line 3321 of /totara/reportbuilder/lib.php: call to reportbuilder->get_joins()
line 4364 of /totara/reportbuilder/lib.php: call to reportbuilder->get_content_joins()
line 4152 of /totara/reportbuilder/lib.php: call to reportbuilder->collect_joins()
line 5034 of /totara/reportbuilder/lib.php: call to reportbuilder->build_query()
line 5020 of /totara/reportbuilder/lib.php: call to reportbuilder->get_data()
line 4890 of /totara/reportbuilder/lib.php: call to reportbuilder->get_data_for_table()
line 4697 of /totara/reportbuilder/lib.php: call to reportbuilder->display_table_default()
line 726 of /totara/reportbuilder/renderer.php: call to reportbuilder->display_table()
line 108 of /totara/reportbuilder/report.php: call to totara_reportbuilder_renderer->report_html()

I would guess that this is because there is the content option added:

new rb_content_option(
                'user',
                get_string('user', 'rb_source_ojt_topic_item_completion'),
                array(
                    'userid' => 'base.userid'
                    'managerid' => 'position_assignment.managerid',
                    'managerpath' => 'position_assignment.managerpath',
                    'postype' => 'position_assignment.type',
                ),
                'position_assignment'
            ),

But there is no 'position_assignment' in the define_joinlist

I've tried adding a rb_join to the joinlist to join the position column from mdl_ojt_topic_item , however, I do not think I am linking it correctly and I am not familiar enough with the Totara report builder to debug it easily.

Notices on student evaluating

(With debug messages on and debug messages at DEVELOPER)
When I've created a fresh OTJ with topic and items, and open the Evaluate Students and click on a student I get the following notices:
Notice: Undefined property: stdClass::$status in /var/www/html/totaralms/mod/ojt/renderer.php on line 103

Notice: Undefined property: stdClass::$status in /var/www/html/totaralms/mod/ojt/renderer.php on line 114

Notice: Undefined property: stdClass::$status in /var/www/html/totaralms/mod/ojt/renderer.php on line 136

The student being evaluated has no activity on the course, if that helps debug this.

File upload and rendering functionality issues.

A potential vulnerability exists within the plugin that allows users to upload HTML files, which then are displayed in the frontend and may contain harmful JS or XSS vulnerabilities. A whitelisting of the uploaded files is desirable, or at least some kind of HTML purification before the output.

Inability to archive completions

When a certification window opens a course, its activities are reset; however the OJT activity module is NOT reset and any exisitng topic completions, comment and uploads are kept intact.

OJT plugin doesn't work in Totara 12

Throws a bunch of deprecated warnings and then triggers an exception on
/mod/ojt/rb_sources/rb_source_ojt_completion.php
Exception - Property addeduserjoins does not exist
line 191 of /totara/reportbuilder/classes/rb_base_source.php: call to rb_base_source->finalise_bc_trait_instance()
line 81 of /mod/ojt/rb_sources/rb_source_ojt_completion.php: call to rb_base_source->__construct()

Support for T11

While testing the plugin in T11 I got the following errors/warnings:

The function ojt_print_recent_activity have being deprected since totara 11 line 234 of /blocks/recent_activity/block_recent_activity.php: call to debugging() line 74 of /blocks/recent_activity/block_recent_activity.php: call to block_recent_activity->get_modules_recent_activity() line 288 of /blocks/moodleblock.class.php: call to block_recent_activity->get_content() line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents() line 1180 of /lib/blocklib.php: call to block_base->get_content_for_output() line 1235 of /lib/blocklib.php: call to block_manager->create_block_contents() line 354 of /lib/blocklib.php: call to block_manager->ensure_content_created() line 38 of /theme/alh/layout/default.php: call to block_manager->region_has_content() line 844 of /lib/outputrenderers.php: call to include() line 774 of /lib/outputrenderers.php: call to core_renderer->render_page_layout() line 252 of /course/view.php: call to core_renderer->header()

Support for group settings, i.e. separate groups

Hi,

Here's one improvement request. Please comment if I have missed something in OJT and ask you have any questions.

According to my testings in Totara 2.9. and Totara 9.10, it seems that group settings are not supported or not fully supported in OJT plugin.

Use case example:

  • One or several OJT activities in Totara course.
  • There are 3 teams (= groups) and for each team there is a one manager who is responsible to evaluate their on-the-job learning.
  • Managers should have capability to evaluate students, but only those who are in their own team. They should not see or evaluate members of other 2 teams.

To test this:

  • Create 3 groups
  • Add learners + managers into groups
  • Set group mode in course or activity level as "Separate groups"
  • Login as a manager
  • Go to OJT > Evaluate students
  • List shows all learners, despite of group mode. It also lists manager himself/herself, even if he/she has not learner's role in that course.

Best regards
Jani Lemmetyinen / Discendum

Evaluate students page not working in Totara 13

In version 13.1 after going to OJT administration > Evaluate students an error is thrown, presumably because the embedded report doesn't have a content class.

Error info below:

Content class \totara_reportbuilder\rb\content\ojt_completion_type does not exist

Debug info:
Error code: contentclassnotexist
Stack trace:
line 494 of /lib/setuplib.php: moodle_exception thrown
line 3133 of /totara/reportbuilder/lib.php: call to print_error()
line 4467 of /totara/reportbuilder/lib.php: call to reportbuilder->get_content_restrictions()
line 4240 of /totara/reportbuilder/lib.php: call to reportbuilder->collect_restrictions()
line 5043 of /totara/reportbuilder/lib.php: call to reportbuilder->build_query()
line 5030 of /totara/reportbuilder/lib.php: call to reportbuilder->get_data()
line 4933 of /totara/reportbuilder/lib.php: call to reportbuilder->get_data_for_table()
line 94 of /mod/ojt/report.php: call to reportbuilder->display_table()

Restrict upload by file types

Not exactly an issue, but rather a suggestion, related to this issue. How about we disallow HTML/JS for upload completely? I can't see any compelling reason for them to be there in the first place.

I'm proposing something like this for mod/ojt/uploadfile.php:

$fileoptions['accepted_types'] = array( 'video', 'audio', 'archive', 'spreadsheet', 'presentation', 'document', 'image', );

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.