Deprecated: Function create_function() is deprecated in /var/www/html/blog/wp-content/plugins/add-to-any-subscribe/add-to-any-subscribe.php on line 178
PHP Category | Developer Notes

Category: PHP

PHP

BlackBoard Course Migration To Moodle

Step-by-Step guide for migrating courses from the Blackboard standard  version to moodle version > 1.9.

Black Board Categorisation :

For the purpose of course migration to Moodle, Blackboard can be categorised into 3 different systems, each with a different migration procedure.

  • CE 4.0/CE 4.1 (rebranded WebCT) [ can use the webctimport tool with the “IMS Content Migration Utility”]
  • Standard Blackboard (5.5, 6, 7, 8, 9, 9.1) [ Follow the mentioned Process in this article]
  • Vista3/Vista4/Vista8 and CE 6/CE 8 (rebranded WebCT) [ backup files are encrypted so can not import that ]

The following process tested on a standard blackboard 9.1 Q4 course export file and importing that into moodle 2.7 LTS after following below steps”

Objective  :

Migrating courses from blackboard Standard 9.1 Q4 version to Moodle 2.7, via exporting from Blackboard and importing that into Moodle.

** The reason to say moodle version > 1.9 is , all the versions utilise the moodle2 process to import and before moodle 2.0 (i.e moodle 1.9 and before) the  process was different. However “ > moodle 2.0” was supplied with an inbuilt converter, which supports but upto a limit and without any assurity.

Solution :

To achieve the target , you need to follow the below steps:

1 . Setup the Conversion Tool #step-1

2. Convert the exported BB (blackboard file) to Moodle 1.9 zip file via conversion tool #step-2

3 . Make some mentioned changes in moodle code and DB for moodle version > 1.9 #step-3

Or 

You can import it in moodle 1.9 and then upgrade moodle to 2.0 and export it to moodle 2 compatible import 

4 . Import the Converted file into Moodle version > 1.9 #step-4

Step-1 : –

Conversion Tool can be download from here or https://github.com/adamzap/reteach

or update version is available at : https://github.com/developerck/bb2moodle
Assuming that you are using linux environment.

  • Pre-requisite  : python2 and pip is installed

If not , then install python 2 and pip first, steps are –

Check for python

>>>  python --version 

If python not found : https://www.python.org/downloads/

Install pip and setup tools

>>> sudo apt-get install python-setuptools

For PIP

>>> curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

>>> python get-pip.py

Now you have installed Python and pip and I assume that you have downloaded the conversion tool zip file. Let’s say you are under the directory /var/www/html and conversion tool is present at /var/www/html/retach.zip

  • Unzip that file , the directory reteach should be created.
  • Go inside that directory , location /var/www/html/retach
  • Setup.py file will be there
  • Run following command  >>> pip install .
  • Package has been installed, you can cross check via typing reteach  >>> reteach
  • If reteach is not found than please try python reteach and try after running following command export PATH=$PATH:~/.local/bin
reatech

Step-2 : 

You just need to run this command 

>>> reteach bb-sample.zip -o moodle-file.zip

bb-sample.zip   is then name of bb course zip file name . I assume that you are currently present under the directory where bb-sample.zip is present

moodle-file.zip will be converted zip file that will be used to import in moodle.

Step-3 : –

If you are utilising moodle > 1.9, Update the following code 

Line number 1257 File: backup/converter/moodle1/handlerlib.php


// replay the upgrade step 2011060301 – Rename field defaultgrade on table question to defaultmark
$data[‘defaultmark’] = $data[‘defaultgrade’];


       // code to add for for blackboard course
        $data['generalfeedbackformat'] = '1';
        $data['createdby'] = '2'; // can be change
        $data['modifiedby'] = '2'; // can be change
// END

And run the query: ALTER TABLE `mdl_qtype_match_subquestions` CHANGE `answertext` `answertext` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

Step -4 :

  Import that moodle-file.zip into Moodle setup , and you are done.

Ref : https://docs.moodle.org/38/en/Blackboard_migration

Files To download : https://github.com/developerck/bb2moodle

If you need sample file, feel free to ask . I will share one.

How important it is to upgrade your AMP(Apache, PHP, Mysql) Stack?

Whenever we have a project/product to develop using LAMP stack, the following are the major factors in Platform stack version selection

  • Availability of software(PHP, MYSQL, APACHE)
  • Configuration/Setup of developer machines
  • Hosting server restriction
  • Skill set of employees

Let’s say you start an application today with the latest stable release of stack , then it will be outdated in a year or more as technology is updating regularly.

Q: – So the question is, is it necessary to update the product/ project or to guide your client about the required updates for that ?

My answer will be Yes.

Now you can question that do you understand the aftermath for this,

  • Upgradation requires the efforts
  • Effort includes Development effort, Testing Effort, Skillset of Resources
  • Effort create cost

So, are you sure you we should do the upgrades and guide our client for this.

I will again say , Yes.

Q: – So tell me Why it so necessary to upgrades while we can save the cost?

I will start with an example,

Think that you are a Civil Engineer, and you build the bridges. Let’s say you build a bridge, and ask yourself, is this one time job to build that bridge or owner need to maintain that half-yearly/yearly/bi-early/ so that it stay for long and secure.”

Mainly, There are two types of upgrades

  • Major :   It may require refactoring of application [Generally Call Upgrades]
  • Minor : In 90% of cases, minor updates does not break anything, that is an improvement or fixes of bugs of any software.[Generally called Updates]

So, Minor upgrades does not include a major cost, however, major upgrades may have major cost factor.

If you are concerned about the security or your application includes the payment, I will recommend that you must have your application stack up-to-date, However, My Practical experience will suggest you to do the upgrades once it is stable and you had the review/feedback from the market so that your have more visibility in advance before updating.

Q:- It may be that your application does not contain any payment information, so do you still need to update that?

Yes, it is advised to keep your application updated to keep it less vulnerable ( I am saying less as upgrades itself can’t prevent all the loopholes), To protect your user data and your valuables and it can save a lot money from ransomware or hackers.

So is this all about security ?

No this is more than security,

Up-gradation provides protection from existing loopholes, apart from that, It also helps you in optimisation the performance of your site.

Here is an example of bench marking of popular PHP framework laravel over various php version.https://dzone.com/articles/php-56-vs-php-7-performance-benchmarks-with-larave,

You can see that how much the up-gradation help in optimisation and resource utilisation that is also a cost saving for long term. So your cost of up-gradation can be covered from here while you utilise all the benefits of up gradation.

This is also not about PHP only. You must upgrade all the stack from time-time where it is OS , Apache Web server or Mysql.

Every Software has their END OF LIFE and upgrades cycle and it is different for each software. How ever One must deploy all the security and BUG Fixes patch time-time that does not require major effort and before the END OF LIFE of that software one must upgrade the software.

Following articles shows how  the cyber attacks cost the company  

Cybercrime will remain a large-scale concern for years to come. From 2019–2023E, approximately $5.2 trillion in global value will be at risk from cyberattacks, creating an ongoing challenge for corporations and investors alike https://www.weforum.org/agenda/2019/11/cost-cybercrime-cybersecurity/

Make sure to check the support from Vendor for your software.

PHP Support
  • Apache Httpd : Apache httpd 2.2 is End-of-Life since December 2017 and should not be used. Apache 2.4 should be utilised. https://httpd.apache.org/