Subversion Repositories SmartDukaan

Rev

Rev 323 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 323 Rev 1915
Line 3... Line 3...
3
print "expSlide=" + `expSlide`
3
print "expSlide=" + `expSlide`
4
 
4
 
5
struct = utils.contentModel2Struct(expSlide)
5
struct = utils.contentModel2Struct(expSlide)
6
print "struct=" + `struct`
6
print "struct=" + `struct`
7
 
7
 
8
score = 0
8
score = 0.0
9
 
9
 
-
 
10
    
10
if struct.has_key("features") :
11
if struct.has_key("features") :
11
    features = struct.get("features")
12
    features = struct.get("features")
12
    
-
 
13
    # E-mail Client : 2, 0
-
 
14
    if features.has_key("E-mail Client") :
-
 
15
        score += 2
-
 
16
    
-
 
17
if struct.has_key("childrenslides") :
-
 
18
    childrenslides = struct.get("childrenslides")
-
 
19
    
13
 
20
    if childrenslides.has_key("Types") :
-
 
21
        types = childrenslides.get("Types")
-
 
22
        
-
 
23
        if types.has_key("features") :
-
 
24
            features = types.get("features")
-
 
25
        
-
 
26
            # Types > MMS : 2, 0
14
    # Types > MMS : 2, 0
27
            if features.has_key("MMS") :
15
    if features.has_key("MMS") :
28
                score += 2
16
        score += 10*10
29
 
17
 
30
            # Types > SMS : 2, 0
18
    # Types > Instant Messaging : 2, 0
31
            if features.has_key("SMS") :
19
    if features.has_key("Instant Messaging") :
32
                score += 2
20
        score += 40*10
33
 
21
 
34
            # Types > Instant Messaging : 2, 0
22
    # Types > Email : 2, 0
35
            if features.has_key("Instant Messaging") :
23
    if features.has_key("Email") :
36
                score += 2
24
        score += 50*10
37
 
25
 
38
            # Types > Email : 2, 0
-
 
39
            if features.has_key("Email") :
-
 
40
                score += 2
26
    score = score/100
41
27