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
e2ef4e3f
authored
May 12, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue
#210
closed
parent
ab6b6a0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Device.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/UserLogin.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/Device.java
View file @
e2ef4e3f
...
...
@@ -224,7 +224,7 @@ public class Device extends SQLiteOpenHelper {
Vector
<
User
>
users
=
new
Vector
<>();
Cursor
cursor
=
db
.
query
(
"users_detail"
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
while
(
cursor
.
moveToNext
())
if
(
cursor
.
getInt
(
9
)
==
id_sup
)
if
(
cursor
.
getInt
(
10
)
==
id_sup
)
users
.
add
(
new
User
(
cursor
.
getInt
(
0
),
cursor
.
getString
(
1
),
cursor
.
getString
(
2
),
cursor
.
getString
(
3
),
cursor
.
getString
(
4
),
cursor
.
getInt
(
5
),
cursor
.
getString
(
6
),
cursor
.
getString
(
7
),
cursor
.
getString
(
8
),
cursor
.
getString
(
9
),
cursor
.
getInt
(
10
),
cursor
.
getString
(
11
),
cursor
.
getString
(
12
),
cursor
.
getString
(
13
),
cursor
.
getString
(
14
),
cursor
.
getString
(
15
),
cursor
.
getString
(
16
),
cursor
.
getString
(
17
),
...
...
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/UserLogin.java
View file @
e2ef4e3f
...
...
@@ -151,9 +151,10 @@ public class UserLogin {
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
catch
(
LoginException
e
)
{
if
(
e
.
login_failed
())
GUITools
.
show_alert
(
activity
,
R
.
string
.
userInetErrorMsg
);
else
if
(
e
.
no_supervisor_students
())
if
(
e
.
login_failed
())
{
Log
.
e
(
LOG_TAG
,
"Login offline not possible: "
+
e
.
getMessage
());
GUITools
.
show_alert
(
activity
,
R
.
string
.
userInetErrorMsg
);
}
else
if
(
e
.
no_supervisor_students
())
GUITools
.
show_alert
(
activity
,
R
.
string
.
noStudentsError
);
}
}
...
...
@@ -239,6 +240,7 @@ public class UserLogin {
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
catch
(
LoginException
e
)
{
Log
.
e
(
LOG_TAG
,
"Login offline not possible: "
+
e
.
getMessage
());
GUITools
.
show_alert
(
activity
,
R
.
string
.
userInetErrorMsg
);
}
}
//offline student login
...
...
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