Coder Social home page Coder Social logo

catalyst / moodle-block_carousel Goto Github PK

View Code? Open in Web Editor NEW
3.0 25.0 2.0 754 KB

A simple, responsive and touch friendly moodle carousel block

License: GNU General Public License v3.0

PHP 27.92% JavaScript 62.38% Makefile 0.04% Ruby 0.05% CSS 1.98% Less 1.97% SCSS 2.17% HTML 3.16% Mustache 0.33%
moodle-plugin carousel moodle-block

moodle-block_carousel's Issues

Add ability to limit visibility of slides to specific cohorts.

Add cohort filtering support to the plugin.

  • Slides can have a set of cohorts selected to display that slide only to members of those cohorts.
  • The slide table on the block configuration page will have an extra column to list the cohorts selected.
  • A slide will be visible if the user is a member of at least one cohort in the list for that slide.
  • Selecting no cohorts will default to original behaviour (visible to everyone).
  • Admins will always be able to see all slides.

Restore fails when there is a carousel block instance backed up against a course with no config data set

This happens when the user adds a block but never configures it.

Which causes a similar error to this to happen.

PHP Warning:  Attempt to read property "order" on bool in /var/www/site/blocks/carousel/backup/moodle2/restore_carousel_stepslib.php on line 90
PHP Deprecated:  explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/site/blocks/carousel/backup/moodle2/restore_carousel_stepslib.php on line 90
PHP Warning:  Undefined array key "" in /var/www/site/blocks/carousel/backup/moodle2/restore_carousel_stepslib.php on line 93

Error when installing a fresh 4.1 site with MySQL and block_carousel

Exception - mysqli::real_escape_string(): Argument #1 ($string) must be of type string, array given

More information about this error

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.
Debug info:
Error code: generalexceptionmessage
Stack trace:

line 1145 of /lib/dml/mysqli_native_moodle_database.php: TypeError thrown
line 1145 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli->real_escape_string()
line 1357 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->emulate_bound_params()
line 1408 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 1318 of /lib/upgradelib.php: call to mysqli_native_moodle_database->insert_record()
line 648 of /lib/upgradelib.php: call to external_update_descriptions()
line 1108 of /lib/upgradelib.php: call to upgrade_component_updated()
line 684 of /lib/upgradelib.php: call to upgrade_plugins_blocks()
line 1967 of /lib/upgradelib.php: call to upgrade_plugins()
line 726 of /admin/index.php: call to upgrade_noncore()

SVGs not well supported even though listed in "accepted file types"

Uploading an SVG causes errors to appear as below. We've tried updating web_image to a fixed list of supported types, but this didn't work in Totara 16 and broke image uploads.

Example test using PNG
image

: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
147

Notice
: Undefined property: stdClass::$widthres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
147

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
172

Notice
: Undefined property: stdClass::$widthres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Warning
: Division by zero in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
147

Notice
: Undefined property: stdClass::$widthres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
147

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
172

Notice
: Undefined property: stdClass::$widthres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Warning
: Division by zero in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
147

Notice
: Undefined property: stdClass::$widthres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
147

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
172

Notice
: Undefined property: stdClass::$widthres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Notice
: Undefined property: stdClass::$heightres in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Warning
: Division by zero in
/var/www/site/server/blocks/carousel/block_carousel.php
on line
175

Implement slide metadata

Implement some basic metadata and display this either in the slide table, or when editing a slide.

  • Slide author
  • Date created
  • Date modified

Referencing unset values in add_slide.php

If you submit a carousel add slide form with the No Title checkbox ticked, this error occurs.

Notice: Undefined property: stdClass::$title in
/var/www/.../blocks/carousel/add_slide.php on line 136

The same happens with $text.

Version table for README

The docs could be updated to use a format similar to that for the rest of our plugins, by having a version table listing out supported versions and relevant branches that needs to be defined. Currently it's just plaintext which might be missed if skimming the docs (in search for the table)

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.