issue #763, #767 closed

parent b7efc5d7
......@@ -1131,7 +1131,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
Intent nextActivity=null;
Intent intent =getIntent();
boolean student_view=intent.getBooleanExtra("student_view",false);
if (PCBcontext.getPcbdb().getCurrentUser().is_supervisor() || student_view) {
if (PCBcontext.getPcbdb()!=null && (PCBcontext.getPcbdb().getCurrentUser().is_supervisor() || student_view)) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
firstTouchX = event.getX();
......
......@@ -119,7 +119,7 @@ public class SerialActivity extends Activity {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putString("username", stuUsers.elementAt(position).get_name_stu());
editor.putString("username", stuUsers.elementAt(position).get_nickname_stu());
editor.putString("password", stuUsers.elementAt(position).get_pwd_stu());
editor.commit();
new UserLogin().login(stuUsers.elementAt(position).get_nickname_stu(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment