diff --git a/SWADroid/res/values/strings.xml b/SWADroid/res/values/strings.xml index db4f574c..b01eaa05 100644 --- a/SWADroid/res/values/strings.xml +++ b/SWADroid/res/values/strings.xml @@ -326,8 +326,18 @@ Geographic coordinates Phone number SMS address - Information - Introduction + + + Information + Introduction + FAQs + Links + Bibliography + Practices Program + Theory Program + Teaching Guide + + Introduction Plain text Last synchronization diff --git a/SWADroid/src/es/ugr/swad/swadroid/Constants.java b/SWADroid/src/es/ugr/swad/swadroid/Constants.java index 88c3e78d..2afb9161 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/Constants.java +++ b/SWADroid/src/es/ugr/swad/swadroid/Constants.java @@ -219,10 +219,50 @@ public class Constants { + /** + * Request code for Information + */ + public static final int INFORMATION_REQUEST_CODE = 27; + /** * Request code for Introduction */ - public static final int INTRODUCTION_REQUEST_CODE = 27; + public static final int INTRODUCTION_REQUEST_CODE = 28; + + /** + * Request code for FAQs + */ + public static final int FAQS_REQUEST_CODE = 29; + + /** + * Request code for Bibliography + */ + public static final int BIBLIOGRAPHY_REQUEST_CODE = 30; + + /** + * Request code for Practices Program + */ + public static final int PRACTICESPROGRAM_REQUEST_CODE = 31; + + /** + * Request code for Theory Program + */ + public static final int THEORYPROGRAM_REQUEST_CODE = 32; + + /** + * Request code for Links + */ + public static final int LINKS_REQUEST_CODE = 33; + + /** + * Request code for Teaching Guide + */ + public static final int TEACHINGGUIDE_REQUEST_CODE = 34; + + + + + diff --git a/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java b/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java index bc85c5c0..02b160ef 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java +++ b/SWADroid/src/es/ugr/swad/swadroid/SWADMain.java @@ -60,7 +60,7 @@ import es.ugr.swad.swadroid.modules.Messages; import es.ugr.swad.swadroid.modules.Notices; import es.ugr.swad.swadroid.modules.downloads.DownloadsManager; import es.ugr.swad.swadroid.modules.groups.MyGroupsManager; -import es.ugr.swad.swadroid.modules.information.Introduction; +import es.ugr.swad.swadroid.modules.information.Information; import es.ugr.swad.swadroid.modules.notifications.Notifications; import es.ugr.swad.swadroid.modules.rollcall.Rollcall; import es.ugr.swad.swadroid.modules.tests.Tests; @@ -225,9 +225,34 @@ public class SWADMain extends MenuExpandableListActivity { } else if (keyword.equals(getString(R.string.introductionModuleLabel))) { - activity = new Intent(getBaseContext(), Introduction.class); - startActivityForResult(activity, Constants.INTRODUCTION_REQUEST_CODE); - } + activity = new Intent(getBaseContext(), Information.class); + activity.putExtra("requestCode", Constants.INTRODUCTION_REQUEST_CODE); + startActivityForResult(activity, Constants.INTRODUCTION_REQUEST_CODE); + } else if (keyword.equals(getString(R.string.faqsModuleLabel))) { + activity = new Intent(getBaseContext(), Information.class); + activity.putExtra("requestCode", Constants.FAQS_REQUEST_CODE); + startActivityForResult(activity, Constants.FAQS_REQUEST_CODE); + } else if (keyword.equals(getString(R.string.bibliographyModuleLabel))) { + activity = new Intent(getBaseContext(), Information.class); + activity.putExtra("requestCode", Constants.BIBLIOGRAPHY_REQUEST_CODE); + startActivityForResult(activity, Constants.BIBLIOGRAPHY_REQUEST_CODE); + } else if (keyword.equals(getString(R.string.practicesprogramModuleLabel))) { + activity = new Intent(getBaseContext(), Information.class); + activity.putExtra("requestCode", Constants.PRACTICESPROGRAM_REQUEST_CODE); + startActivityForResult(activity, Constants.PRACTICESPROGRAM_REQUEST_CODE); + } else if (keyword.equals(getString(R.string.theoryprogramModuleLabel))) { + activity = new Intent(getBaseContext(), Information.class); + activity.putExtra("requestCode", Constants.THEORYPROGRAM_REQUEST_CODE); + startActivityForResult(activity, Constants.THEORYPROGRAM_REQUEST_CODE); + } else if (keyword.equals(getString(R.string.linksModuleLabel))) { + activity = new Intent(getBaseContext(), Information.class); + activity.putExtra("requestCode", Constants.LINKS_REQUEST_CODE); + startActivityForResult(activity, Constants.LINKS_REQUEST_CODE); + } else if (keyword.equals(getString(R.string.teachingguideModuleLabel))) { + activity = new Intent(getBaseContext(), Information.class); + activity.putExtra("requestCode", Constants.TEACHINGGUIDE_REQUEST_CODE); + startActivityForResult(activity, Constants.TEACHINGGUIDE_REQUEST_CODE); + } diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/information/Bibliography.java b/SWADroid/src/es/ugr/swad/swadroid/modules/information/Bibliography.java deleted file mode 100644 index e69de29b..00000000 diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/information/FAQs.java b/SWADroid/src/es/ugr/swad/swadroid/modules/information/FAQs.java deleted file mode 100644 index e69de29b..00000000 diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/information/Introduction.java b/SWADroid/src/es/ugr/swad/swadroid/modules/information/Introduction.java deleted file mode 100644 index 63db033e..00000000 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/information/Introduction.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * introduction module for get courses's introduction - * - * @author Jose Antonio Guerrero Aviles - */ - -package es.ugr.swad.swadroid.modules.information; - -import java.io.IOException; -import java.security.NoSuchAlgorithmException; -import org.xmlpull.v1.XmlPullParserException; - -import android.os.Bundle; -import android.webkit.WebView; -import android.widget.ImageView; -import android.widget.TextView; -import es.ugr.swad.swadroid.R; -import es.ugr.swad.swadroid.modules.Module; - - -public class Introduction extends Module { - - @Override - protected void onCreate(Bundle savedInstanceState) { - - - - super.onCreate(savedInstanceState); - setContentView(R.layout.webview_information_screen_layout); - WebView webview = (WebView) this.findViewById(R.id.contentWebView); - - ImageView moduleIcon = (ImageView) this.findViewById(R.id.moduleIcon); - moduleIcon.setBackgroundResource(R.drawable.notif); - - TextView moduleText = (TextView) this.findViewById(R.id.moduleName); - moduleText.setText(R.string.introductionModuleLabel); - - } - - - @Override - protected void requestService() throws NoSuchAlgorithmException, - IOException, XmlPullParserException { - // TODO Auto-generated method stub - - } - - @Override - protected void connect() { - // TODO Auto-generated method stub - - } - - @Override - protected void postConnect() { - // TODO Auto-generated method stub - finish(); - - } - - @Override - protected void onError() { - // TODO Auto-generated method stub - - } - -} \ No newline at end of file diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/information/Links.java b/SWADroid/src/es/ugr/swad/swadroid/modules/information/Links.java deleted file mode 100644 index e69de29b..00000000 diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/information/PracticesProgram.java b/SWADroid/src/es/ugr/swad/swadroid/modules/information/PracticesProgram.java deleted file mode 100644 index e69de29b..00000000 diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/information/Syllabus.java b/SWADroid/src/es/ugr/swad/swadroid/modules/information/Syllabus.java deleted file mode 100644 index e69de29b..00000000 diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/information/TheoryProgram.java b/SWADroid/src/es/ugr/swad/swadroid/modules/information/TheoryProgram.java deleted file mode 100644 index e69de29b..00000000