Added test module subactivities
This commit is contained in:
parent
d95f1d065b
commit
5eb8f91647
|
@ -22,6 +22,8 @@
|
||||||
<activity android:name=".modules.Courses" android:theme="@android:style/Theme.Translucent.NoTitleBar"><activity android:name=".modules.Courses" android:theme="@android:style/Theme.Dialog"></activity></activity>
|
<activity android:name=".modules.Courses" android:theme="@android:style/Theme.Translucent.NoTitleBar"><activity android:name=".modules.Courses" android:theme="@android:style/Theme.Dialog"></activity></activity>
|
||||||
<activity android:label="@string/notificationsModuleLabel" android:name=".modules.notifications.Notifications" android:theme="@android:style/Theme.NoTitleBar">
|
<activity android:label="@string/notificationsModuleLabel" android:name=".modules.notifications.Notifications" android:theme="@android:style/Theme.NoTitleBar">
|
||||||
</activity><activity android:name=".modules.tests.Tests" android:theme="@android:style/Theme.NoTitleBar" android:label="@string/testsModuleLabel"></activity>
|
</activity><activity android:name=".modules.tests.Tests" android:theme="@android:style/Theme.NoTitleBar" android:label="@string/testsModuleLabel"></activity>
|
||||||
|
<activity android:name=".modules.tests.TestsDownload" android:theme="@android:style/Theme.NoTitleBar" android:label="@string/testsModuleLabel"></activity>
|
||||||
|
<activity android:theme="@android:style/Theme.NoTitleBar" android:name=".modules.tests.TestsMake" android:label="@string/testsModuleLabel"></activity>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||||
|
|
|
@ -34,6 +34,7 @@ import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
|
|
||||||
|
import es.ugr.swad.swadroid.Global;
|
||||||
import es.ugr.swad.swadroid.R;
|
import es.ugr.swad.swadroid.R;
|
||||||
import es.ugr.swad.swadroid.modules.Module;
|
import es.ugr.swad.swadroid.modules.Module;
|
||||||
|
|
||||||
|
@ -57,9 +58,17 @@ public class Tests extends Module {
|
||||||
ListView list;
|
ListView list;
|
||||||
String[] items = getResources().getStringArray(R.array.testMenuItems);
|
String[] items = getResources().getStringArray(R.array.testMenuItems);
|
||||||
OnItemClickListener clickListener = new OnItemClickListener() {
|
OnItemClickListener clickListener = new OnItemClickListener() {
|
||||||
public void onItemClick(AdapterView<?> av, View v, int arg2,
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
long arg3) {
|
Intent activity;
|
||||||
|
switch(position) {
|
||||||
|
case 0: activity = new Intent(getBaseContext(), TestsDownload.class);
|
||||||
|
startActivityForResult(activity, Global.TESTS_DOWNLOAD_REQUEST_CODE);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1: activity = new Intent(getBaseContext(), TestsMake.class);
|
||||||
|
startActivityForResult(activity, Global.TESTS_MAKE_REQUEST_CODE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* This file is part of SWADroid.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Juan Miguel Boyero Corral <juanmi1982@gmail.com>
|
||||||
|
*
|
||||||
|
* SWADroid is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SWADroid is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package es.ugr.swad.swadroid.modules.tests;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
|
import org.ksoap2.SoapFault;
|
||||||
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
|
import es.ugr.swad.swadroid.modules.Module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests module for download and update questions
|
||||||
|
* @author Juan Miguel Boyero Corral <juanmi1982@gmail.com>
|
||||||
|
*/
|
||||||
|
public class TestsDownload extends Module {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see es.ugr.swad.swadroid.modules.Module#requestService()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void requestService() throws NoSuchAlgorithmException,
|
||||||
|
IOException, XmlPullParserException, SoapFault,
|
||||||
|
IllegalAccessException, InstantiationException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see es.ugr.swad.swadroid.modules.Module#connect()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void connect() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see es.ugr.swad.swadroid.modules.Module#postConnect()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void postConnect() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* This file is part of SWADroid.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Juan Miguel Boyero Corral <juanmi1982@gmail.com>
|
||||||
|
*
|
||||||
|
* SWADroid is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* SWADroid is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package es.ugr.swad.swadroid.modules.tests;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
|
import org.ksoap2.SoapFault;
|
||||||
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
|
import es.ugr.swad.swadroid.modules.Module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests module for evaluate user skills in a course
|
||||||
|
* @author Juan Miguel Boyero Corral <juanmi1982@gmail.com>
|
||||||
|
*/
|
||||||
|
public class TestsMake extends Module {
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see es.ugr.swad.swadroid.modules.Module#requestService()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void requestService() throws NoSuchAlgorithmException,
|
||||||
|
IOException, XmlPullParserException, SoapFault,
|
||||||
|
IllegalAccessException, InstantiationException {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see es.ugr.swad.swadroid.modules.Module#connect()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void connect() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see es.ugr.swad.swadroid.modules.Module#postConnect()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void postConnect() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user