Showing posts from July, 2022

DBD::mysql::db do failed: Unknown or incorrect time zone: 'Asia/Dhaka' at /usr/share/koha/lib/Koha/

  mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p

Drupal 7 Quiz Questions Export with Quiz title, multichoice and answer

  To get such output, just run the code in your phpmyadmin below: Select QUIZ . parent_nid , EXAM . title , SU . name AS SUBJECT , ND . NID , ND . title , FVB . Body_value , GROUP_CONCAT ( MCA . answer , ' ; ' ) AS OPTIONS , ANS . field_answer_value AS ANSWER from `node` as ND Inner join `quiz_multichoice_answers` as MCA on MCA . Question_NID = ND . NID AND MCA . question_vid = ND . VID Inner join `field_revision_body` as FVB on FVB . entity_ID = ND . NID AND FVB . revision_id = ND . VID AND FVB . Entity_type = "Node" Inner join `field_data_field_subject` AS SUB on SUB . entity_id = ND . NID AND SUB . revision_id = ND . VID Inner join `taxonomy_term_data` AS SU on SU . tid = SUB . field_subject_tid Inner join `field_data_field_answer` AS ANS on ANS . entity_id = ND . NID AND ANS . revision_id = ND . VID Inner join `quiz_node_relationship` AS QUIZ on QUIZ . child_nid = MCA . Question_NID Inner join `node` AS EX

Setup local timezone in the Koha Server with 3 commands

 Sometimes our server and local time has difference, which makes the sytem behind the current time.  To solve this we previously used ntp servers, but now timedatectl is enough.  Let's do it:  Open koha root terminal:  Enter the command below:  Command 1:  timedatectl You will get output like this: This is not the right time as I am in Dhaka, my timezone is Asia/Dhaka and local time is 11:45.17 AM which is 6 hours ahead of the server time.  Enter the command below:  Command 2:  timedatectl list-timezones Let's see the list of timezones and pickup my zone. Going to bottom after several enter till my timezone appears.  Now we got our timezone "Asia/Dhaka". Let's set it up. Command 3:   timedatectl set-timezone Asia/Dhaka Let's check the configuration:  Also check in About koha:  Enjoy! 

Koha commands to check and fix all the biblio records automagically

Prepare system first:  export PERL5LIB="/usr/share/koha/lib" export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml" Run:  /usr/share/koha/bin/maintenance/ -v Seat back and watch the output till  the end when you will see:  Touched biblio 25818 Good: 25092, Bad: 108 (of 25200) in 489 seconds Accuracy: 99.57% Average time per record: 0.019405 seconds