Marking solved problems not working in MAY 2013 contest (1.4)

I realized that my Chrome extension is not working in MAY 2013 long contest…

related to - http://discuss.ww2.codechef.com/questions/3011/a-green-mark-for-solved-practice-problems

edit: new version 1.5 is available - read more here http://discuss.codechef.com/questions/20222/marking-solved-problems-version-14-is-not-working?page=1#20226

5 Likes

I didn’t realize when it was announced by CodeChef team - problem is new URL (ww2).

You can find description, download link and installation instructions of extension with a small surprise on CodeForces - http://codeforces.com/blog/entry/4599 .

Devanshu Gupta: thanks for the idea :wink:

If I’ll have some time I’ll implement the ideas from the post linked above, but there is GCJ round 1B tomorrow…

If there are some problem, let me know here :wink:

Good luck in long contest :slight_smile:

5 Likes

I found some bugs - download version 1.3.1

@betlista your extension is awesome… Thanks a lot… First time I’m using it :slight_smile:

1 Like

Thanks, glad to hear that :wink:

buddy… it was my pleasure to suggest a improvment to such a nice extension… its awesome… and helpful too… :slight_smile:

1 Like

awesome man came to know after a long time that there is such app.

hello guys, new version 1.4 is available on CodeForces - http://codeforces.com/blog/entry/4599

Didn’t work for me. But after some debugging found that it was because I don’t login using a facebook account and hence do not have the ‘#logged-in-user-fb-pic>’ entry.

Also it doesn’t work on pages of past contests on which one may have participated, since the “submit” link is no longer active there. Below is my patch of changes to get it working, if you would like to incorporate the fixes.

Awesome extension though… :slight_smile: looking forward for one on firefox.


@@ -88,9 +88,11 @@
 			$("td:gt(0)", $(this)).addClass('betlista-codechef-strike');
 		} else {
 			//var submitLink = $('a', codeTd)
-			var submissionsUrl = window.location.origin + $('a', codeTd).attr( "href" );
-			var username = $( '#logged-in-user-fb-pic>tbody>tr>td:eq(1)>span>a:eq(0)').attr("href").replace(/.*\//, "");
-			submissionUrl = submissionsUrl.replace("submit", "status") + "," + username;
+			var url1 = window.location.origin;
+            linkTd = $("td:eq(4)", $(this));
+            var url2 = $('a', linkTd).attr("href");
+			var username = $( 'tbody>tr>td:eq(0)>span>a:eq(0)').attr("href").replace(/.*\//, "");
+            var submissionUrl = url1 + url2 + "," + username;
 			var firstTd = $("td:first", $(this));
 			$.get( submissionUrl,
 				function(data) {
@@ -163,10 +165,10 @@
 	}
 	var url = window.location.origin + "/ajax/ranks/contest" + path + "0/4000/";
 	if (DEBUG) logDiv.append( "DEBUG url=" + url + "
");
+    var username = $( 'tbody>tr>td:eq(0)>span>a:eq(0)').attr("href").replace(/.*\//, "");
 	$.get( url, 
 		function(data) { 
 			var html = jQuery( data );
-			var username = $( '#logged-in-user-fb-pic>tbody>tr>td:eq(1)>span>a:eq(0)').attr("href").replace(/.*\//, "");
 			var row = $( 'table:eq(0)>tbody>tr>td>a:contains("' + username + '")', html ).parent().parent()
 			if (DEBUG) logDiv.append( "DEBUG username=" + username + "
")
 			if (DEBUG) logDiv.append( "DEBUG row.length=" + row.length + "
")

I will look on it…

I’ve just checked, and the download link no longer works. When you have time, could you please check it again? Thanks a lot. It’s such a great extension :wink:

1 Like

I’'ll fix it and let you know.

links are fixed

@betlista Your chrome extension is not working properly. I mean, when I logged in through my codechef account, I get only one tick for my last submitted and accepted answer in the past may long contest.

@betlista Your chrome extension is not working properly. I mean, when I logged in through my codechef account, I get only one tick for my last submitted and accepted answer in the past may long contest.

Correct me if I’m wrong, please. Extension is working fine for May long contest and not for previous contests like FEB13 - http://ww2.codechef.com/FEB13/ , where you solved 1 problem right?

@suzal, can you try the patch in above comment and see if it helps. I’d the same issue. Only the first one got ticked “Password Cracking…” because I’d solved it, but the second one didnt get ticked “Chef Protection Plan…” cause I hadn’t solved it and that would try to query for “#logged-in-user-fb-pic>” entry in the html, which didn’t exist for my user name (and the plugin would thus stop processing at that point itself). I still haven’t been able to get the ‘x’, TLE and other icons for the problems though.

NO it is not working fine for may long contest. And I can’t tell you about the previous contest as I am a new user of your’s chrome extension

I’ll check it for sure, but it doesn’t matter if you used the extension in previous contest, if you go to the contest page you will see the problems you solved :wink:

@srihari i have tried to the patch of your’s but i think i had not been able to correctly put it in the code so I am getting no results.
If you could send me the entire code with your patch that would be great.