File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
src/main/java/org/wise/vle/domain/webservice/crater Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,11 @@ public abstract class AbstractCRaterRequest implements CRaterRequest {
1717 public String generateBodyData () throws JSONException {
1818 JSONObject body = new JSONObject ();
1919 body .put ("client_id" , cRaterClientId );
20- body .put ("service" , "ScoringService" );
2120 body .put ("item_id" , itemId );
2221 return body .toString ();
2322 }
2423
2524 public boolean forBerkeleyEndpoint () {
26- return itemId .substring (0 , 9 ).equals ("berkeley_" );
25+ return itemId .length () > 9 && itemId . substring (0 , 9 ).equals ("berkeley_" );
2726 }
2827}
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public class CRaterScoringRequest extends AbstractCRaterRequest {
1414
1515 public String generateBodyData () throws JSONException {
1616 JSONObject body = new JSONObject (super .generateBodyData ());
17+ body .put ("service" , "ScoringService" );
1718 JSONArray responses = new JSONArray ();
1819 JSONObject response = new JSONObject ();
1920 response .put ("response_id" , responseId );
Original file line number Diff line number Diff line change 11package org .wise .vle .domain .webservice .crater ;
22
3- public class CRaterVerificationRequest extends AbstractCRaterRequest {}
3+ import org .json .JSONException ;
4+ import org .json .JSONObject ;
5+
6+ public class CRaterVerificationRequest extends AbstractCRaterRequest {
7+ public String generateBodyData () throws JSONException {
8+ JSONObject body = new JSONObject (super .generateBodyData ());
9+ body .put ("service" , "VerificationService" );
10+ return body .toString ();
11+ }
12+ }
You can’t perform that action at this time.
0 commit comments