Commit 8f52639 1 parent e9bd24e commit 8f52639 Copy full SHA for 8f52639
File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1078,7 +1078,13 @@ define([
1078
1078
if ( ( nodeStatus === "correct" && score === 0 && completeness ) || ( nodeStatus === "correct" && score === 1 && tweaked && completeness ) )
1079
1079
nodeStatus = "perfect" ;
1080
1080
if ( gifted ) {
1081
- nodeStatus = "gifted-" + nodeStatus ;
1081
+ //if a gifted node turns out to be not a perfect node, ungift it and let user solve it and regular badges follow
1082
+ if ( nodeStatus == "perfect" ) {
1083
+ nodeStatus = "gifted-" + nodeStatus ;
1084
+ }
1085
+ else {
1086
+ this . unGiftNode ( id ) ;
1087
+ }
1082
1088
}
1083
1089
return nodeStatus ;
1084
1090
} ,
@@ -1326,6 +1332,9 @@ define([
1326
1332
isGifted : function ( id ) {
1327
1333
return this . getNode ( id ) . gifted ? true : false ;
1328
1334
} ,
1335
+ unGiftNode : function ( id ) {
1336
+ this . getNode ( id ) . gifted = false ;
1337
+ } ,
1329
1338
getCorrectAnswer : function ( /*string*/ studentID , /*string*/ part ) {
1330
1339
var id = this . getAuthoredID ( studentID ) ;
1331
1340
var node = obj . authored . getNode ( id ) ;
You can’t perform that action at this time.
0 commit comments