Coder Social home page Coder Social logo

omer-ilhan / moodle-block_files Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 156 KB

Block plugin for moodle which shows recent files and folders from all enrolled courses

Home Page: https://moodle.org/plugins/view/block_files

PHP 98.52% CSS 1.48%

moodle-block_files's People

Contributors

omer-ilhan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

actxc

moodle-block_files's Issues

$PAGE->context not set in viewall.php

As the debugging message says

Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result
line 453 of /lib/pagelib.php: call to debugging()
line 768 of /lib/pagelib.php: call to moodle_page->magic_get_context()
line 1381 of /lib/weblib.php: call to moodle_page->__get()
line 1148 of /lib/pagelib.php: call to format_string()
line 41 of /blocks/files/viewall.php: call to moodle_page->set_heading()

Please make sure to have developer debugging enabled when working on
Moodle plugins

Can not find data record in database table course

Severe Error when the resource behind a pinned item is deleted.

Notice: Trying to get property of non-object in /var/www/html/blocks/files/block_files.php on line 242

Debug info: SELECT * FROM {course} WHERE id IS NULL
[array (
)]
Error code: invalidrecord
Stack trace:
line 1451 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1427 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 588 of /lib/datalib.php: call to moodle_database->get_record()
line 243 of /blocks/files/block_files.php: call to get_course()
line 93 of /blocks/files/block_files.php: call to block_files->get_pinned_file_items()
line 288 of /blocks/moodleblock.class.php: call to block_files->get_content()
line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 971 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1023 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 392 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
line 39 of /theme/isis_theme/layout/columns3.php: call to core_renderer->standard_head_html()
line 915 of /lib/outputrenderers.php: call to include()
line 845 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 172 of /my/index.php: call to core_renderer->header()

Throws suspicious PHP notice

I have added the block instance to the users' dashboard page in Moodle 2.9. When the user attempts to see their dashboard, the following message is raised.

Notice: Undefined property: stdClass::$format in .../course/format/lib.php on line 176
Format plugin format_ is not found. Using default format_weeks
line 123 of /course/format/lib.php: call to debugging()
line 184 of /course/format/lib.php: call to format_base::get_format_or_default()
line 35 of /course/format/lib.php: call to format_base::instance()
line 3391 of /course/lib.php: call to course_get_format()
line 261 of /blocks/files/block_files.php: call to course_get_url()
line 298 of /blocks/files/block_files.php: call to block_files->get_file_items()
line 94 of /blocks/files/block_files.php: call to block_files->get_recent_file_items()
line 288 of /blocks/moodleblock.class.php: call to block_files->get_content()
line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 973 of /lib/blocklib.php: call to block_base->get_content_for_output()
line 1025 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 473 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
line 52 of /theme/clean/layout/columns3.php: call to core_renderer->standard_head_html()
line 1015 of /lib/outputrenderers.php: call to include()
line 945 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 164 of /my/index.php: call to core_renderer->header()

Not quite clear description of the plugin in the plugins directory

The plugin's page at https://moodle.org/plugins/view/block_files sort of suggests that the block would display any "most recently uploaded or modified files and folders". I only learnt from the code that this actually refers to the "File" and "Folder" resources added into courses.

Initially I had impression the block would show files from other areas such as attachments to forum posts or media embedded to texts etc.

Let me suggest to state it more clearly at the plugin page and the README file that the block displays recently added contents from the "File" (mod_resource) and "Folder" (mod_folder) course resources only.

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.