diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/AddDeviceFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/AddDeviceFragment.java index af287e3..72ea155 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/AddDeviceFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/AddDeviceFragment.java @@ -37,7 +37,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c public void onClick(View view) { connection = new ServerConnection(); - connection.sendRequest(connection.prepareDevice("insertDevice", device.getText().toString(), desc.getText().toString(), "json")); + connection.sendRequest(connection.prepareAddDevice("insertDevice", device.getText().toString(), desc.getText().toString(), "json")); if(connection.getMsgStatus()){ Toast.makeText(view.getContext(), "Device adicionado", Toast.LENGTH_SHORT).show(); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/DevicesFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/DevicesFragment.java index 8e8e74a..3b2b50a 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/DevicesFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/DevicesFragment.java @@ -64,6 +64,7 @@ public void onClick(View view) { public void onItemClick(AdapterView adapterView, View view, int i, long l) { try { intent = getActivity().getIntent(); + intent.putExtra("ID", arrayList.get(i).getInt(0)); intent.putExtra("Device", arrayList.get(i).get(1).toString()); intent.putExtra("Description", arrayList.get(i).get(2).toString()); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/ViewDevicesFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/ViewDevicesFragment.java index d1ccdc1..b1e016b 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/ViewDevicesFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/DevicesFragments/ViewDevicesFragment.java @@ -9,12 +9,14 @@ import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; +import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import com.gazeboindustries.sextafeiramobile.R; +import com.gazeboindustries.sextafeiramobile.ServerConnection; public class ViewDevicesFragment extends Fragment { private Intent intent; @@ -30,6 +32,10 @@ public class ViewDevicesFragment extends Fragment { private Drawable editIcon; private Drawable removeIcon; + private int ID; + + private ServerConnection connection; + @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { @@ -40,6 +46,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c intent = getActivity().getIntent(); + ID = intent.getIntExtra("ID", 0); txtDevice.setText(intent.getStringExtra("Device")); txtDescription.setText(intent.getStringExtra("Description")); @@ -65,9 +72,16 @@ public void onClick(View view) { btnDeleteCancel.setCompoundDrawablesWithIntrinsicBounds(cancelIcon, null, null, null); }else{ - //connection = new ServerConnection(); - System.out.println("ENVIAR"); - //connection.sendRequest(connection.prepareRequest()); + connection = new ServerConnection(); + + connection.sendRequest(connection.prepareUpdateDevice("updateDevice", ID, txtDevice.getText().toString(), txtDescription.getText().toString(), + "json")); + + if(connection.getMsgStatus()){ + Toast.makeText(getContext(), "Salvo", Toast.LENGTH_SHORT).show(); + }else{ + Toast.makeText(getContext(), "Erro ao salvar o device", Toast.LENGTH_SHORT).show(); + } } } }); @@ -76,8 +90,11 @@ public void onClick(View view) { @Override public void onClick(View view) { if(btnDeleteCancel.getText().equals("Remover")){ - //show dialog - System.out.println("Remove"); + + //Adicionar log de confirmação + connection = new ServerConnection(); + + connection.sendRequest(connection.prepareDelete("deleteDevice", ID)); }else{ txtDevice.setEnabled(false); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/AddInteractionFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/AddInteractionFragment.java index da9f25f..3d1e0ff 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/AddInteractionFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/AddInteractionFragment.java @@ -48,7 +48,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c public void onClick(View view) { connection = new ServerConnection(); - connection.sendRequest(connection.prepareInteraction("insertInteraction", key1.getText().toString(), key2.getText().toString(), + connection.sendRequest(connection.prepareAddInteraction("insertInteraction", key1.getText().toString(), key2.getText().toString(), key3.getText().toString(), res1.getText().toString(), res2.getText().toString(), res3.getText().toString(), command.getText().toString())); if(connection.getMsgStatus()){ diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/InteractionFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/InteractionFragment.java index fd9da13..5065f0a 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/InteractionFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/InteractionFragment.java @@ -66,6 +66,7 @@ public void onItemClick(AdapterView adapterView, View view, int i, long l) { System.out.println(arrayList.toString()); intent = getActivity().getIntent(); + intent.putExtra("ID", arrayList.get(i).getInt(0)); intent.putExtra("Keyword1", arrayList.get(i).getString(1)); intent.putExtra("Keyword2", arrayList.get(i).getString(2)); intent.putExtra("Keyword3", arrayList.get(i).getString(3)); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/ViewInteractionFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/ViewInteractionFragment.java index 6964ddf..f1f991a 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/ViewInteractionFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/InteractionsFragments/ViewInteractionFragment.java @@ -27,6 +27,7 @@ public class ViewInteractionFragment extends Fragment { private Intent intent; + private int ID; private EditText keyWord1; private EditText keyWord2; private EditText keyWord3; @@ -85,6 +86,7 @@ public void onClick(DialogInterface dialogInterface, int i) { intent = getActivity().getIntent(); + ID = intent.getIntExtra("ID", 0); keyWord1.setText(intent.getStringExtra("Keyword1")); keyWord2.setText(intent.getStringExtra("Keyword2")); keyWord3.setText(intent.getStringExtra("Keyword3")); @@ -116,9 +118,17 @@ public void onClick(View view) { btnDeleteCancel.setCompoundDrawablesWithIntrinsicBounds(cancelIcon, null, null, null); }else{ - //connection = new ServerConnection(); - Toast.makeText(getContext(), "Salvo", Toast.LENGTH_SHORT).show(); - //connection.sendRequest(connection.prepareRequest()); + connection = new ServerConnection(); + + connection.sendRequest(connection.prepareUpdateInteraction("updateInteraction", ID, keyWord1.getText().toString(), keyWord2.getText().toString(), + keyWord3.getText().toString(), response1.getText().toString(), response2.getText().toString(), response3.getText().toString(), + command.getText().toString())); + + if(connection.getMsgStatus()){ + Toast.makeText(getContext(), "Salvo", Toast.LENGTH_SHORT).show(); + }else{ + Toast.makeText(getContext(), "Erro ao salvar interação", Toast.LENGTH_SHORT).show(); + } } } }); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/AddHomeWorkFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/AddHomeWorkFragment.java index 43db0d8..7c54a18 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/AddHomeWorkFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/AddHomeWorkFragment.java @@ -52,7 +52,7 @@ public void onClick(View view) { try { sdf.parse(delivery.getText().toString()); - connection.sendRequest(connection.prepareHomework("insertHomeWork", type.getText().toString(), subject.getText().toString(), + connection.sendRequest(connection.prepareAddHomework("insertHomeWork", type.getText().toString(), subject.getText().toString(), homeWork.getText().toString(), delivery.getText().toString(), desc.getText().toString())); if(connection.getMsgStatus()){ diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/HomeWorkFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/HomeWorkFragment.java index 6c3f823..d076790 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/HomeWorkFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/HomeWorkFragment.java @@ -65,6 +65,7 @@ public void onClick(View view) { public void onItemClick(AdapterView adapterView, View view, int i, long l) { try { intent = getActivity().getIntent(); + intent.putExtra("ID", arrayList.get(i).getInt(0)); intent.putExtra("Type", arrayList.get(i).get(1).toString()); intent.putExtra("Subject", arrayList.get(i).get(2).toString()); intent.putExtra("HomeWork", arrayList.get(i).get(3).toString()); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/ViewHomeWorkFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/ViewHomeWorkFragment.java index 40ab62c..ebd427f 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/ViewHomeWorkFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/HomeworkFragments/ViewHomeWorkFragment.java @@ -16,6 +16,7 @@ import androidx.fragment.app.Fragment; import com.gazeboindustries.sextafeiramobile.R; +import com.gazeboindustries.sextafeiramobile.ServerConnection; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -40,6 +41,9 @@ public class ViewHomeWorkFragment extends Fragment { private SimpleDateFormat sdf; + private ServerConnection connection; + private int ID; + @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { @@ -59,7 +63,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c btnEditSend = view.findViewById(R.id.btnEditHomeWork); btnDeleteCancel = view.findViewById(R.id.btnRemoveHomeWork); - + ID = intent.getIntExtra("ID", 0); txtType.setText(intent.getStringExtra("Type")); txtSubject.setText(intent.getStringExtra("Subject")); txtHomeWork.setText(intent.getStringExtra("HomeWork")); @@ -93,9 +97,16 @@ public void onClick(View view) { } catch (ParseException e) { Toast.makeText(view.getContext(), "Insira um formato válido", Toast.LENGTH_SHORT).show(); } + connection = new ServerConnection(); - //connection = new ServerConnection(); - //connection.sendRequest(connection.prepareRequest()); + connection.sendRequest(connection.prepareUpdateHomework("updateHomeWork", ID, txtType.getText().toString(), txtSubject.getText().toString(), + txtHomeWork.getText().toString(), txtDelivery.getText().toString(), txtDescription.getText().toString())); + + if(connection.getMsgStatus()){ + Toast.makeText(getContext(), "Salvo", Toast.LENGTH_SHORT).show(); + }else{ + Toast.makeText(getContext(), "Erro ao salvar a tarefa", Toast.LENGTH_SHORT).show(); + } } } }); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/AddProjectFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/AddProjectFragment.java index 872eb68..c8d3aeb 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/AddProjectFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/AddProjectFragment.java @@ -34,7 +34,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c public void onClick(View view) { connection = new ServerConnection(); - connection.sendRequest(connection.prepareProject("insertProject", project.getText().toString(), "repository")); + connection.sendRequest(connection.prepareAddProject("insertProject", project.getText().toString(), "repository")); if(connection.getMsgStatus()){ Toast.makeText(view.getContext(), "Projeto adicionado", Toast.LENGTH_SHORT).show(); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ProjectFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ProjectFragment.java index a24d365..88a519c 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ProjectFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ProjectFragment.java @@ -62,6 +62,7 @@ public void onClick(View view) { public void onItemClick(AdapterView adapterView, View view, int i, long l) { try { intent = getActivity().getIntent(); + intent.putExtra("ID", arrayList.get(i).getInt(0)); intent.putExtra("Project", arrayList.get(i).get(1).toString()); intent.putExtra("Repository", arrayList.get(i).get(2).toString()); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ViewProjectsFragment.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ViewProjectsFragment.java index d9f32f0..58090ef 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ViewProjectsFragment.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/Fragments/SkillsFragments/ProjectsFragments/ViewProjectsFragment.java @@ -9,12 +9,14 @@ import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; +import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import com.gazeboindustries.sextafeiramobile.R; +import com.gazeboindustries.sextafeiramobile.ServerConnection; public class ViewProjectsFragment extends Fragment { private Intent intent; @@ -30,6 +32,9 @@ public class ViewProjectsFragment extends Fragment { private Drawable editIcon; private Drawable removeIcon; + private ServerConnection connection; + private int ID; + @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { @@ -43,6 +48,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c intent = getActivity().getIntent(); + ID = intent.getIntExtra("ID", 0); txtProject.setText(intent.getStringExtra("Project")); txtRepository.setText(intent.getStringExtra("Repository")); @@ -65,9 +71,15 @@ public void onClick(View view) { btnDeleteCancel.setCompoundDrawablesWithIntrinsicBounds(cancelIcon, null, null, null); }else{ - //connection = new ServerConnection(); - System.out.println("ENVIAR"); - //connection.sendRequest(connection.prepareRequest()); + connection = new ServerConnection(); + + connection.sendRequest(connection.prepareUpdateProject("updateProject", ID, txtProject.getText().toString(), txtRepository.getText().toString())); + + if(connection.getMsgStatus()){ + Toast.makeText(getContext(), "Salvo", Toast.LENGTH_SHORT).show(); + }else{ + Toast.makeText(getContext(), "Erro ao salvar o projeto", Toast.LENGTH_SHORT).show(); + } } } }); diff --git a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/ServerConnection.java b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/ServerConnection.java index f6e4e9a..1d81dd1 100644 --- a/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/ServerConnection.java +++ b/App/app/src/main/java/com/gazeboindustries/sextafeiramobile/ServerConnection.java @@ -85,7 +85,7 @@ public ArrayList sendRequest(JSONObject request){ } - public JSONObject prepareInteraction(String request, String key1, String key2, String key3, String res1, String res2, String res3, String command){ + public JSONObject prepareAddInteraction(String request, String key1, String key2, String key3, String res1, String res2, String res3, String command){ try { this.jsonRequest = new JSONObject(); this.jsonRequest.put("header", "gazeboindustries09082004"); @@ -104,7 +104,7 @@ public JSONObject prepareInteraction(String request, String key1, String key2, S return jsonRequest; } - public JSONObject prepareDevice(String request, String device, String desc, String json){ + public JSONObject prepareAddDevice(String request, String device, String desc, String json){ try { this.jsonRequest = new JSONObject(); this.jsonRequest.put("header", "gazeboindustries09082004"); @@ -119,7 +119,7 @@ public JSONObject prepareDevice(String request, String device, String desc, Stri return jsonRequest; } - public JSONObject prepareHomework(String request, String type, String subject, String homework, String delivery, String desc){ + public JSONObject prepareAddHomework(String request, String type, String subject, String homework, String delivery, String desc){ try { this.jsonRequest = new JSONObject(); this.jsonRequest.put("header", "gazeboindustries09082004"); @@ -136,7 +136,7 @@ public JSONObject prepareHomework(String request, String type, String subject, S return jsonRequest; } - public JSONObject prepareProject(String request, String project, String desc){ + public JSONObject prepareAddProject(String request, String project, String desc){ try { this.jsonRequest = new JSONObject(); this.jsonRequest.put("header", "gazeboindustries09082004"); @@ -161,4 +161,85 @@ public JSONObject prepareRequest(String request){ return jsonRequest; } + public JSONObject prepareUpdateInteraction(String request, int updateId, String key1, String key2, String key3, String res1, String res2, String res3, String command){ + try { + this.jsonRequest = new JSONObject(); + this.jsonRequest.put("header", "gazeboindustries09082004"); + this.jsonRequest.put("request", request); + this.jsonRequest.put("updateId", updateId); + this.jsonRequest.put("keyWord1", key1); + this.jsonRequest.put("keyWord2", key2); + this.jsonRequest.put("keyWord3", key3); + this.jsonRequest.put("response1", res1); + this.jsonRequest.put("response2", res2); + this.jsonRequest.put("response3", res3); + this.jsonRequest.put("command", command); + + } catch (JSONException e) { + e.printStackTrace(); + } + return jsonRequest; + } + + public JSONObject prepareUpdateDevice(String request, int updateId, String device, String desc, String json){ + try { + this.jsonRequest = new JSONObject(); + this.jsonRequest.put("header", "gazeboindustries09082004"); + this.jsonRequest.put("request", request); + this.jsonRequest.put("updateId", updateId); + this.jsonRequest.put("device", device); + this.jsonRequest.put("description", desc); + this.jsonRequest.put("json", json); + + } catch (JSONException e) { + e.printStackTrace(); + } + return jsonRequest; + } + + public JSONObject prepareUpdateHomework(String request, int updateId, String type, String subject, String homework, String delivery, String desc){ + try { + this.jsonRequest = new JSONObject(); + this.jsonRequest.put("header", "gazeboindustries09082004"); + this.jsonRequest.put("request", request); + this.jsonRequest.put("updateId", updateId); + this.jsonRequest.put("type", type); + this.jsonRequest.put("subject", subject); + this.jsonRequest.put("homeWork", homework); + this.jsonRequest.put("delivery", delivery); + this.jsonRequest.put("description", desc); + + } catch (JSONException e) { + e.printStackTrace(); + } + return jsonRequest; + } + + public JSONObject prepareUpdateProject(String request, int updateId, String project, String desc){ + try { + this.jsonRequest = new JSONObject(); + this.jsonRequest.put("header", "gazeboindustries09082004"); + this.jsonRequest.put("request", request); + this.jsonRequest.put("updateId", updateId); + this.jsonRequest.put("project", project); + this.jsonRequest.put("repository", desc); + + } catch (JSONException e) { + e.printStackTrace(); + } + return jsonRequest; + } + + public JSONObject prepareDelete(String request, int deleteId){ + try { + this.jsonRequest = new JSONObject(); + this.jsonRequest.put("header", "gazeboindustries09082004"); + this.jsonRequest.put("request", request); + this.jsonRequest.put("deleteId", deleteId); + + } catch (JSONException e) { + e.printStackTrace(); + } + return jsonRequest; + } } diff --git a/App/app/src/main/res/layout/fragment_viewhomework.xml b/App/app/src/main/res/layout/fragment_viewhomework.xml index 1c9c521..bf8f248 100644 --- a/App/app/src/main/res/layout/fragment_viewhomework.xml +++ b/App/app/src/main/res/layout/fragment_viewhomework.xml @@ -41,6 +41,7 @@ android:fontFamily="sans-serif-black" android:textSize="20sp" android:id="@+id/txtViewHomeWorkType" + android:enabled="false" /> @@ -70,6 +71,7 @@ android:fontFamily="sans-serif-black" android:textSize="20sp" android:id="@+id/txtViewHomeWorkSubject" + android:enabled="false" /> @@ -98,6 +100,7 @@ android:fontFamily="sans-serif-black" android:textSize="20sp" android:id="@+id/txtViewHomeWork" + android:enabled="false" /> @@ -126,6 +129,7 @@ android:fontFamily="sans-serif-black" android:textSize="20sp" android:id="@+id/txtViewHomeWorkDelivery" + android:enabled="false" /> @@ -154,6 +158,7 @@ android:fontFamily="sans-serif-black" android:textSize="20sp" android:id="@+id/txtViewHomeWorkDescription" + android:enabled="false" /> diff --git a/Server/Server.py b/Server/Server.py index 9514257..a078cd1 100644 --- a/Server/Server.py +++ b/Server/Server.py @@ -190,12 +190,12 @@ def handle(self): elif clientRequest['request'] == 'updateInteraction': dataBaseConnection.updateInteraction(clientRequest['updateId'], - clientRequest['key1'], - clientRequest['key2'], - clientRequest['key3'], - clientRequest['res1'], - clientRequest['res2'], - clientRequest['res3'], + clientRequest['keyWord1'], + clientRequest['keyWord2'], + clientRequest['keyWord3'], + clientRequest['response1'], + clientRequest['response2'], + clientRequest['response3'], clientRequest['command']) self.request.send(json.dumps({'requestStatus': True}).encode())