Code Monkey home page Code Monkey logo

moodle-mod_unilabel's People

Contributors

andreasschenkel avatar fdagner avatar germanvaleroelizondo avatar grabs avatar phmemmel avatar pm84 avatar sh-csg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moodle-mod_unilabel's Issues

incorrect function name get_unilabel_name

plugin functions are supposed to be prefixed with the plugin name - so maybe just replace this with something like:

unilabel_get_name()

(probably won't be a blocker for approval as it does use unilabel in the function name - just not in the right place.)

Conflict with mod folder ?

Hello,

We noticed that js scripts sometimes stopped working when editing content in a Carousel or a Grid.
We finally identified the cause and found that it happens in a course having an inlined folder resource (it does not happen when displaying the content in a separate page).

fwiw, we found that the error occurs in the init_tree function of mod/folder/module.js.

We are using v4.1.4 in Moodle 4.1.4+

Best regards

inputfield for title

Hi,

to create a unilabel with collapsed text, there is no chance to set the title in the first mask. Only after saving the configuration you can edit the title. Is it possible to reload the first mask after selecting the collapsed text to set the value of the title before saving the configuration? I think, it is a better workaround for users of unilabel.

Best regdards,
Tobi

Glossary entry window opens several times

Hi Andreas,

we have an interesting scenario.

A glossary entry opens two to five times in a unilable simpletext in a course with Grid format

Moodle 4.1.8
Unilabel 4.3.1 (Build: 2023121300)
unilabeltype_simpletext | 2023111600
Grid 401.2.1b 2022112607

Any idea what can cause this problem?

I checked:
No problem with lable element.
No problem if the unilable is outside the grid tile in the 0-level.
I tried to reproduce it on an other platform with same versions but could not reproduce

26-02-2024_12-51-45

missing privacy api classes in subplugins

You will need to implement the privacy class in each subplugin as well as the main core plugin. (core Moodle unit tests check for the privacy class in all plugins and subplugins.)

Restore issue

Andreas,

I want to restore an unilabel and get:

XML-bestand [tempdir]/backup//c2553b8e94a91d594f3d322cce0231e4/activities/unilabel_3439/grades.xml missing in the back-up

On two sites both Moodle 3.8

Best regards

Bert

Unilabel plugin does not work carousel for student.

Hello everything is fine? Unilabel plugin does not work carousel for student. Checking the permissions, only users and visitors can interact with the slides in the carousel (mod/unilabel:view: View unilabel). Even changing capability doesn't work. I've looked through the forums and haven't found a solution. I use version 3.11. The links are disabled. Only for the editor it works. For students the links do not work. If anyone knows the solution I would appreciate it.

Hard-coded English language strings

Hi,
I think this great plugin would be even greater if some English language strings that are currently hard-coded were changed into string variables, so that they would be available for translation in AMOS.

The strings are:

Carousel
Collapsed text
Course teaser
grid
Simple text
Topic teaser

I am sure many Spanish-speaking (and many other non-English speakers) Moodlers would prefer to have these strings available in their native language.

I hope this improvement will not be too difficult to implement :)
Thanks in advance.

consider adding travis ci support

The checks run in the moodle.org plugins db can also be run automatically here on github using the travis-ci integration.
You can see the list of current failures reported here: (you may need to be logged in to view this page)
https://moodle.org/plugins/pluginversion.php?id=17753

More information on this is here:
https://moodle.org/mod/forum/discuss.php?d=323384
Adding Travis support and fixing the reported issues will also address a number of things we would notice during a full review.

Integrating with travis is optional and will not block approval in the plugins db, but it does make the review process a bit easier and usually provides a good way to ensure future compliance with coding guidelines etc.

The link I give above gives the full details, but here's a short step-by-step to show you how easy it is to add.

grab this file:
https://github.com/moodlerooms/moodle-plugin-ci/blob/master/.travis.dist.yml
rename it as .travis.yml and put in the root of your github directory.
Go to:
https://travis-ci.org/profile/grabs
Flick the switch on the moodlenew-mod_unilabel

then on every commit you make to github it will fire off a request to travis to run the tests in .travis.yml and will give you traffic lights beside each commit and generate a report.

something else you might want to change:
in .travis.yml the default file has this line:

env:
global:

MOODLE_BRANCH=MOODLE_32_STABLE
you might want to add other branches to that list (or remove 32_STABLE because it's not supported.) so you might want to change it something like:

env:
global:

MOODLE_BRANCH=MOODLE_34_STABLE
MOODLE_BRANCH=MOODLE_35_STABLE

Problem with links under the navigation menu

When the Moodle window is small as you will have it on smartphones or tablets then a click on the boost navigation items is sent to the second layer. A click on "My Courses" does not react with the boost menu.

The screenshot shows the Boost menu and the Unilabel carousel. The picture in the Unilabel is linked to a course section. The problem comes up with and without the plugin local_boostnavigation.

boost nav and links

feature: for subplugin grid (or a new subplugin based on grid) should support a dropdown with course activitys

If a user wants to add a link to an activity in the course the user has to copy and paste the url from the browser address bar into the input field.
It would be more comfortable to select the url from a dropdown containing the course activity.
(Soon I will post a pull request.)

When you check the checkbox
image

then the input will be a dropdown with the activitys
image

and stealth or not accessible activitys will be marked
image

Missing file

Hi Andreas,
I found that I can't install the package from the Moodle plugin database.
There is no file in the folder unilabel/type/simpletext/db/
Ralf

Überprüfen mod_unilabel ... Fehler
[Fehler] Entpackte Datei nicht gefunden [{"file":"unilabel/type/simpletext/db/"}]
Installation wegen einer fehlerhaften Überprüfung abgebrochen

Bug? Unilabel-Grid with GRID-Format failed

Hello,
there is a problem when using Unilabel-grid with GRID-Format.
When students click on one of the grid-images, the text is shown correct but dark and there is no possibility to click any Button like close etc.
Before click: Bildschirmfoto vom 2020-06-16 19-30-55
After click: Bildschirmfoto vom 2020-06-16 19-29-03

Please help
Karl

Bad looking in the mobile app

Hi Andreas,
I was looking forward for your new plugin because I want to get the bootstrap carousel in the mobile app. I uploaded four pictures into the carousel.
Ralf

bb04e80e-6ed4-45f5-bf1c-3ccc1741624c

Carousel: Background color and text color of the caption

The background of the carousel is white by default, as is the font color of the caption.
This leads to problems if the images are in portrait format, adapt responsively or no images are used at all. The white color is also not so good for pictures with bright colors, for example. Of course, this can affect all colors.
What do you think of placing a semi-transparent bar behind the text?

carousel1
carousel2

error with adding new elements to the grid

Hi @ all,

unfortunately we are having some issues with lastest version of the plugin "mod_unilabel" 4.3.4 (Build: 2024012800) (2024013100).

When we are trying add an element to the grid by clicking the green button "add element" we continuously running into an error:

{"error":"Coding error detected, it must be fixed by a programmer: Invalid json in request: Syntax error","errorcode":"codingerror","stacktrace":"* line 63 of \/lib\/ajax\/service.php: coding_exception thrown\n","debuginfo":"\nError code: codingerror","reproductionlink":"https:\/\/OURMOODLEURL\/"}

It seems that the webserver expect the JSON format but instead it gets this:

<script type='text/javascript'> var attovars = new Array('Title', 'Embed with chapters', 'Embed without chapters', 'Search',); and so on.....

This issue only appear in the latest version of the plugin.

We already tried the previous version 4.1.1 (Build: 2022122400) (2022042001) and it works perfectly fine.

Does anybody else have the same issues or better does anybody know how to fix it? Or is there any possibility to downgrade the plugin to the version 4.1.1?

Our system details:
moodle Version: Moodle 4.1.9+ (Build: 20240315)
PHP Version: 8.1.27

Thanks in advance!

Best
Marco

moodle error

Overriding plugin templates through theme

I am trying to override plugin templates by putting them into the theme folder /templates/....

Moodle does not document how to override plugin templates, that reside unter a subdir in the plugin template folder like /mod/unilabel/type/carousel/templates

I tried /theme/boost/templates/mod_unilabel/carousel.mustache as well as /mod_unilabel_type_carousel/carousel.mustache or /mod_unilabel/type/carousel/carousel.mustache and other ways. Nothing seems to work.

Can you help?

Additionally a feature request: what I am trying to do is simply add a carousel-fade class to the template. It would be great to have theme options to change transition type from slide to others like fade... :)

Theme "moove"

Hello:
The moove theme does not work unilabel.
Neither with the grid format nor with the theme format.
I use moodle 3.8.3
Can you help me?
Thank you very much
Regards

Settings not stored

The settings.php file does not store default values properly.

Steps to check:

  1. install plugin
  2. configure & initialize behat
  3. vendor/bin/behat -- blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature

Expected result:
3 scenarios (3 passed)
28 steps (28 passed)

Actual result:
3 scenarios (1 passed, 2 failed)
28 steps (21 passed, 2 failed, 5 skipped)

Error screen generated:
capture_001_13032020_201757

css not specific enough.

Styles.css files are combined and cached, all mod_unilabel css changes should be very specific - ideally with something like .path-mod-unilabel (Moodle adds that to the body tag of all files loaded from /mod/unilabel/

some of your css is ok, but others look a bit concerning like this on in carousel/styles.css

.form-group.fitem.disabled {
    display:none;
}

Moodle 3.6 version ?

This plugin (2018121400) seems to work nicely in Moodle 3.6.1.
Can you mark it as available for 3.1 ?

Thanks in advance

it is better to use the table name in the api calls instead of a constant

code that "obscures" the table name being used - eg: $DB->delete_records($this->get_namespace()
make it hard to review. I'm not quite sure of the benefits you are getting by using the namespace in that field instead of specifying the actual table name? - in particular this is an issue for reviewers because the "table name" field is a vector for sql injections. Ideally it is preferred to be able to look at a SQL/db function call and see that it is not vulnerable to sql injections without having to go looking through code to see how the variable is created/used.

Wish

Very, very nice plugin!

It would be even nicer if I could use it on the dashboard!

Bert

Error with grid feature after moodle upgrade from 3.11.15 to 4.2.1

Hello,
I have a major problem with the unilabel grid feature after updating a moodle platform from moodle 3 to moodle 4.
The platform contains about 300 courses with a lot of them using your unilabel grid feature.
After the update, these grids in these 300 courses work just fine for students, but when a trainer tries to edit the content for minor changes, an error is thrown.
Interesting detail: when I create a new course, now under moodle 4 on the same platform, I can create a unilabel grid element and edit it without problems.
When I export a unilabel grid from a old course to a newly created course, I can edit the content. After reimporting the edited grid to the old course, there is the error again.

Description:
I updated my Moodle 3.11.15+ to Moodle 4.2.1+,
theme MOOVE before update version 3.11.05 2021052100, after update 4.1.1 2022112801
Before Update, the unilabel version was 3.11.5 (Build: 2022030200) ,
after update the version is 4.1.3 (Build: 2023061400)
After the update, for students everything is working fine.
But when a teacher wants to edit the content of a unilabel grid, we get an error.

Error: Object of class core_availability_multiple_messages could not be converted to string
Debug-Info: Error code: generalexceptionmessage

Stack trace:
line 78 of /var/www/vhosts/xxx.de/moodledata/localcache/mustache/1687413486/moove/__Mustache_0fd0803e601382b80f9311bdae9e9b53.php: Error thrown
line 253 of /var/www/vhosts/xxx.de/moodledata/localcache/mustache/1687413486/moove/__Mustache_0fd0803e601382b80f9311bdae9e9b53.php: call to __Mustache_0fd0803e601382b80f9311bdae9e9b53->sectionCd620e8b4e52fb39bd1750a2d1563932()
line 352 of /var/www/vhosts/xxx.de/moodledata/localcache/mustache/1687413486/moove/__Mustache_0fd0803e601382b80f9311bdae9e9b53.php: call to __Mustache_0fd0803e601382b80f9311bdae9e9b53->sectionFeec6d43fbd2e108579ce39fdb94f70f()
line 13 of /var/www/vhosts/xxx.de/moodledata/localcache/mustache/1687413486/moove/__Mustache_0fd0803e601382b80f9311bdae9e9b53.php: call to __Mustache_0fd0803e601382b80f9311bdae9e9b53->sectionE47731a573c162c0e20a77cd7be93b0c()
line 47 of /var/www/vhosts/xxx.de/moodledata/localcache/mustache/1687413486/moove/__Mustache_e55ce88c9c4f08fde36fb4ff49f05cad.php: call to __Mustache_0fd0803e601382b80f9311bdae9e9b53->renderInternal()
line 67 of /lib/mustache/src/Mustache/Template.php: call to __Mustache_e55ce88c9c4f08fde36fb4ff49f05cad->renderInternal()
line 208 of /lib/outputrenderers.php: call to Mustache_Template->render()
line 267 of /lib/outputrenderers.php: call to renderer_base->render_from_template()
line 128 of /mod/unilabel/type/grid/classes/content_type.php: call to renderer_base->render()
line 152 of /mod/unilabel/classes/edit_content_form.php: call to unilabeltype_grid\content_type->add_form_fragment()
line 80 of /mod/unilabel/classes/edit_content_form.php: call to mod_unilabel\edit_content_form->add_plugin_form_elements()
line 214 of /lib/formslib.php: call to mod_unilabel\edit_content_form->definition()
line 79 of /mod/unilabel/edit_content.php: call to moodleform->__construct()

Further actions from me:
I deleted the localcache in moodledata, still error
I changed the theme, deleted localcache in moodledata, still error
I changed the format, deleted localacache in moodledata, still error

Maybe you have an idea, how to solve this problem.
Best greetings
Wolfgang

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.