Developers notebook

Category: Programing (page 2 of 5)

Find where Moodle 2+ has put your file

When you upload a file to a course it get assigned a hashvalue and stored in the /moodledata/filedir directory

To find out where, search the moodle database for the filename:

SELECT contenthash FROM mdl_files WHERE filename = ‘myfile.doc’;

This will return something like fb9d09535c7fce57abaa6f8a264137c39bea923b

Navigate to your moodledata/filedir and search for the hash:

find . -name fb9d09535c7fce57abaa6f8a264137c39bea923b

Take a copy, restoring the original name:

cp fb9d09535c7fce57abaa6f8a264137c39bea923b myfile.doc

Keep flash object behind other elements

<param name=”wmode” value=”transparent”>


Fork me on github

Found this CSS “Fork me on github” ribbon,

Bread crumb trail helper for codeigniter

Found this super simple Bread Crumb trail helper for codeigniter

Add an admin user to the wordpress database MySQL

INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Syed Balkhi', '', '', '2011-06-07 00:00:00', '', '0', 'Syed Balkhi');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');

Orignal source

Android jump to bottom of scroll view onClick

In your activity define a method.  In this example “scroll” is the id of the scroll view.  Then set your button onClick attribute to JumpToEnd.

public void JumpToEnd(View V){

ScrollView sv = (ScrollView)findViewById(;

sv.scrollTo(0, sv.getBottom());


Moodle 2.3 is here

Moodle iLP2.0 developer documentation

Collaborative notebook of discoveries so far in the ULCC iLP 2.0 Moodle block.

mod_rewrite on SuSe

edit /etc/sysconfig/apache2

Add rewrite inside the speech marks for APACHE_MODULES=”rewrite, other modules…”

edit /etc/apache2/default-server.conf

Change AllowOverride None to AllowOverride All

apache2ctl restart


Create a new MySQL user

CREATE USER ‘user1’@’localhost’ IDENTIFIED BY ‘pass1’;



« Older posts Newer posts »

© 2022

Theme by Anders NorénUp ↑