Added opening time to groups enrollment
This commit is contained in:
parent
30e9736bad
commit
bfbf97f4e1
|
@ -21,6 +21,8 @@
|
|||
android:layout_toRightOf="@id/padlockIcon"
|
||||
android:layout_below="@id/groupTypeText"
|
||||
android:visibility="gone"
|
||||
android:paddingLeft ="35dp"
|
||||
android:textColor="@android:color/black"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -113,5 +113,5 @@
|
|||
<!-- <string name="maxStudent">Màxim d'estud.</string> -->
|
||||
<string name="enrollment">Inscripció</string>
|
||||
<string name="myGroupsModuleLabel">Els meus grups</string>
|
||||
<string name="openingTime">Obertura de grups: </string>
|
||||
<string name="openingTime">Obertura: </string>
|
||||
</resources>
|
|
@ -141,6 +141,6 @@ Es muss mindestens ein Antworttyp ausgewählt werden</string>
|
|||
<string name="groupTypesModuleLabel">Schaffen Gruppetypen</string>
|
||||
<string name="sendMyGroupsProgressDescription">Schicken gerade Einschreibung in Gruppen</string>
|
||||
<string name="sendMyGroupsProgressTitle">Einschreibung in Gruppen</string>
|
||||
<string name="openingTime">Öffnungsdatum den Gruppen: </string>
|
||||
<string name="openingTime">Öffnungsdatum: </string>
|
||||
<string name="noGroupsText">Gruppen worden nicht im Kurs erstellt</string>
|
||||
</resources>
|
|
@ -253,7 +253,7 @@ configuración mediante la opción "Limpiar base de datos" del menú\n\n¿Desea
|
|||
<string name="groupTypesModuleLabel">Conseguir tipos de grupo</string>
|
||||
<string name="sendMyGroupsProgressDescription">Enviando inscripción a grupos</string>
|
||||
<string name="sendMyGroupsProgressTitle">Inscripción en grupos</string>
|
||||
<string name="openingTime">Apertura de grupos: </string>
|
||||
<string name="openingTime">Apertura: </string>
|
||||
<string name="noGroupsText">No se han creado grupos dentro de la asignatura</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -259,6 +259,6 @@ configuration anytime using the "Clean Database" option\n\nDo you want to contin
|
|||
<string name="groupTypesModuleLabel">Get Group Types</string>
|
||||
<string name="sendMyGroupsProgressDescription">Sending enrollment into groups</string>
|
||||
<string name="sendMyGroupsProgressTitle">Enrolment into groups</string>
|
||||
<string name="openingTime">Opening of groups: </string>
|
||||
<string name="openingTime">Opening: </string>
|
||||
<string name="noGroupsText">No groups have been created in the course</string>
|
||||
</resources>
|
||||
|
|
|
@ -34,7 +34,7 @@ public class Global {
|
|||
/**
|
||||
* SWAD application key
|
||||
*/
|
||||
private static final String AppKey = "";
|
||||
private static final String AppKey = "HTC-Desire";
|
||||
/**
|
||||
* Server URL
|
||||
*/
|
||||
|
|
|
@ -120,14 +120,17 @@ public class GroupsResourceCursorTreeAdapter extends ResourceCursorTreeAdapter {
|
|||
textViewGroupTypeName = (TextView) view.findViewById(R.id.groupTypeText);
|
||||
textViewGroupTypeName.setText(cursor.getString(cursor.getColumnIndex("groupTypeName")));
|
||||
|
||||
// long unixTime = cursor.getLong(cursor.getColumnIndex("openTime"));
|
||||
// openTimeText = (TextView)view.findViewById(R.id.openTimeText);
|
||||
// if(unixTime != 0){
|
||||
// Date d = new Date(unixTime * 1000);
|
||||
// java.text.DateFormat dateShortFormat = android.text.format.DateFormat.getDateFormat(context);
|
||||
// java.text.DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(context);
|
||||
// openTimeText.setText(dateShortFormat.format(d)+ " "+(timeFormat.format(d));
|
||||
// }
|
||||
long unixTime = cursor.getLong(cursor.getColumnIndex("openTime"));
|
||||
openTimeText = (TextView)view.findViewById(R.id.openTimeText);
|
||||
if(unixTime != 0){
|
||||
openTimeText.setVisibility(View.VISIBLE);
|
||||
Date d = new Date(unixTime * 1000);
|
||||
java.text.DateFormat dateShortFormat = android.text.format.DateFormat.getDateFormat(context);
|
||||
java.text.DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(context);
|
||||
openTimeText.setText(context.getString(R.string.openingTime)+ " "+ dateShortFormat.format(d)+ " "+(timeFormat.format(d)));
|
||||
}else{
|
||||
openTimeText.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -116,7 +116,7 @@ public class MyGroupsManager extends MenuActivity {
|
|||
switch (requestCode) {
|
||||
case Global.GROUPTYPES_REQUEST_CODE:
|
||||
Intent activity = new Intent(getBaseContext(),GroupTypes.class);
|
||||
activity.putExtra("courseCode", Global.getSelectedCourseCode());
|
||||
activity.putExtra("courseCode", courseCode);
|
||||
startActivityForResult(activity,Global.GROUPS_REQUEST_CODE);
|
||||
break;
|
||||
case Global.GROUPS_REQUEST_CODE:
|
||||
|
|
Loading…
Reference in New Issue
Block a user