Posts

Showing posts from May, 2017

Another way to mass-enroll students/teachers into a Moodle course (using plugin)

One day, I want to enroll more than 100 students into a Moodle course but there's no built-in feature. Then I found this amazing plugin: Plugin download URL:  https://moodle.org/plugins/local_mass_enroll 1. Download the zip file from the above link 2. In your Moodle instance, go to Site administration > Plugins > Install plugins > upload the zip file and install the plugin 3. Prepare a csv file which has the following format: email, student1@myschooldomain.com, student2@myschooldomain.com, ... Note: you can use either login (username) or idnumber 4. Go to the course you want to mass enroll students 5. Under Administration > Course administration > Users > Click Bulk enrolments and setup as following: Click Choose file and upload the csv file. CSV delimiter -> select " , " Encoding: UTF-8 Role to assign: Student First column contains: Email Address (or Login or Id number) Create group(s) if needed: No Create grouping(s) if

Moodle Installation error – Database MySQL version 5.5.31 is required and you are running 5.5.5.10.1.13

I got this error when trying to install Moodle 3.3 on a Ubuntu 16.04 server with MariaDB. Database MySQL version 5.5.31 is required and you are running 5.5.5.10.1.13 This is a workaround: Open config.php and change this: $CFG->dbtype = 'mysqli'; to $CFG->dbtype = 'mariadb';

How to remove accents from unicode characters using python

Sometimes unicode characters with accents cause you trouble (actually most of the time). You can even get rid of those characters or replace them with the base ones (without accents). Here is how to do the second method in Python: import unidecode your_text = u"Nguyễn Trọng Đăng Trình" your_non_accent_text = unidecode(your_text).encode('ascii') print your_non_accent_text Nguyen Trong Dang Trinh Reference:   https://pypi.python.org/pypi/Unidecode

Output session key of Moodle to add custom log out link

Here is how you can output the user's session key in Moodle: <?php global $USER; $sesskey = $USER->sesskey; $logout = '<a href="http://yourdomain.com/login/logout.php?sesskey='.$sesskey.'">Logout</a>'; ?> Reference:  https://moodle.org/mod/forum/discuss.php?d=166086

Terry Fox Run 2016

Image
Just want to write this down. It's my honor to be the School's Terry Fox Run coordinator last year (2016). The previous person had left without giving me any information about how to organize the event at the school so I have to start from scratch. Luckily, I was able to contact the Cancham, the main organizer of Terry Fox Run Ho Chi Minh City and they helped me a lot. I then created a spreadsheet including everything I need to do to make the event happens (volunteers, logistic, t-shirt sale, contacts, date and time...). I also made this a template and share it with the committee hoping that it can be useful for other organizations that want to join the effort. The registration and T-shirt sales went well and we met our goals. SSIS volunteers (students) are very helpful and they were really pro-active to deal with problems during the run. They made the Terry Fox Run HCMC 2016  a huge success. I was very proud of them. Terry Fox Run HCMC 2016 will be a great page in my mem

Add Back-to-Top button to your Tikiwiki

When browsing the Tikiwiki forum, I noticed the Back-to-Top button which is pretty useful and I want to bring it to my own Tikiwiki. But, the thing is there is no documentation about it so I have to look into the HTML source of the forum. It turned out that It's quite simple: 1. What you need to do first is to create a custom module: http://your-tikiwiki-url/tiki-admin_modules.php In the Custom Modules tab -> Add this to the Data text field: <div class="backtotop"><a href="#top" title="Back To Top">⌅</a></div> -> Click Save 2. Then, assign the custom module to the Bottom section: Go to Assigned Modules -> Bottom tab -> Add module -> Select your Back to Top module Make sure these parameter was set: Position: bottom Parameters: nobox=y -> Click Assign 3. Go to Look & Feel, Customization tab, add this CSS: .backtotop { bottom: 3rem; position: fixed; right: 3rem; } .backtotop a:af

How to embedded mp4 video into Tikiwiki

Hello folks, I know that you realized that Tikiwiki is a pain in the ass to make it work properly for you. But, I believe after you go through all the initial setups, everything will be good. For example, I's trying to embedded an attached mp4 video into a wiki page but I couldn't find a working manual until this morning. Here is the trick: In the Insert MediaPlayer panel, make sure you set type of the video is : video/mp4. And the wiki syntax will look like this: {mediaplayer fullscreen="true" src="tiki-download_file.php?fileId=91&display" type="video/mp4" width="100%" style="native" mediatype="video"}

Fix 100% CPU usage by w3wp.exe (IIS 7)

One of my windows servers was using 100% CPU very often. Every time it encountered that usage level, I had to restart the server. That fixed the issue at that time but then It would come back later. So after looking deeper into the problem for a while, I finally figured out what causing it and how to fix it. It's the w3wp.exe process which is the IIS worker process that eating all the CPU for some reasons. Then the workaround is to increase the number of worker per app in IIS Manager: 1.Go to Start > Control Panel > Administrative Tools > Internet Information Services (IIS) Manager. 2. Expand the view to [Server Name] > Application Pools. 3. Right click on your app pool and select Advanced Settings.... 4. Under Process Model section, set the Maximum Worker Processes... to 2 or higher. 5. Click on OK to save the settings. 6. Restart the App Pool by right clicking and select Stop then Start. 7. Make sure the session stays in all processes: - Go to Start