Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1649886a
authored
Aug 24, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
license comprobation on student selection
parent
41f52e8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/CustomList.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/StudentFragmentGrid.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/CustomList.java
View file @
1649886a
...
...
@@ -102,7 +102,7 @@ public class CustomList extends ArrayAdapter<String>{
newStudentView
.
setTextSize
(
64
);
newStudentView
.
setText
(
fa_user_plus
);
}
// Background
ImageView
fondo
=
(
ImageView
)
rowView
.
findViewById
(
R
.
id
.
fondo
);
fondo
.
setBackgroundResource
(
R
.
drawable
.
round_design_photo_white
);
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/StudentFragmentGrid.java
View file @
1649886a
...
...
@@ -99,6 +99,23 @@ public class StudentFragmentGrid extends Fragment {
if
(
this
.
nameStudents
[
i
].
equals
(
getString
(
R
.
string
.
addStudent
)))
register_student
(
getActivity
().
getIntent
().
getIntExtra
(
"sup_id"
,
0
));
else
{
// checks if license is valid for this user
if
(
licenseStudents
[
i
].
equals
(
"expired"
)){
AlertDialog
.
Builder
builder1
=
new
AlertDialog
.
Builder
(
getActivity
());
builder1
.
setMessage
(
R
.
string
.
loginNoLicenseMsg
);
builder1
.
setPositiveButton
(
R
.
string
.
accept
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
id
)
{
dialog
.
cancel
();
}
});
AlertDialog
alert11
=
builder1
.
create
();
alert11
.
show
();
return
;
}
new_user
(
i
);
download_supervisors
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_id_stu
());
}
...
...
@@ -117,7 +134,7 @@ public class StudentFragmentGrid extends Fragment {
alert
.
setView
(
edittext
);
alert
.
setPositiveButton
(
"Ok"
,
new
DialogInterface
.
OnClickListener
()
{
alert
.
setPositiveButton
(
R
.
string
.
accept
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
whichButton
)
{
//What ever you want to do with the value
String
license
=
edittext
.
getText
().
toString
().
replaceAll
(
"[^a-zA-Z0-9]"
,
""
).
toUpperCase
();
...
...
@@ -150,7 +167,7 @@ public class StudentFragmentGrid extends Fragment {
}
});
alert
.
setNegativeButton
(
"Cancel"
,
new
DialogInterface
.
OnClickListener
()
{
alert
.
setNegativeButton
(
R
.
string
.
cancel
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
whichButton
)
{
// what ever you want to do with No option.
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment