From 488afcac6a8a3ea451ec63120bc18ff1f3585529 Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Mon, 29 Sep 2014 16:50:38 -0500 Subject: [PATCH] Change directory structure and follow code convention - refs #7225 --- plugin/clockworksms/config.php | 12 +- plugin/clockworksms/index.php | 2 - plugin/clockworksms/install.php | 9 +- plugin/clockworksms/lang/english.php | 174 ++++++------ plugin/clockworksms/lang/spanish.php | 174 ++++++------ plugin/clockworksms/lib/clockworksms.lib.php | 70 ++++- .../lib/clockworksms_plugin.class.php | 35 ++- plugin/clockworksms/plugin.php | 5 + plugin/clockworksms/readme.txt | 254 +----------------- .../account_approved_connect.tpl | 2 +- ...account_created_updated_login_password.tpl | 2 +- .../answer_open_question_test_reviewed.tpl | 2 +- .../assignment_been_created_course.tpl | 2 +- .../been_invited_complete_survey_course.tpl | 2 +- .../sms_templates/been_invited_join_group.tpl | 2 +- .../sms_templates/been_subscribed_course.tpl | 2 +- .../check_email_connect_more_info.tpl | 2 +- ...course_opening_request_code_registered.tpl | 2 +- .../course_opening_request_course_code.tpl | 2 +- ...e_opening_request_course_code_approved.tpl | 2 +- .../messages_sent_edited_group_added.tpl | 2 +- .../messages_sent_edited_group_edited.tpl | 2 +- .../sms_templates/new_answer_posted_forum.tpl | 2 +- .../sms_templates/new_course_been_created.tpl | 2 +- .../new_course_suggested_teacher.tpl | 2 +- .../new_file_shared_course_by.tpl | 2 +- .../new_system_announcement_added.tpl | 2 +- .../new_thread_started_forum.tpl | 2 +- .../new_user_pending_approval.tpl | 2 +- .../new_user_subscribed_course.tpl | 2 +- .../password_updated_login_password.tpl | 2 +- .../sms_templates/posted_forum_course.tpl | 2 +- .../received_new_personal_messages.tpl | 2 +- .../reminder_assignment_course_due.tpl | 2 +- .../request_open_course_code_rejected.tpl | 2 +- .../requested_password_change.tpl | 2 +- .../sms_templates/student_answered_test.tpl | 2 +- .../student_answered_test_open_question.tpl | 2 +- .../student_answered_test_voice_question.tpl | 2 +- .../sms_templates/subscribed_session.tpl | 2 +- .../sms_templates/subscribed_session_csv.tpl | 2 +- .../system_announcement_update.tpl | 2 +- .../test_new_system_announcement_added.tpl | 2 +- .../test_system_announcement_update.tpl | 2 +- .../user_answered_inbox_message.tpl | 2 +- .../sms_templates/user_details_modified.tpl | 2 +- .../user_suggested_be_friends.tpl | 2 +- .../user_uploaded_assignment_check.tpl | 2 +- ...assignment_check_student_submits_paper.tpl | 2 +- .../user_uploaded_assignment_course.tpl | 2 +- ...ssignment_course_student_submits_paper.tpl | 2 +- .../sms_templates/welcome_login_password.tpl | 2 +- plugin/clockworksms/uninstall.php | 3 + plugin/clockworksms/{ => vendor}/changelog.md | 0 .../{lib => vendor}/clockworksms_api.php | 0 .../{lib => vendor}/exception.php | 0 plugin/clockworksms/vendor/license.txt | 14 + .../{license.txt => vendor/license.txt~} | 0 plugin/clockworksms/{ => vendor}/readme.md | 0 59 files changed, 345 insertions(+), 493 deletions(-) rename plugin/clockworksms/{ => vendor}/changelog.md (100%) rename plugin/clockworksms/{lib => vendor}/clockworksms_api.php (100%) rename plugin/clockworksms/{lib => vendor}/exception.php (100%) create mode 100644 plugin/clockworksms/vendor/license.txt rename plugin/clockworksms/{license.txt => vendor/license.txt~} (100%) rename plugin/clockworksms/{ => vendor}/readme.md (100%) diff --git a/plugin/clockworksms/config.php b/plugin/clockworksms/config.php index 64fded8ffd..52017f034b 100755 --- a/plugin/clockworksms/config.php +++ b/plugin/clockworksms/config.php @@ -1,11 +1,15 @@ + */ require_once __DIR__ . '/../../main/inc/global.inc.php'; require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; require_once 'lib/clockworksms.lib.php'; -require_once 'lib/clockworksms_api.php'; +require_once 'vendor/clockworksms_api.php'; require_once 'lib/clockworksms_plugin.class.php'; diff --git a/plugin/clockworksms/index.php b/plugin/clockworksms/index.php index 15c5adc7fa..b3d9bbc7f3 100755 --- a/plugin/clockworksms/index.php +++ b/plugin/clockworksms/index.php @@ -1,3 +1 @@ \ No newline at end of file diff --git a/plugin/clockworksms/install.php b/plugin/clockworksms/install.php index b18f4ea13a..67f058ee60 100755 --- a/plugin/clockworksms/install.php +++ b/plugin/clockworksms/install.php @@ -1,12 +1,15 @@ */ /** * Initialization */ - require_once dirname(__FILE__).'/config.php'; -ClockworksmsPlugin::create()->install(); \ No newline at end of file +ClockworksmsPlugin::create()->install(); diff --git a/plugin/clockworksms/lang/english.php b/plugin/clockworksms/lang/english.php index 88f19b209a..429c6e2820 100755 --- a/plugin/clockworksms/lang/english.php +++ b/plugin/clockworksms/lang/english.php @@ -8,95 +8,95 @@ $strings['api_key_help'] = "This is the Clockwork SMS server security key. "; $strings['type'] = "Send SMS when"; $strings['mobile_phone_number'] = "Mobile Phone (include country dialing code only)"; -$strings['MessageWelcomeXLoginXPasswordX'] = "A user is added to the platform"; -$strings['MessageXNewFileSharedCourseXByX'] = "A file is added to dropbox"; -$strings['MessageXAccountApprovedConnectX'] = "An account is approved"; -$strings['MessageXNewCourseXBeenCreatedX'] = "A new course is created"; -$strings['MessageXNewUserXSubscribedCourseX'] = "A user is subscribed to a course"; -$strings['MessageXNewCourseSuggestedTeacherX'] = "A new course is suggested"; -$strings['MessageXCourseOpeningRequestCodeXRegistered'] = "A new course opening request is registered"; -$strings['MessageXCourseOpeningRequestCourseCodeXApproved'] = "A new course opening request is approved"; -$strings['MessageXRequestOpenCourseCodeXReject'] = "A new course opening request is rejected"; -$strings['MessageXCourseOpeningRequestCourseCodeX'] = "Additional information is required for a new course opening request"; -$strings['MessageXBeenSubscribedCourseX'] = "A user is added to the course but not registered to it yet"; -$strings['MessageXAssignmentBeenCreatedCourseX'] = "Homework is created"; -$strings['MessageXAccountCreatedUpdatedLoginXPasswordX'] = "A user account is created or updated"; -$strings['MessageXPasswordUpdatedLoginXPasswordX'] = "A user password is updated"; -$strings['MessageXRequestedPasswordChange'] = "A user requests a password change"; -$strings['MessageXReceivedNewPersonalMessages'] = "New personal messages are received in user's inbox or forum"; -$strings['MessageXNewUserXPendingApproval'] = "A new user registration is pending for approval"; -$strings['MessageXXPostedForumXCourseX'] = "A user posts in forum"; -$strings['MessageXXXCheckEmailConnectMoreInfo'] = "An announcement is sent"; -$strings['MessageXXStudentXAnsweredTestX'] = "A student solves an exercise"; -$strings['MessageXXStudentXAnsweredTestXOpenQuestion'] = "A student solves an open question"; -$strings['MessageXXStudentXAnsweredTestXVoiceQuestion'] = "A student solves a voice question"; -$strings['MessageXXAnswerOpenQuestionTestXReviewed'] = "An open question answer is reviewed"; -$strings['MessageXXNewThreadXStartedForumX'] = "A new thread is started in forum"; -$strings['MessageXXNewAnswerPostedXForumX'] = "A new answer is posted in forum"; -$strings['MessageXXNewSystemAnnouncementAdded'] = "A new system announcement is added and the user does not want to send a test email"; -$strings['MessageXTestXNewSystemAnnouncementAdded'] = "A new system announcement is added and the user wants to send a test email"; -$strings['MessageXXSystemAnnouncementUpdate'] = "A new system announcement is updated and the user does not want to send a test email"; -$strings['MessageXTestXSystemAnnouncementUpdate'] = "A new system announcement is updated and the user wants to send a test email"; -$strings['MessageXUserXUploadedAssignmentXCourseXStudentSubmitsPaper'] = "An assignment is uploaded and there is no current session (this will be sent only to coaches)"; -$strings['MessageXUserXUploadedAssignmentXCheckXStudentSubmitsPaper'] = "An assignment is uploaded (this will be sent only to teachers)"; -$strings['MessageXUserXUploadedAssignmentXCourseX'] = "... and there is no current session (this will be sent only to coaches)"; -$strings['MessageXUserXUploadedAssignmentXCheckX'] = "... (this will be sent only to teachers)"; -$strings['MessageXSubscribedSessionX'] = "A session is created or updated and new users are subscribed"; -$strings['MessageXSubscribedSessionXCSV'] = "New users are subscribed to a session importing a CSV file"; -$strings['MessageXUserXSuggestedBeFriends'] = "A friendship invitation is received"; -$strings['MessageXUserXAnsweredInboxMessage'] = "A message reply is received in inbox"; -$strings['MessageXBeenInvitedJoinGroupX'] = "A group join invitation is received"; -$strings['MessageXMessagesSentEditedGroupXEdited'] = "A group topic message is updated"; -$strings['MessageXMessagesSentEditedGroupXAdded'] = "A group topic message is added"; -$strings['MessageXBeenInvitedCompleteSurveyXCourseX'] = "A new survey is created"; -$strings['MessageXReminderAssignmentXCourseXDue'] = "A reminder is sent to students who have not uploaded their assignment yet"; -$strings['MessageXUserDetailsModified'] = "User details have been updated"; +$strings['MessageWelcomeXLoginXPasswordX'] = "A user is added to the platform"; +$strings['MessageXNewFileSharedCourseXByX'] = "A file is added to dropbox"; +$strings['MessageXAccountApprovedConnectX'] = "An account is approved"; +$strings['MessageXNewCourseXBeenCreatedX'] = "A new course is created"; +$strings['MessageXNewUserXSubscribedCourseX'] = "A user is subscribed to a course"; +$strings['MessageXNewCourseSuggestedTeacherX'] = "A new course is suggested"; +$strings['MessageXCourseOpeningRequestCodeXRegistered'] = "A new course opening request is registered"; +$strings['MessageXCourseOpeningRequestCourseCodeXApproved'] = "A new course opening request is approved"; +$strings['MessageXRequestOpenCourseCodeXReject'] = "A new course opening request is rejected"; +$strings['MessageXCourseOpeningRequestCourseCodeX'] = "Additional information is required for a new course opening request"; +$strings['MessageXBeenSubscribedCourseX'] = "A user is added to the course but not registered to it yet"; +$strings['MessageXAssignmentBeenCreatedCourseX'] = "Homework is created"; +$strings['MessageXAccountCreatedUpdatedLoginXPasswordX'] = "A user account is created or updated"; +$strings['MessageXPasswordUpdatedLoginXPasswordX'] = "A user password is updated"; +$strings['MessageXRequestedPasswordChange'] = "A user requests a password change"; +$strings['MessageXReceivedNewPersonalMessages'] = "New personal messages are received in user's inbox or forum"; +$strings['MessageXNewUserXPendingApproval'] = "A new user registration is pending for approval"; +$strings['MessageXXPostedForumXCourseX'] = "A user posts in forum"; +$strings['MessageXXXCheckEmailConnectMoreInfo'] = "An announcement is sent"; +$strings['MessageXXStudentXAnsweredTestX'] = "A student solves an exercise"; +$strings['MessageXXStudentXAnsweredTestXOpenQuestion'] = "A student solves an open question"; +$strings['MessageXXStudentXAnsweredTestXVoiceQuestion'] = "A student solves a voice question"; +$strings['MessageXXAnswerOpenQuestionTestXReviewed'] = "An open question answer is reviewed"; +$strings['MessageXXNewThreadXStartedForumX'] = "A new thread is started in forum"; +$strings['MessageXXNewAnswerPostedXForumX'] = "A new answer is posted in forum"; +$strings['MessageXXNewSystemAnnouncementAdded'] = "A new system announcement is added and the user does not want to send a test email"; +$strings['MessageXTestXNewSystemAnnouncementAdded'] = "A new system announcement is added and the user wants to send a test email"; +$strings['MessageXXSystemAnnouncementUpdate'] = "A new system announcement is updated and the user does not want to send a test email"; +$strings['MessageXTestXSystemAnnouncementUpdate'] = "A new system announcement is updated and the user wants to send a test email"; +$strings['MessageXUserXUploadedAssignmentXCourseXStudentSubmitsPaper'] = "An assignment is uploaded and there is no current session (this will be sent only to coaches)"; +$strings['MessageXUserXUploadedAssignmentXCheckXStudentSubmitsPaper'] = "An assignment is uploaded (this will be sent only to teachers)"; +$strings['MessageXUserXUploadedAssignmentXCourseX'] = "... and there is no current session (this will be sent only to coaches)"; +$strings['MessageXUserXUploadedAssignmentXCheckX'] = "... (this will be sent only to teachers)"; +$strings['MessageXSubscribedSessionX'] = "A session is created or updated and new users are subscribed"; +$strings['MessageXSubscribedSessionXCSV'] = "New users are subscribed to a session importing a CSV file"; +$strings['MessageXUserXSuggestedBeFriends'] = "A friendship invitation is received"; +$strings['MessageXUserXAnsweredInboxMessage'] = "A message reply is received in inbox"; +$strings['MessageXBeenInvitedJoinGroupX'] = "A group join invitation is received"; +$strings['MessageXMessagesSentEditedGroupXEdited'] = "A group topic message is updated"; +$strings['MessageXMessagesSentEditedGroupXAdded'] = "A group topic message is added"; +$strings['MessageXBeenInvitedCompleteSurveyXCourseX'] = "A new survey is created"; +$strings['MessageXReminderAssignmentXCourseXDue'] = "A reminder is sent to students who have not uploaded their assignment yet"; +$strings['MessageXUserDetailsModified'] = "User details have been updated"; -$strings['WelcomeXLoginXPasswordX'] = "Welcome to %s. Here are your user account details: login: %s, password: %s"; -$strings['XNewFileSharedCourseXByX'] = "%s: A new file has been shared with you in course %s by %s"; -$strings['XAccountApprovedConnectX'] = "%s: Your account has been approved by an administrator. You can now connect to %s"; -$strings['XNewCourseXBeenCreatedX'] = "%s: A new course (%s) has been created by %s"; -$strings['XNewUserXSubscribedCourseX'] = "%s: A new user (%s) has just subscribed to your course (%s)"; -$strings['XNewCourseSuggestedTeacherX'] = "%s: A new course has been suggested by teacher (%s). Please connect to the admin page to review it"; -$strings['XCourseOpeningRequestCodeXRegistered'] = "%s: Your course opening request (code %s) has been registered. You will be informed when it is approved"; -$strings['XCourseOpeningRequestCourseCodeXApproved'] = "%s: Your course opening request for course code %s has been approved. Connect to your portal to use it"; -$strings['XRequestOpenCourseCodeXReject'] = "%s: We are sorry to inform you that your request to open course code %s has been rejected"; -$strings['XCourseOpeningRequestCourseCodeX'] = "%s: Your course opening request for course code %s requires more information. Check e-mail for more info"; -$strings['XBeenSubscribedCourseX'] = "%s: You have been subscribed to course %s"; -$strings['XAssignmentBeenCreatedCourseX'] = "%s: A new assignment has been created in course %s. Please connect for more info"; -$strings['XAccountCreatedUpdatedLoginXPasswordX'] = "%s: Your account has been created or updated. You can now login as %s, password: %s"; -$strings['XPasswordUpdatedLoginXPasswordX'] = "%s: Your password has been updated. You can now login as %s, password: %s"; -$strings['XRequestedPasswordChange'] = "%s: You have requested a password change. Please check your e-mail for more information"; -$strings['XReceivedNewPersonalMessages'] = "%s: You have received new personal messages in your inbox or in the forum. Please check your e-mail for more info"; -$strings['XNewUserXPendingApproval'] = "%s: A new user (%s) registration is pending your approval. Please connect to the admin panel to review"; -$strings['XXPostedForumXCourseX'] = "%s: %s just posted on forum %s in course %s"; -$strings['XXXCheckEmailConnectMoreInfo'] = "%s: %s: %s. Check your e-mail or connect for more info"; -$strings['XXStudentXAnsweredTestX'] = "%s: %s: Student %s has just answered test %s"; -$strings['XXStudentXAnsweredTestXOpenQuestion'] = "%s: %s: Student %s answered test %s's open question. Please connect to review"; -$strings['XXStudentXAnsweredTestXVoiceQuestion'] = "%s: %s: Student %s answered test %s's voice question. Please connect to review"; -$strings['XXAnswerOpenQuestionTestXReviewed'] = "%s: %s: Your answer to an open question in test %s has been reviewed"; -$strings['XXNewThreadXStartedForumX'] = "%s: %s: A new thread (%s) has been started in forum %s"; -$strings['XXNewAnswerPostedXForumX'] = "%s: %s: A new answer has been posted to (%s) in forum %s"; -$strings['XXNewSystemAnnouncementAdded'] = "%s: %s"; -$strings['XTestXNewSystemAnnouncementAdded'] = "%s (test): %s"; -$strings['XXSystemAnnouncementUpdate'] = "%s: %s (update)"; -$strings['XTestXSystemAnnouncementUpdate'] = "%s (test): %s"; -$strings['XUserXUploadedAssignmentXCourseXStudentSubmitsPaper'] = "%s: User %s uploaded assignment %s in course %s"; -$strings['XUserXUploadedAssignmentXCheckXStudentSubmitsPaper'] = "%s: User %s uploaded assignment %s. Check %s"; -$strings['XUserXUploadedAssignmentXCourseX'] = "%s: User %s uploaded assignment %s in course %s"; -$strings['XUserXUploadedAssignmentXCheckX'] = "%s: User %s uploaded assignment %s. Check %s"; -$strings['XSubscribedSessionX'] = "%s: You have been subscribed to session %s"; -$strings['XSubscribedSessionXCSV'] = "%s: You have been subscribed to session %s"; -$strings['XUserXSuggestedBeFriends'] = "%s: User %s suggested you should be friends. Check your inbox or e-mail for details"; -$strings['XUserXAnsweredInboxMessage'] = "%s: User %s just answered your Inbox message"; -$strings['XBeenInvitedJoinGroupX'] = "%s: you have been invited to join group %s. Check your Inbox for details"; -$strings['XMessagesSentEditedGroupXEdited'] = "%s: Messages sent or edited in group %s. Check your Inbox for details"; -$strings['XMessagesSentEditedGroupXAdded'] = "%s: Messages sent or edited in group %s. Check your Inbox for details"; -$strings['XBeenInvitedCompleteSurveyXCourseX'] = "%s: You have been invited to complete survey %s in course %s"; -$strings['XReminderAssignmentXCourseXDue'] = "%s: This is a simple reminder that your assignment (%s) in course %s is still due"; -$strings['XUserDetailsModified'] = "%s: Your user details have been modified. Please check your e-mail for more information"; \ No newline at end of file +$strings['WelcomeXLoginXPasswordX'] = "Welcome to %s. Here are your user account details: login: %s, password: %s"; +$strings['XNewFileSharedCourseXByX'] = "%s: A new file has been shared with you in course %s by %s"; +$strings['XAccountApprovedConnectX'] = "%s: Your account has been approved by an administrator. You can now connect to %s"; +$strings['XNewCourseXBeenCreatedX'] = "%s: A new course (%s) has been created by %s"; +$strings['XNewUserXSubscribedCourseX'] = "%s: A new user (%s) has just subscribed to your course (%s)"; +$strings['XNewCourseSuggestedTeacherX'] = "%s: A new course has been suggested by teacher (%s). Please connect to the admin page to review it"; +$strings['XCourseOpeningRequestCodeXRegistered'] = "%s: Your course opening request (code %s) has been registered. You will be informed when it is approved"; +$strings['XCourseOpeningRequestCourseCodeXApproved'] = "%s: Your course opening request for course code %s has been approved. Connect to your portal to use it"; +$strings['XRequestOpenCourseCodeXReject'] = "%s: We are sorry to inform you that your request to open course code %s has been rejected"; +$strings['XCourseOpeningRequestCourseCodeX'] = "%s: Your course opening request for course code %s requires more information. Check e-mail for more info"; +$strings['XBeenSubscribedCourseX'] = "%s: You have been subscribed to course %s"; +$strings['XAssignmentBeenCreatedCourseX'] = "%s: A new assignment has been created in course %s. Please connect for more info"; +$strings['XAccountCreatedUpdatedLoginXPasswordX'] = "%s: Your account has been created or updated. You can now login as %s, password: %s"; +$strings['XPasswordUpdatedLoginXPasswordX'] = "%s: Your password has been updated. You can now login as %s, password: %s"; +$strings['XRequestedPasswordChange'] = "%s: You have requested a password change. Please check your e-mail for more information"; +$strings['XReceivedNewPersonalMessages'] = "%s: You have received new personal messages in your inbox or in the forum. Please check your e-mail for more info"; +$strings['XNewUserXPendingApproval'] = "%s: A new user (%s) registration is pending your approval. Please connect to the admin panel to review"; +$strings['XXPostedForumXCourseX'] = "%s: %s just posted on forum %s in course %s"; +$strings['XXXCheckEmailConnectMoreInfo'] = "%s: %s: %s. Check your e-mail or connect for more info"; +$strings['XXStudentXAnsweredTestX'] = "%s: %s: Student %s has just answered test %s"; +$strings['XXStudentXAnsweredTestXOpenQuestion'] = "%s: %s: Student %s answered test %s's open question. Please connect to review"; +$strings['XXStudentXAnsweredTestXVoiceQuestion'] = "%s: %s: Student %s answered test %s's voice question. Please connect to review"; +$strings['XXAnswerOpenQuestionTestXReviewed'] = "%s: %s: Your answer to an open question in test %s has been reviewed"; +$strings['XXNewThreadXStartedForumX'] = "%s: %s: A new thread (%s) has been started in forum %s"; +$strings['XXNewAnswerPostedXForumX'] = "%s: %s: A new answer has been posted to (%s) in forum %s"; +$strings['XXNewSystemAnnouncementAdded'] = "%s: %s"; +$strings['XTestXNewSystemAnnouncementAdded'] = "%s (test): %s"; +$strings['XXSystemAnnouncementUpdate'] = "%s: %s (update)"; +$strings['XTestXSystemAnnouncementUpdate'] = "%s (test): %s"; +$strings['XUserXUploadedAssignmentXCourseXStudentSubmitsPaper'] = "%s: User %s uploaded assignment %s in course %s"; +$strings['XUserXUploadedAssignmentXCheckXStudentSubmitsPaper'] = "%s: User %s uploaded assignment %s. Check %s"; +$strings['XUserXUploadedAssignmentXCourseX'] = "%s: User %s uploaded assignment %s in course %s"; +$strings['XUserXUploadedAssignmentXCheckX'] = "%s: User %s uploaded assignment %s. Check %s"; +$strings['XSubscribedSessionX'] = "%s: You have been subscribed to session %s"; +$strings['XSubscribedSessionXCSV'] = "%s: You have been subscribed to session %s"; +$strings['XUserXSuggestedBeFriends'] = "%s: User %s suggested you should be friends. Check your inbox or e-mail for details"; +$strings['XUserXAnsweredInboxMessage'] = "%s: User %s just answered your Inbox message"; +$strings['XBeenInvitedJoinGroupX'] = "%s: you have been invited to join group %s. Check your Inbox for details"; +$strings['XMessagesSentEditedGroupXEdited'] = "%s: Messages sent or edited in group %s. Check your Inbox for details"; +$strings['XMessagesSentEditedGroupXAdded'] = "%s: Messages sent or edited in group %s. Check your Inbox for details"; +$strings['XBeenInvitedCompleteSurveyXCourseX'] = "%s: You have been invited to complete survey %s in course %s"; +$strings['XReminderAssignmentXCourseXDue'] = "%s: This is a simple reminder that your assignment (%s) in course %s is still due"; +$strings['XUserDetailsModified'] = "%s: Your user details have been modified. Please check your e-mail for more information"; diff --git a/plugin/clockworksms/lang/spanish.php b/plugin/clockworksms/lang/spanish.php index d635166a8f..9c54b68d73 100755 --- a/plugin/clockworksms/lang/spanish.php +++ b/plugin/clockworksms/lang/spanish.php @@ -1,4 +1,4 @@ - * * Clockworksms-Chamilo connector class */ @@ -18,20 +19,21 @@ class Clockworksms /** * Constructor (generates a connection to the API) - * @param string $apiKey + * @param string Clockworksms API key required to use the plugin + * @return void */ public function __construct($apiKey = null) { $plugin = ClockworksmsPlugin::create(); - $clockworksms_plugin = $plugin->get('tool_enable'); + $clockWorkSMSPlugin = $plugin->get('tool_enable'); if (empty($apiKey)) { - $clockworksmsApiKey = $plugin->get('api_key'); + $clockWorkSMSApiKey = $plugin->get('api_key'); } else { - $clockworksmsApiKey = $apiKey; + $clockWorkSMSApiKey = $apiKey; } $this->table = Database::get_main_table('user_field_values'); - if ($clockworksms_plugin == true) { - $this->apiKey = $clockworksmsApiKey; + if ($clockWorkSMSPlugin == true) { + $this->apiKey = $clockWorkSMSApiKey; // Setting Clockworksms api define('CONFIG_SECURITY_API_KEY', $this->apiKey); $trimmedApiKey = trim(CONFIG_SECURITY_API_KEY); @@ -56,15 +58,36 @@ class Clockworksms } } + /** + * getMobilePhoneNumberById (retrieves a user mobile phone number by user id) + * @param int User id + * @return int User's mobile phone number + */ private function getMobilePhoneNumberById($userId) { require_once api_get_path(LIBRARY_PATH).'extra_field.lib.php'; - $mobilePhoneNumberExtraField = (new ExtraField('user'))->get_handler_field_info_by_field_variable('mobile_phone_number'); + $mobilePhoneNumberExtraField = + (new ExtraField('user'))->get_handler_field_info_by_field_variable('mobile_phone_number'); + require_once api_get_path(LIBRARY_PATH).'extra_field_value.lib.php'; - $mobilePhoneNumberExtraFieldValue = (new ExtraFieldValue('user'))->get_values_by_handler_and_field_id($userId, $mobilePhoneNumberExtraField['id']); + $mobilePhoneNumberExtraFieldValue = + (new ExtraFieldValue('user'))->get_values_by_handler_and_field_id($userId, $mobilePhoneNumberExtraField['id']); + return $mobilePhoneNumberExtraFieldValue['field_value']; } + /** + * send (sends an SMS to the user) + * @param array Data needed to send the SMS. It is mandatory to include the + * 'smsType' and 'userId' (or 'mobilePhoneNumber') fields at least. + * More data may be neccesary depending on the message type + * Example: $additional_parameters = array( + * 'smsType' => EXAMPLE_SMS_TYPE, + * 'userId' => $userId, + * 'moreData' => $moreData + * ); + * @return void + */ public function send($additionalParameters) { $trimmedKey = trim(CONFIG_SECURITY_API_KEY); @@ -90,6 +113,15 @@ class Clockworksms } } + /** + * buildSms (builds an SMS from a template and data) + * @param object ClockworksmsPlugin object + * @param object Template object + * @param string Template file name + * @param string Text key from lang file + * @param array Data to fill message variables (if any) + * @return object Template object with message property updated + */ public function buildSms($plugin, $tpl, $templateName, $messageKey, $parameters = null) { $result = Database::select( @@ -115,6 +147,18 @@ class Clockworksms return $tpl->params['message']; } + /** + * getSms (returns an SMS message depending of its type) + * @param array Data needed to send the SMS. It is mandatory to include the + * 'smsType' and 'userId' (or 'mobilePhoneNumber') fields at least. + * More data may be neccesary depending on the message type + * Example: $additional_parameters = array( + * 'smsType' => EXAMPLE_SMS_TYPE, + * 'userId' => $userId, + * 'moreData' => $moreData + * ); + * @return string A ready to be sent SMS + */ public function getSms($additionalParameters) { $plugin = ClockworksmsPlugin::create(); diff --git a/plugin/clockworksms/lib/clockworksms_plugin.class.php b/plugin/clockworksms/lib/clockworksms_plugin.class.php index a1365a26d4..12bbacfcfb 100755 --- a/plugin/clockworksms/lib/clockworksms_plugin.class.php +++ b/plugin/clockworksms/lib/clockworksms_plugin.class.php @@ -1,6 +1,12 @@ */ class ClockworksmsPlugin extends Plugin { @@ -51,12 +57,21 @@ class ClockworksmsPlugin extends Plugin public $isCoursePlugin = true; public $isMailPlugin = true; - static function create() + /** + * create (a singleton function that ensures ClockworksmsPlugin instance is + * created only once. If it is already created, it returns the instance) + * @return object ClockworksmsPlugin instance + */ + public static function create() { static $result = null; return $result ? $result : $result = new self(); } + /** + * Constructor + * @return void + */ protected function __construct() { $fields = array('tool_enable' => 'boolean', 'api_key' => 'text'); @@ -67,6 +82,11 @@ class ClockworksmsPlugin extends Plugin parent::__construct('0.1', 'Imanol Losada', $fields); } + /** + * addMobilePhoneNumberField (adds a mobile phone number field if it is not + * already created) + * @return void + */ private function addMobilePhoneNumberField() { $result = Database::select('mobile_phone_number', 'user_field'); @@ -86,6 +106,10 @@ class ClockworksmsPlugin extends Plugin } } + /** + * getSmsTypeOptions (returns all SMS types) + * @return array SMS types + */ private function getSmsTypeOptions() { return array( @@ -135,11 +159,18 @@ class ClockworksmsPlugin extends Plugin ); } + /** + * install (installs the plugin) + * @return void + */ public function install() { $this->addMobilePhoneNumberField(); } - + /** + * install (uninstalls the plugin and removes all plugin's tables and/or rows) + * @return void + */ public function uninstall() { $tSettings = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT); diff --git a/plugin/clockworksms/plugin.php b/plugin/clockworksms/plugin.php index d67950f145..036b971844 100755 --- a/plugin/clockworksms/plugin.php +++ b/plugin/clockworksms/plugin.php @@ -1,5 +1,10 @@ + */ require_once dirname(__FILE__).'/config.php'; $plugin_info = ClockworksmsPlugin::create()->get_info(); diff --git a/plugin/clockworksms/readme.txt b/plugin/clockworksms/readme.txt index fc536fb62d..134ff5a8d1 100644 --- a/plugin/clockworksms/readme.txt +++ b/plugin/clockworksms/readme.txt @@ -1,253 +1,3 @@ -# Clockwork SMS API Wrapper for PHP +This plugin enables Chamilo to send SMS messages to Chamilo users when a notification email is sent. -This wrapper lets you interact with Clockwork without the hassle of having to create any XML or make HTTP calls. - -## What's Clockwork? - -[Clockwork][2] is Mediaburst's SMS API. - -### Prerequisites - -* A [Clockwork][2] account - -## Usage - -Require the Clockwork library: - -```php -require 'class-Clockwork.php'; -``` - -### Sending a message - -```php -$clockwork = new Clockwork( $API_KEY ); -$message = array( 'to' => '441234567891', 'message' => 'This is a test!' ); -$result = $clockwork->send( $message ); -``` - -### Sending multiple messages - -We recommend you use batch sizes of 500 messages or fewer. By limiting the batch size it prevents any timeouts when sending. - -```php -$clockwork = new Clockwork( $API_KEY ); -$messages = array( - array( 'to' => '441234567891', 'message' => 'This is a test!' ), - array( 'to' => '441234567892', 'message' => 'This is a test 2!' ) -); -$results = $clockwork->send( $messages ); -``` - -### Handling the response - -The responses come back as arrays, these contain the unique Clockwork message ID, whether the message worked (`success`), and the original SMS so you can update your database. - - Array - ( - [id] => VE_164732148 - [success] => 1 - [sms] => Array - ( - [to] => 441234567891 - [message] => This is a test! - ) - - ) - -If you send multiple SMS messages in a single send, you'll get back an array of results, one per SMS. - -The result will look something like this: - - Array - ( - [0] => Array - ( - [id] => VI_143228951 - [success] => 1 - [sms] => Array - ( - [to] => 441234567891 - [message] => This is a test! - ) - - ) - - [1] => Array - ( - [id] => VI_143228952 - [success] => 1 - [sms] => Array - ( - [to] => 441234567892 - [message] => This is a test 2! - ) - - ) - - ) - -If a message fails, the reason for failure will be set in `error_code` and `error_message`. - -For example, if you send to invalid phone number "abc": - - Array - ( - [error_code] => 10 - [error_message] => Invalid 'To' Parameter - [success] => 0 - [sms] => Array - ( - [to] => abc - [message] => This is a test! - ) - - ) - -### Checking your balance - -Check your available SMS balance: - -```php -$clockwork = new Clockwork( $API_KEY ); -$clockwork->checkBalance(); -``` - -This will return: - - Array - ( - [symbol] => £ - [balance] => 351.91 - [code] => GBP - ) - -### Handling Errors - -The Clockwork wrapper will throw a `ClockworkException` if the entire call failed. - -```php -try -{ - $clockwork = new Clockwork( 'invalid_key' ); - $message = array( 'to' => 'abc', 'message' => 'This is a test!' ); - $result = $clockwork->send( $message ); -} -catch( ClockworkException $e ) -{ - print $e->getMessage(); - // Invalid API Key -} -``` - -### Advanced Usage - -This class has a few additional features that some users may find useful, if these are not set your account defaults will be used. - -### Optional Parameters - -See the [Clockwork Documentation](http://www.clockworksms.com/doc/clever-stuff/xml-interface/send-sms/) for full details on these options. - -* $from [string] - - The from address displayed on a phone when they receive a message - -* $long [boolean] - - Enable long SMS. A standard text can contain 160 characters, a long SMS supports up to 459. - -* $truncate [nullable boolean] - - Truncate the message payload if it is too long, if this is set to false, the message will fail if it is too long. - -* $invalid_char_action [string] - - What to do if the message contains an invalid character. Possible values are - * error - Fail the message - * remove - Remove the invalid characters then send - * replace - Replace some common invalid characters such as replacing curved quotes with straight quotes - -* $ssl [boolean, default: true] - - Use SSL when making an HTTP request to the Clockwork API - - -### Setting Options - -#### Global Options - -Options set on the API object will apply to all SMS messages unless specifically overridden. - -In this example both messages will be sent from Clockwork: - -```php -$options = array( 'from' => 'Clockwork' ); -$clockwork = new Clockwork( $API_KEY, $options ); -$messages = array( - array( 'to' => '441234567891', 'message' => 'This is a test!' ), - array( 'to' => '441234567892', 'message' => 'This is a test 2!' ) -); -$results = $clockwork->send( $messages ); -``` - -#### Per-message Options - -Set option values individually on each message. - -In this example, one message will be from Clockwork and the other from 84433: - -```php -$clockwork = new Clockwork( $API_KEY, $options ); -$messages = array( - array( 'to' => '441234567891', 'message' => 'This is a test!', 'from' => 'Clockwork' ), - array( 'to' => '441234567892', 'message' => 'This is a test 2!', 'from' => '84433' ) -); -$results = $clockwork->send( $messages ); -``` - -### SSL Errors - -Due to the huge variety of PHP setups out there a small proportion of users may get PHP errors when making API calls due to their SSL configuration. - -The errors will generally look something like this: - -``` -Fatal error: -Uncaught exception 'Exception' with message 'HTTP Error calling Clockwork API -HTTP Status: 0 -cURL Erorr: SSL certificate problem, verify that the CA cert is OK. -Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed' -``` - -If you're seeing this error there are two fixes available, the first is easy, simply disable SSL on Clockwork calls. Alternatively you can setup your PHP install with the correct root certificates. - -#### Disable SSL on Clockwork calls - -```php -$options = array( 'ssl' => false ); -$clockwork = new Clockwork( $API_KEY, $options ); -``` - -#### Setup SSL root certificates on your server - -This is much more complicated as it depends on your setup, however there are many guides available online. -Try a search term like "windows php curl root certificates" or "ubuntu update root certificates". - - -# License - -This project is licensed under the ISC open-source license. - -A copy of this license can be found in license.txt. - -# Contributing - -If you have any feedback on this wrapper drop us an email to [hello@clockworksms.com][1]. - -The project is hosted on GitHub at [https://github.com/mediaburst/clockwork-php][3]. -If you would like to contribute a bug fix or improvement please fork the project -and submit a pull request. - -[1]: mailto:hello@clockworksms.com -[2]: http://www.clockworksms.com/ -[3]: https://github.com/mediaburst/clockwork-php +SMS message types (a new course is created, an account is approved and so on) can be enabled or disabled from it's plugin configuration option. \ No newline at end of file diff --git a/plugin/clockworksms/sms_templates/account_approved_connect.tpl b/plugin/clockworksms/sms_templates/account_approved_connect.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/account_approved_connect.tpl +++ b/plugin/clockworksms/sms_templates/account_approved_connect.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/account_created_updated_login_password.tpl b/plugin/clockworksms/sms_templates/account_created_updated_login_password.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/account_created_updated_login_password.tpl +++ b/plugin/clockworksms/sms_templates/account_created_updated_login_password.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/answer_open_question_test_reviewed.tpl b/plugin/clockworksms/sms_templates/answer_open_question_test_reviewed.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/answer_open_question_test_reviewed.tpl +++ b/plugin/clockworksms/sms_templates/answer_open_question_test_reviewed.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/assignment_been_created_course.tpl b/plugin/clockworksms/sms_templates/assignment_been_created_course.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/assignment_been_created_course.tpl +++ b/plugin/clockworksms/sms_templates/assignment_been_created_course.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/been_invited_complete_survey_course.tpl b/plugin/clockworksms/sms_templates/been_invited_complete_survey_course.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/been_invited_complete_survey_course.tpl +++ b/plugin/clockworksms/sms_templates/been_invited_complete_survey_course.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/been_invited_join_group.tpl b/plugin/clockworksms/sms_templates/been_invited_join_group.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/been_invited_join_group.tpl +++ b/plugin/clockworksms/sms_templates/been_invited_join_group.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/been_subscribed_course.tpl b/plugin/clockworksms/sms_templates/been_subscribed_course.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/been_subscribed_course.tpl +++ b/plugin/clockworksms/sms_templates/been_subscribed_course.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/check_email_connect_more_info.tpl b/plugin/clockworksms/sms_templates/check_email_connect_more_info.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/check_email_connect_more_info.tpl +++ b/plugin/clockworksms/sms_templates/check_email_connect_more_info.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/course_opening_request_code_registered.tpl b/plugin/clockworksms/sms_templates/course_opening_request_code_registered.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/course_opening_request_code_registered.tpl +++ b/plugin/clockworksms/sms_templates/course_opening_request_code_registered.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/course_opening_request_course_code.tpl b/plugin/clockworksms/sms_templates/course_opening_request_course_code.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/course_opening_request_course_code.tpl +++ b/plugin/clockworksms/sms_templates/course_opening_request_course_code.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/course_opening_request_course_code_approved.tpl b/plugin/clockworksms/sms_templates/course_opening_request_course_code_approved.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/course_opening_request_course_code_approved.tpl +++ b/plugin/clockworksms/sms_templates/course_opening_request_course_code_approved.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/messages_sent_edited_group_added.tpl b/plugin/clockworksms/sms_templates/messages_sent_edited_group_added.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/messages_sent_edited_group_added.tpl +++ b/plugin/clockworksms/sms_templates/messages_sent_edited_group_added.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/messages_sent_edited_group_edited.tpl b/plugin/clockworksms/sms_templates/messages_sent_edited_group_edited.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/messages_sent_edited_group_edited.tpl +++ b/plugin/clockworksms/sms_templates/messages_sent_edited_group_edited.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_answer_posted_forum.tpl b/plugin/clockworksms/sms_templates/new_answer_posted_forum.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_answer_posted_forum.tpl +++ b/plugin/clockworksms/sms_templates/new_answer_posted_forum.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_course_been_created.tpl b/plugin/clockworksms/sms_templates/new_course_been_created.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_course_been_created.tpl +++ b/plugin/clockworksms/sms_templates/new_course_been_created.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_course_suggested_teacher.tpl b/plugin/clockworksms/sms_templates/new_course_suggested_teacher.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_course_suggested_teacher.tpl +++ b/plugin/clockworksms/sms_templates/new_course_suggested_teacher.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_file_shared_course_by.tpl b/plugin/clockworksms/sms_templates/new_file_shared_course_by.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_file_shared_course_by.tpl +++ b/plugin/clockworksms/sms_templates/new_file_shared_course_by.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_system_announcement_added.tpl b/plugin/clockworksms/sms_templates/new_system_announcement_added.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_system_announcement_added.tpl +++ b/plugin/clockworksms/sms_templates/new_system_announcement_added.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_thread_started_forum.tpl b/plugin/clockworksms/sms_templates/new_thread_started_forum.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_thread_started_forum.tpl +++ b/plugin/clockworksms/sms_templates/new_thread_started_forum.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_user_pending_approval.tpl b/plugin/clockworksms/sms_templates/new_user_pending_approval.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_user_pending_approval.tpl +++ b/plugin/clockworksms/sms_templates/new_user_pending_approval.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/new_user_subscribed_course.tpl b/plugin/clockworksms/sms_templates/new_user_subscribed_course.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/new_user_subscribed_course.tpl +++ b/plugin/clockworksms/sms_templates/new_user_subscribed_course.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/password_updated_login_password.tpl b/plugin/clockworksms/sms_templates/password_updated_login_password.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/password_updated_login_password.tpl +++ b/plugin/clockworksms/sms_templates/password_updated_login_password.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/posted_forum_course.tpl b/plugin/clockworksms/sms_templates/posted_forum_course.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/posted_forum_course.tpl +++ b/plugin/clockworksms/sms_templates/posted_forum_course.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/received_new_personal_messages.tpl b/plugin/clockworksms/sms_templates/received_new_personal_messages.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/received_new_personal_messages.tpl +++ b/plugin/clockworksms/sms_templates/received_new_personal_messages.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/reminder_assignment_course_due.tpl b/plugin/clockworksms/sms_templates/reminder_assignment_course_due.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/reminder_assignment_course_due.tpl +++ b/plugin/clockworksms/sms_templates/reminder_assignment_course_due.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/request_open_course_code_rejected.tpl b/plugin/clockworksms/sms_templates/request_open_course_code_rejected.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/request_open_course_code_rejected.tpl +++ b/plugin/clockworksms/sms_templates/request_open_course_code_rejected.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/requested_password_change.tpl b/plugin/clockworksms/sms_templates/requested_password_change.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/requested_password_change.tpl +++ b/plugin/clockworksms/sms_templates/requested_password_change.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/student_answered_test.tpl b/plugin/clockworksms/sms_templates/student_answered_test.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/student_answered_test.tpl +++ b/plugin/clockworksms/sms_templates/student_answered_test.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/student_answered_test_open_question.tpl b/plugin/clockworksms/sms_templates/student_answered_test_open_question.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/student_answered_test_open_question.tpl +++ b/plugin/clockworksms/sms_templates/student_answered_test_open_question.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/student_answered_test_voice_question.tpl b/plugin/clockworksms/sms_templates/student_answered_test_voice_question.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/student_answered_test_voice_question.tpl +++ b/plugin/clockworksms/sms_templates/student_answered_test_voice_question.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/subscribed_session.tpl b/plugin/clockworksms/sms_templates/subscribed_session.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/subscribed_session.tpl +++ b/plugin/clockworksms/sms_templates/subscribed_session.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/subscribed_session_csv.tpl b/plugin/clockworksms/sms_templates/subscribed_session_csv.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/subscribed_session_csv.tpl +++ b/plugin/clockworksms/sms_templates/subscribed_session_csv.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/system_announcement_update.tpl b/plugin/clockworksms/sms_templates/system_announcement_update.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/system_announcement_update.tpl +++ b/plugin/clockworksms/sms_templates/system_announcement_update.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/test_new_system_announcement_added.tpl b/plugin/clockworksms/sms_templates/test_new_system_announcement_added.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/test_new_system_announcement_added.tpl +++ b/plugin/clockworksms/sms_templates/test_new_system_announcement_added.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/test_system_announcement_update.tpl b/plugin/clockworksms/sms_templates/test_system_announcement_update.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/test_system_announcement_update.tpl +++ b/plugin/clockworksms/sms_templates/test_system_announcement_update.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/user_answered_inbox_message.tpl b/plugin/clockworksms/sms_templates/user_answered_inbox_message.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/user_answered_inbox_message.tpl +++ b/plugin/clockworksms/sms_templates/user_answered_inbox_message.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/user_details_modified.tpl b/plugin/clockworksms/sms_templates/user_details_modified.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/user_details_modified.tpl +++ b/plugin/clockworksms/sms_templates/user_details_modified.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/user_suggested_be_friends.tpl b/plugin/clockworksms/sms_templates/user_suggested_be_friends.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/user_suggested_be_friends.tpl +++ b/plugin/clockworksms/sms_templates/user_suggested_be_friends.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/user_uploaded_assignment_check.tpl b/plugin/clockworksms/sms_templates/user_uploaded_assignment_check.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/user_uploaded_assignment_check.tpl +++ b/plugin/clockworksms/sms_templates/user_uploaded_assignment_check.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/user_uploaded_assignment_check_student_submits_paper.tpl b/plugin/clockworksms/sms_templates/user_uploaded_assignment_check_student_submits_paper.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/user_uploaded_assignment_check_student_submits_paper.tpl +++ b/plugin/clockworksms/sms_templates/user_uploaded_assignment_check_student_submits_paper.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/user_uploaded_assignment_course.tpl b/plugin/clockworksms/sms_templates/user_uploaded_assignment_course.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/user_uploaded_assignment_course.tpl +++ b/plugin/clockworksms/sms_templates/user_uploaded_assignment_course.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/user_uploaded_assignment_course_student_submits_paper.tpl b/plugin/clockworksms/sms_templates/user_uploaded_assignment_course_student_submits_paper.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/user_uploaded_assignment_course_student_submits_paper.tpl +++ b/plugin/clockworksms/sms_templates/user_uploaded_assignment_course_student_submits_paper.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/sms_templates/welcome_login_password.tpl b/plugin/clockworksms/sms_templates/welcome_login_password.tpl index 58f848b8b0..414c17f26b 100755 --- a/plugin/clockworksms/sms_templates/welcome_login_password.tpl +++ b/plugin/clockworksms/sms_templates/welcome_login_password.tpl @@ -1 +1 @@ -{{ message }} \ No newline at end of file +{{ message }} diff --git a/plugin/clockworksms/uninstall.php b/plugin/clockworksms/uninstall.php index 3dc672e5ee..04ed282951 100755 --- a/plugin/clockworksms/uninstall.php +++ b/plugin/clockworksms/uninstall.php @@ -1,10 +1,13 @@ */ /** * Queries diff --git a/plugin/clockworksms/changelog.md b/plugin/clockworksms/vendor/changelog.md similarity index 100% rename from plugin/clockworksms/changelog.md rename to plugin/clockworksms/vendor/changelog.md diff --git a/plugin/clockworksms/lib/clockworksms_api.php b/plugin/clockworksms/vendor/clockworksms_api.php similarity index 100% rename from plugin/clockworksms/lib/clockworksms_api.php rename to plugin/clockworksms/vendor/clockworksms_api.php diff --git a/plugin/clockworksms/lib/exception.php b/plugin/clockworksms/vendor/exception.php similarity index 100% rename from plugin/clockworksms/lib/exception.php rename to plugin/clockworksms/vendor/exception.php diff --git a/plugin/clockworksms/vendor/license.txt b/plugin/clockworksms/vendor/license.txt new file mode 100644 index 0000000000..041edd0c5f --- /dev/null +++ b/plugin/clockworksms/vendor/license.txt @@ -0,0 +1,14 @@ +Copyright (c) 2011 - 2012, Mediaburst Ltd + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/plugin/clockworksms/license.txt b/plugin/clockworksms/vendor/license.txt~ similarity index 100% rename from plugin/clockworksms/license.txt rename to plugin/clockworksms/vendor/license.txt~ diff --git a/plugin/clockworksms/readme.md b/plugin/clockworksms/vendor/readme.md similarity index 100% rename from plugin/clockworksms/readme.md rename to plugin/clockworksms/vendor/readme.md