Skip to content

Commit

Permalink
Update ranking metric
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhav5112 committed May 8, 2024
1 parent e37dee8 commit f40c174
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ document.addEventListener('DOMContentLoaded', function () {

// Convert redemption status to lowercase and remove whitespace
const cleanedRedemptionStatus = redemptionStatus.toLowerCase().replace(/\s/g, '');
if (cleanedRedemptionStatus === 'yes') {
val = 1;
}
else{
val = 0;
}

const cleanedAllPathways = allPathways.toLowerCase().replace(/\s/g, '');

// Calculate rank based on the number of courses completed
leaderboardData.push({
rank: parseInt(prompt_design) + parseInt(gemini_and_streamlit) + parseInt(genAIGames),
rank: parseInt(prompt_design) + parseInt(gemini_and_streamlit) + parseInt(genAIGames) + val,
name,
prompt_design: parseInt(prompt_design),
gemini_and_streamlit: parseInt(gemini_and_streamlit),
Expand Down

0 comments on commit f40c174

Please sign in to comment.