Closes #209
This commit is contained in:
parent
735577e345
commit
ce027a4d12
|
@ -432,13 +432,31 @@ public class DownloadsManager extends MenuActivity {
|
|||
}
|
||||
|
||||
/**
|
||||
* Having connection is mandatory for the Download Module.
|
||||
* Therefore when there is not connection, the grid of nodes is disabled and instead it is showed an info messages
|
||||
* Documents:
|
||||
*
|
||||
* Show a warning on Documents screen if there are no documents currently available.
|
||||
*
|
||||
* Marks:
|
||||
*
|
||||
* Show a warning on Marks screen if student ID has not yet been verified by the teacher or
|
||||
* there are no marks currently available.
|
||||
*/
|
||||
private void setNoMarksView() {
|
||||
private void setNoDocumentsView() {
|
||||
int resNoDocuments;
|
||||
|
||||
if(downloadsAreaCode == Constants.MARKS_AREA_CODE) {
|
||||
if (Login.getCurrentUserRole() == Constants.STUDENT_TYPE_CODE)
|
||||
resNoDocuments = R.string.noMarksStudentMsg;
|
||||
else {
|
||||
resNoDocuments = R.string.noMarksTeacherMsg;
|
||||
}
|
||||
} else {
|
||||
resNoDocuments = R.string.noDocumentsMsg;
|
||||
}
|
||||
|
||||
messageView = true;
|
||||
|
||||
messageText.setText(R.string.noMarksMsg);
|
||||
messageText.setText(resNoDocuments);
|
||||
messageText.setVisibility(View.VISIBLE);
|
||||
|
||||
grid.setVisibility(View.GONE);
|
||||
|
@ -468,11 +486,8 @@ public class DownloadsManager extends MenuActivity {
|
|||
items = navigator
|
||||
.goToRoot();
|
||||
|
||||
/* Show a message if there are no marks currently available
|
||||
* or the student ID has not been verified by the teacher
|
||||
*/
|
||||
if(items.isEmpty()) {
|
||||
setNoMarksView();
|
||||
setNoDocumentsView();
|
||||
}
|
||||
} else {
|
||||
items = navigator.goToCurrentDirectory();
|
||||
|
@ -771,15 +786,15 @@ public class DownloadsManager extends MenuActivity {
|
|||
}
|
||||
|
||||
switch (downloadsAreaCode) {
|
||||
case 1:
|
||||
case Constants.DOCUMENTS_AREA_CODE:
|
||||
setTitle(R.string.documentsDownloadModuleLabel);
|
||||
getSupportActionBar().setIcon(R.drawable.folder);
|
||||
break;
|
||||
case 2:
|
||||
case Constants.SHARE_AREA_CODE:
|
||||
setTitle(R.string.sharedsDownloadModuleLabel);
|
||||
getSupportActionBar().setIcon(R.drawable.folder_users);
|
||||
break;
|
||||
case 3:
|
||||
case Constants.MARKS_AREA_CODE:
|
||||
setTitle(R.string.marksModuleLabel);
|
||||
getSupportActionBar().setIcon(R.drawable.grades);
|
||||
break;
|
||||
|
|
|
@ -315,6 +315,8 @@
|
|||
<string name="timelineFav">Nuevo favorito a mis mensajes sociales</string>
|
||||
<string name="timelineShare">Nueva compartición de mis mensajes sociales</string>
|
||||
<string name="timelineMention">Nueva mención</string>
|
||||
<string name="noMarksMsg">No hay calificaciones disponibles o el DNI del estudiante no ha sido verificado por el profesor</string>
|
||||
<string name="noMarksStudentMsg">No hay calificaciones disponibles o el DNI del estudiante no ha sido verificado por el profesor</string>
|
||||
<string name="noMarksTeacherMsg">No hay calificaciones disponibles</string>
|
||||
<string name="noDocumentsMsg">No hay documentos disponibles</string>
|
||||
|
||||
</resources>
|
|
@ -324,6 +324,8 @@
|
|||
<string name="timelineFav">Fav to one of my social publishings</string>
|
||||
<string name="timelineShare">Sharing of one of my social posts</string>
|
||||
<string name="timelineMention">Mention to me in a social publishing</string>
|
||||
<string name="noMarksMsg">No marks currently available or the student ID has not been verified by the teacher</string>
|
||||
<string name="noMarksStudentMsg">No marks currently available or the student ID has not been verified by the teacher</string>
|
||||
<string name="noMarksTeacherMsg">No marks currently available</string>
|
||||
<string name="noDocumentsMsg">No documents currently available</string>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user