@Override
 protected void onPostExecute(Boolean result) {
   if (!result)
     Toast.makeText(
             CourseContentsActivity.this,
             "Message sending failed. Error: " + mrm.getError(),
             Toast.LENGTH_LONG)
         .show();
   else Toast.makeText(CourseContentsActivity.this, "Message sent!", Toast.LENGTH_SHORT).show();
 }
 @Override
 protected Boolean doInBackground(String... params) {
   mrm = new MoodleRestMessage(mUrl, token);
   Message mMessage = new Message(userid, message + "\n" + "Sent from Mobile OurVLE");
   return mrm.sendMessage(mMessage);
 }