Skip to content

Commit

Permalink
Did some testing and fixed as many simple bugs as I could and updated…
Browse files Browse the repository at this point in the history
… documentation to match.
  • Loading branch information
GeorgeAzpeitia committed Dec 2, 2015
1 parent 703f85d commit e701481
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 310 deletions.
549 changes: 245 additions & 304 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/src/main/java/com/example/sfarmani/ucsctutor/Review.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ public void done(ParseObject review, ParseException e) {
reviewMetaData.put("friend_avg", tempFrnAvg);
reviewMetaData.put("know_avg", tempKnwAvg);

reviewMetaData.saveInBackground();
review.saveInBackground();
reviewMetaData.saveInBackground();

}else if(e.getCode() == ParseException.OBJECT_NOT_FOUND){
ParseACL acl = new ParseACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(false);
acl.setWriteAccess(reviewerID, false);
acl.setWriteAccess(reviewerID, true);

ParseObject parseReview = new ParseObject("Review");
double tempRelAvg = addAvg(reviewMetaData.getDouble("rel_avg"), reliability, reviewMetaData.getInt("review_count"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void onCreate(Bundle savedInstanceState) {
RemoveCourse = (FlatButton) findViewById(R.id.RemoveCourseBtn);
RemoveCourse.setEnabled(false);
RemoveCourse.setClickable(false);

courses = new TreeMap<>();
course = (EditText) findViewById(R.id.course);
courseListView = (ListView) findViewById(R.id.courseListView);
credentials = new Credentials(courses, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public class ViewProfileActivity extends FragmentActivity {
private TextView courseList;

@Override
public void onCreate(Bundle SavedInstanceState){
public void onStart(){

super.onCreate(SavedInstanceState);
super.onStart();

progress = new ProgressDialog(this);
progress.setTitle("Loading");
Expand Down Expand Up @@ -184,7 +184,8 @@ public void done(ParseUser user_profile, ParseException e) {
profile_image.loadInBackground();

//set the course list
HashMap<String, Boolean> hash = (HashMap<String, Boolean>)user_profile.get("courses");

HashMap<String, Boolean> hash =user_profile.get("courses") != null? (HashMap<String, Boolean>)user_profile.get("courses") : new HashMap<String, Boolean>();
Credentials courses = new Credentials(new TreeMap<String, Boolean>(hash));
ArrayList<String> courseArray = courses.getAllCourses();
String buildCourseList = "";
Expand Down
Binary file modified docs/Final Project Documentation/SystemUnitTestUCSCTutor.pdf
Binary file not shown.
Binary file not shown.

0 comments on commit e701481

Please sign in to comment.