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
ab62fca5
authored
Sep 04, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue
#313
closed
parent
fe325bdc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/tools/PCBcontext.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/StudentFragmentGrid.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/tools/PCBcontext.java
View file @
ab62fca5
...
...
@@ -82,7 +82,7 @@ public final class PCBcontext {
@Override
public
void
change
(
User
updatedStudent
,
JSONObject
license
)
{
try
{
if
(!
license
.
getBoolean
(
"isValid"
))
{
if
(!
license
.
getBoolean
(
"isValid"
)
&&
license
.
getBoolean
(
"isTrial"
)
)
{
AlertDialog
.
Builder
builder1
=
new
AlertDialog
.
Builder
(
activityContext
);
builder1
.
setMessage
(
R
.
string
.
loginNoLicenseMsg
);
builder1
.
setPositiveButton
(
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/StudentFragmentGrid.java
View file @
ab62fca5
...
...
@@ -101,7 +101,7 @@ public class StudentFragmentGrid extends Fragment {
else
{
// checks if license is valid for this user
if
(
licenseStudents
[
i
].
equals
(
"expired"
)){
if
(
licenseStudents
[
i
].
equals
(
"expired
_trial
"
)){
AlertDialog
.
Builder
builder1
=
new
AlertDialog
.
Builder
(
getActivity
());
builder1
.
setMessage
(
R
.
string
.
loginNoLicenseMsg
);
builder1
.
setPositiveButton
(
...
...
@@ -267,13 +267,14 @@ public class StudentFragmentGrid extends Fragment {
imgs
.
add
(
new
Img
(
st_id
,
st_pic
,
Img
.
STUDENT
));
//it's required to download student's images
// Checks if license is trial or pro (not expired)
if
(!
st
.
getJSONObject
(
"license"
).
getBoolean
(
"isValid"
))
licenseStudents
[
i
]
=
"expired"
;
else
if
(
st
.
getJSONObject
(
"license"
).
getBoolean
(
"isTrial"
))
licenseStudents
[
i
]
=
"trial"
;
else
if
(
st
.
getJSONObject
(
"license"
).
getBoolean
(
"isOfficial"
))
licenseStudents
[
i
]
=
"pro"
;
Log
.
i
(
"Test"
,
licenseStudents
[
i
]);
licenseStudents
[
i
]
=
!
st
.
getJSONObject
(
"license"
).
getBoolean
(
"isValid"
)
?
(
st
.
getJSONObject
(
"license"
).
getBoolean
(
"isTrial"
)
?
"expired_trial"
:
"expired_official"
)
:
st
.
getJSONObject
(
"license"
).
getBoolean
(
"isTrial"
)
?
"trial"
:
"pro"
;
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
...
...
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