Index: lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20180525.sql (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,35 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE lams_comment MODIFY body MEDIUMTEXT; +ALTER TABLE lams_competence MODIFY description MEDIUMTEXT; +ALTER TABLE lams_email_notification_archive MODIFY body MEDIUMTEXT; +ALTER TABLE lams_ext_server_org_map MODIFY serverdesc MEDIUMTEXT; +ALTER TABLE lams_gradebook_user_activity MODIFY feedback MEDIUMTEXT; +ALTER TABLE lams_gradebook_user_activity_archive MODIFY feedback MEDIUMTEXT; +ALTER TABLE lams_gradebook_user_lesson_archive MODIFY feedback MEDIUMTEXT; +ALTER TABLE lams_learning_activity MODIFY description MEDIUMTEXT; +ALTER TABLE lams_learning_activity MODIFY options_instructions MEDIUMTEXT; +ALTER TABLE lams_learning_design MODIFY description MEDIUMTEXT; +ALTER TABLE lams_learning_design MODIFY help_text MEDIUMTEXT; +ALTER TABLE lams_learning_design MODIFY license_TEXT MEDIUMTEXT; +ALTER TABLE lams_learning_library MODIFY description MEDIUMTEXT; +ALTER TABLE lams_learning_transition MODIFY description MEDIUMTEXT; +ALTER TABLE lams_lesson MODIFY description MEDIUMTEXT; +ALTER TABLE lams_notebook_entry MODIFY entry MEDIUMTEXT; +ALTER TABLE lams_notification_event MODIFY message MEDIUMTEXT; +ALTER TABLE lams_notification_subscription MODIFY last_operation_message MEDIUMTEXT; +ALTER TABLE lams_organisation MODIFY description MEDIUMTEXT; +ALTER TABLE lams_planner_nodes MODIFY brief_desc MEDIUMTEXT; +ALTER TABLE lams_planner_nodes MODIFY full_desc MEDIUMTEXT; +ALTER TABLE lams_rating_comment MODIFY comment MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,26 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_laasse10_assessment MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment_overall_feedback MODIFY feedback MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment_question MODIFY question MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment_question MODIFY general_feedback MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment_question MODIFY feedback MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment_question MODIFY feedback_on_correct MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment_question MODIFY feedback_on_partially_correct MEDIUMTEXT; +ALTER TABLE tl_laasse10_assessment_question MODIFY feedback_on_incorrect MEDIUMTEXT; +ALTER TABLE tl_laasse10_question_option MODIFY question MEDIUMTEXT; +ALTER TABLE tl_laasse10_question_option MODIFY option_string MEDIUMTEXT; +ALTER TABLE tl_laasse10_question_option MODIFY feedback MEDIUMTEXT; +ALTER TABLE tl_laasse10_question_result MODIFY answer_string MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,17 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_ladaco10_answers MODIFY answer MEDIUMTEXT; +ALTER TABLE tl_ladaco10_contents MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_ladaco10_contents MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_ladaco10_questions MODIFY description MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_doku/src/java/org/lamsfoundation/lams/tool/dokumaran/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,15 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_ladoku11_dokumaran MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_ladoku11_dokumaran MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,17 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lafrum11_forum MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_lafrum11_forum MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_lafrum11_message MODIFY body MEDIUMTEXT; +ALTER TABLE tl_lafrum11_report MODIFY comment MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,16 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_laimag10_imagegallery MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_laimag10_imagegallery MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_laimag10_imagegallery_item MODIFY description MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,15 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_laimsc11_commoncartridge MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_laimsc11_commoncartridge MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_kaltura/src/java/org/lamsfoundation/lams/tool/kaltura/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,16 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lakalt11_comment MODIFY comment MEDIUMTEXT; +ALTER TABLE tl_lakalt11_kaltura MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_lakalt11_kaltura MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,18 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lamc11_content MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_lamc11_content MODIFY reflectionSubject MEDIUMTEXT; +ALTER TABLE tl_lamc11_options_content MODIFY mc_que_option_text MEDIUMTEXT; + +ALTER TABLE tl_lamc11_que_content MODIFY question MEDIUMTEXT; +ALTER TABLE tl_lamc11_que_content MODIFY feedback MEDIUMTEXT; +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,19 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_laqa11_content MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_laqa11_content MODIFY reflectionSubject MEDIUMTEXT; +ALTER TABLE tl_laqa11_que_content MODIFY question MEDIUMTEXT; +ALTER TABLE tl_laqa11_que_content MODIFY feedback MEDIUMTEXT; +ALTER TABLE tl_laqa11_usr_resp MODIFY answer MEDIUMTEXT; +ALTER TABLE tl_laqa11_usr_resp MODIFY answer_autosaved MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,16 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_larsrc11_item_instruction MODIFY description MEDIUMTEXT; +ALTER TABLE tl_larsrc11_resource MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_larsrc11_resource MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,15 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lanb11_content MODIFY content MEDIUMTEXT; +ALTER TABLE tl_lanb11_content MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,15 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_laprev11_peerreview MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_laprev11_peerreview MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,17 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lasbmt11_content MODIFY instruction MEDIUMTEXT; +ALTER TABLE tl_lasbmt11_content MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_lasbmt11_report MODIFY comments MEDIUMTEXT; +ALTER TABLE tl_lasbmt11_submission_details MODIFY fileDescription MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,17 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lascrt11_scratchie MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_lascrt11_scratchie MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_lascrt11_scratchie_answer MODIFY description MEDIUMTEXT; +ALTER TABLE tl_lascrt11_scratchie_item MODIFY description MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,16 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lasprd10_spreadsheet MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_lasprd10_spreadsheet MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_lasprd10_spreadsheet_mark MODIFY comments MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,18 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lasurv11_question MODIFY description MEDIUMTEXT; +ALTER TABLE tl_lasurv11_answer MODIFY answer_text MEDIUMTEXT; +ALTER TABLE tl_lasurv11_option MODIFY description MEDIUMTEXT; +ALTER TABLE tl_lasurv11_survey MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_lasurv11_survey MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/dto/AnswerDTO.java =================================================================== diff -u -r5773f84ed608838de3521ecde87c52f3c72d478c -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/dto/AnswerDTO.java (.../AnswerDTO.java) (revision 5773f84ed608838de3521ecde87c52f3c72d478c) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/dto/AnswerDTO.java (.../AnswerDTO.java) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -27,7 +27,6 @@ import java.util.TreeSet; import org.apache.commons.beanutils.PropertyUtils; -import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.lamsfoundation.lams.tool.survey.model.SurveyAnswer; import org.lamsfoundation.lams.tool.survey.model.SurveyOption; @@ -37,8 +36,7 @@ public class AnswerDTO extends SurveyQuestion { - private static final int SHORT_TITLE_LENGTH = 60; - + // *********************************************** // DTO fields: // this is DTO field. For answer, which is user and session level. For question, which is content level. @@ -73,9 +71,7 @@ this.setOptions(newOptions); } - String desc = this.getDescription(); - desc = desc.replaceAll("<(.|\n)*?>", ""); - this.setShortTitle(StringUtils.abbreviate(desc, SHORT_TITLE_LENGTH)); + this.updateShortTitleFromDescription(); } Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/model/SurveyQuestion.java =================================================================== diff -u -r2f725f8ef2aa09a2663b2335bf67213074426d11 -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/model/SurveyQuestion.java (.../SurveyQuestion.java) (revision 2f725f8ef2aa09a2663b2335bf67213074426d11) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/model/SurveyQuestion.java (.../SurveyQuestion.java) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -28,7 +28,9 @@ import java.util.Iterator; import java.util.Set; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; +import org.lamsfoundation.lams.tool.survey.util.SurveyWebUtils; /** * Survey @@ -40,6 +42,7 @@ */ public class SurveyQuestion implements Cloneable { private static final Logger log = Logger.getLogger(SurveyQuestion.class); + private static final int SHORT_TITLE_LENGTH = 60; private Long uid; @@ -230,4 +233,11 @@ this.shortTitle = shortTitle; } + /** Set the short title from the current description but strip HTML and shorten to SHORT_TITLE_LENGTH characters. */ + public void updateShortTitleFromDescription() { + // strip all images first in case they are base64 otherwise the next step causes a stack overflow + // then strip out any other HTML tags + String newInput = SurveyWebUtils.removeHTMLTags(this.description); + this.shortTitle = StringUtils.abbreviate(newInput, SHORT_TITLE_LENGTH); + } } Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/util/SurveyWebUtils.java =================================================================== diff -u -r2f725f8ef2aa09a2663b2335bf67213074426d11 -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/util/SurveyWebUtils.java (.../SurveyWebUtils.java) (revision 2f725f8ef2aa09a2663b2335bf67213074426d11) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/util/SurveyWebUtils.java (.../SurveyWebUtils.java) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -70,4 +70,14 @@ return choiceList.split("&"); } + + /** Remove the html tags from the input string. Used for authoring, learning, monitoring and export! */ + public static String removeHTMLTags(String input) { + // strip all images first in case they are base64 otherwise the next step causes a stack overflow + // then strip out any other HTML tags + return input.replaceAll("","") + .replaceAll("<(.|\n)*?>", "") + .replaceAll(" ", " ") + .replaceAll("[\r\n][\r\n]+", "\n"); + } } Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/AuthoringAction.java =================================================================== diff -u -r2abc3485dc2d24ea02044a64271f3ee0d3b8c11b -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 2abc3485dc2d24ea02044a64271f3ee0d3b8c11b) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -801,7 +801,7 @@ item.setAllowMultipleAnswer(itemForm.getQuestion().isAllowMultipleAnswer()); } - AuthoringAction.retriveQuestionForDisplay(item); + item.updateShortTitleFromDescription(); short type = getQuestionType(itemForm); item.setType(type); @@ -833,16 +833,10 @@ private void retriveQuestionListForDisplay(List list) { for (SurveyQuestion item : list) { - AuthoringAction.retriveQuestionForDisplay(item); + item.updateShortTitleFromDescription(); } } - public static void retriveQuestionForDisplay(SurveyQuestion item) { - String desc = item.getDescription(); - desc = desc.replaceAll("<(.|\n)*?>", ""); - item.setShortTitle(StringUtils.abbreviate(desc, AuthoringAction.SHORT_TITLE_LENGTH)); - } - /** * Vaidate survey item regards to their type (url/file/learning object/website zip file) * Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/MonitoringAction.java =================================================================== diff -u -reeb8faaea5372ccf5445d7172f726931e9f26098 -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision eeb8faaea5372ccf5445d7172f726931e9f26098) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -370,12 +370,12 @@ // survey title row = sheet.createRow(idx++); cell = row.createCell(0); - cell.setCellValue(removeHTMLTags(survey.getTitle())); + cell.setCellValue(SurveyWebUtils.removeHTMLTags(survey.getTitle())); // survey instruction row = sheet.createRow(idx++); cell = row.createCell(0); - cell.setCellValue(removeHTMLTags(survey.getInstructions())); + cell.setCellValue(SurveyWebUtils.removeHTMLTags(survey.getInstructions())); // display 2 empty row row = sheet.createRow(idx++); @@ -390,7 +390,7 @@ cell = row.createCell(0); cell.setCellValue(resource.getMessage(MonitoringAction.MSG_LABEL_SESSION_NAME)); cell = row.createCell(1); - cell.setCellValue(removeHTMLTags(session.getSessionName())); + cell.setCellValue(SurveyWebUtils.removeHTMLTags(session.getSessionName())); // begin to display question and its answers Set>> questionEntries = map.entrySet(); @@ -410,7 +410,7 @@ cell = row.createCell(0); cell.setCellValue(resource.getMessage(MonitoringAction.MSG_LABEL_QUESTION) + " " + questionIdx); cell = row.createCell(1); - cell.setCellValue(removeHTMLTags(question.getDescription())); + cell.setCellValue(SurveyWebUtils.removeHTMLTags(question.getDescription())); // display options content Set options = question.getOptions(); @@ -426,7 +426,7 @@ cell = row.createCell(0); cell.setCellValue(SurveyConstants.OPTION_SHORT_HEADER + optionIdx); cell = row.createCell(1); - cell.setCellValue(removeHTMLTags(option.getDescription())); + cell.setCellValue(SurveyWebUtils.removeHTMLTags(option.getDescription())); } if (question.isAppendText() || question.getType() == SurveyConstants.QUESTION_TYPE_TEXT_ENTRY) { optionIdx++; @@ -500,7 +500,7 @@ if (question.isAppendText() || question.getType() == SurveyConstants.QUESTION_TYPE_TEXT_ENTRY) { cell = row.createCell(++cellIdx); if (answer.getAnswer() != null) { - cell.setCellValue(removeHTMLTags(answer.getAnswer().getAnswerText())); + cell.setCellValue(SurveyWebUtils.removeHTMLTags(answer.getAnswer().getAnswerText())); } } @@ -574,16 +574,6 @@ return null; } - /** - * Removes all the html tags from a string - * - * @param string - * @return - */ - private String removeHTMLTags(String string) { - return string.replaceAll("\\<.*?>", "").replaceAll(" ", " "); - } - // ************************************************************************************* // Private method // ************************************************************************************* Index: lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,17 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_latask10_item_comment MODIFY comment MEDIUMTEXT; +ALTER TABLE tl_latask10_tasklist MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_latask10_tasklist MODIFY reflect_instructions MEDIUMTEXT; +ALTER TABLE tl_latask10_tasklist_item MODIFY description MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_task/web/pages/authoring/basic.jsp =================================================================== diff -u -rf4d9fb8cc51c25fecdd0eac1dcf5f5efc916cdf8 -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_task/web/pages/authoring/basic.jsp (.../basic.jsp) (revision f4d9fb8cc51c25fecdd0eac1dcf5f5efc916cdf8) +++ lams_tool_task/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -75,10 +75,14 @@ function submitTask(){ refreshCKEditors(); var form = $('#taskListItemForm'); - $('#resourceInputArea').load( - form.attr('action'), - form.serialize() - ); + $.ajax({ + data: form.serialize(), + type: form.attr('method'), + url: form.attr('action'), + success: function(data) { + $('#resourceInputArea').html(data); + } + }); } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,16 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lavote11_content MODIFY instructions MEDIUMTEXT; +ALTER TABLE tl_lavote11_content MODIFY reflectionSubject MEDIUMTEXT; +ALTER TABLE tl_lavote11_nomination_content MODIFY nomination MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_vote/web/learning/AllNominations.jsp =================================================================== diff -u -reeb8faaea5372ccf5445d7172f726931e9f26098 -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_vote/web/learning/AllNominations.jsp (.../AllNominations.jsp) (revision eeb8faaea5372ccf5445d7172f726931e9f26098) +++ lams_tool_vote/web/learning/AllNominations.jsp (.../AllNominations.jsp) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -177,7 +177,7 @@
- +
Index: lams_tool_vote/web/learning/RevisitedDisplay.jsp =================================================================== diff -u -reeb8faaea5372ccf5445d7172f726931e9f26098 -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_vote/web/learning/RevisitedDisplay.jsp (.../RevisitedDisplay.jsp) (revision eeb8faaea5372ccf5445d7172f726931e9f26098) +++ lams_tool_vote/web/learning/RevisitedDisplay.jsp (.../RevisitedDisplay.jsp) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -124,7 +124,7 @@
- +
Index: lams_tool_vote/web/learning/RevisitedNoDisplay.jsp =================================================================== diff -u -reeb8faaea5372ccf5445d7172f726931e9f26098 -r0138aabe01dc8f301e7c727bd39e97424b4fa38a --- lams_tool_vote/web/learning/RevisitedNoDisplay.jsp (.../RevisitedNoDisplay.jsp) (revision eeb8faaea5372ccf5445d7172f726931e9f26098) +++ lams_tool_vote/web/learning/RevisitedNoDisplay.jsp (.../RevisitedNoDisplay.jsp) (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -20,7 +20,7 @@
- +
Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/dbupdates/patch20180525.sql =================================================================== diff -u --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/dbupdates/patch20180525.sql (revision 0) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/dbupdates/patch20180525.sql (revision 0138aabe01dc8f301e7c727bd39e97424b4fa38a) @@ -0,0 +1,15 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4558 Increase db text size for all user inputs +ALTER TABLE tl_lanb11_content MODIFY content MEDIUMTEXT; +ALTER TABLE tl_lanb11_content MODIFY reflect_instructions MEDIUMTEXT; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file