You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constlastSeen=(user.locations[0] ? (user.locations[0].end_at ? user.locations[0].end_at : newDate()) : newDate(0));// Default to epoch if no location found, so they are considered a potential dropout
103
+
constnow=newDate();
104
+
if((now.getTime()-lastSeen.getTime())>60*60*60*1000){// 60 hours in milliseconds
105
+
potentialDropouts[user.login]=true;
106
+
}else{
107
+
potentialDropouts[user.login]=false;
108
+
}
109
+
}
110
+
86
111
// Sort users first by dropout status, then by name
<divclass="login"title="User ID {{ user.id | int }}"><aclass="external"target="_blank"href="https://profile.intra.42.fr/users/{{ user.login | e }}/">{{user.login | e}}</a>{%ifactiveStudents[user.login] %} <spanclass="badge"title="User is currently an active student">Student</span>{%endif%}</div>
<divclass="login"title="User ID {{ user.id | int }}"><aclass="external"target="_blank"href="https://profile.intra.42.fr/users/{{ user.login | e }}/">{{user.login | e}}</a>{%ifactiveStudents[user.login] %} <spanclass="badge"title="User is currently an active student">Student</span>{%endif%}</div>
0 commit comments