Wednesday, 1 April 2026

Never Lose a Photo Again: How I Built a Tool to Organize My Amazon Photos

If you use Amazon Photos to store your pictures, you probably know how easy it is to end up with hundreds — or even thousands — of photos just sitting there, not organized in any album. That was exactly my problem.

I love taking photos. But organizing them? Not so much. Over the years I accumulated a huge collection on Amazon Photos, and most of it was just a big unsorted pile. Albums existed, but plenty of photos never made it into one.

So I built a small tool to help me fix that.

Sunday, 9 March 2025

Nodes 2: Renovation of the websites of the Àgora educational centers

 https://ithinkupc.com/en/news/nodes-2-renovation-of-the-websites-of-the-agora-educational-centers/

Thursday, 6 March 2025

Xampp: Cannot create file "C:\xampp-control.ini"

It may happen that sometimes when installing and/or using xampp on Windows without administrative permissions this message appears.

In this case, my recommendation is to gain administrative permissions for a while and do:

  1. In the directory where xampp is installed, give "full control" permissions to all users for these 2 files:
    1. xampp-control.exe
    2. xampp-control.ini
Regards!

Tuesday, 25 July 2017

Moodle: Force users to viewn default "My Moodle"

Hello,

The best option to control content of "my" section and prevent users from changing settings is:

- Add in config.php this line:

$CFG->forcedefaultmymoodle = true;

Best regards,
Iban Cardona.

Thursday, 13 July 2017

Moodle: Change course name in breadcrumb

Hello,

If you want to modify the text of the a course in the breadcrumb you can do this (tested in Moodle 3.2):

Add this function in your file lib.php of your local plugin:

function local_yourlocalplugin_extend_navigation(global_navigation $nav) {
    global $COURSE, $CFG;

    if (isset($COURSE->id) && $COURSE->id > 0) {
        $coursenode = $nav->find($COURSE->id, navigation_node::TYPE_COURSE);
        if ($coursenode) {
                $coursenode->text .= ' My extra text';
        }
    }
}

Best regards!

Monday, 15 May 2017

Moodle & PHPUnit: Capture events

Hello,

If you want to tests events in Moodle using PHPUnit, the best method is:

public function test_creationg_event() {
        $this->resetAfterTest();
        $event_sink = $this->redirectEvents();

        $course = $this->getDataGenerator()->create_course();

        $events = $event_sink->get_events();
        $event_sink->close();
        $event = $events[0];
        $this->assertInstanceOf('\core\event\course_created', $event);
}

Best regards!

Tuesday, 25 April 2017

Moodle: Block settings not shown for students

Hello,

If you want to disable (not shown) settings block for students in Moodle, you can do it changing the renderer in your theme. This code is valid only for themes not based on Boost.

Add this function in the core_renderer class of your theme:

public function block(block_contents $bc, $region) {
        global $DB;

        $idblock = isset($bc->attributes['id']) ? $bc->attributes['id'] : '';
        $arr_aux = explode('inst', $idblock);
        if (isset($arr_aux[1])) {
                $block_instance = $DB->get_record('block_instances', array('id' => $arr_aux[1]));
                $context_course = context_course::instance($this->page->course->id);
                if (isset($block_instance->blockname) && $block_instance->blockname == 'settings') {
                    if (!has_capability('moodle/grade:viewall', $context_course)) {
                        return '';
                    }
                }
        }

        return parent::block($bc, $region);
}

Best regards,
Iban Cardona.