File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,46 @@ def clone(self):
404
404
g .save ()
405
405
return g
406
406
407
+ def get_assessment_rules (self ):
408
+ line_actions = [
409
+ 'up' ,
410
+ 'down' ,
411
+ 'slope up' ,
412
+ 'slope down' ,
413
+ ]
414
+
415
+ rules = {
416
+ 'line1' : {
417
+ 'name' : 'Orange line' ,
418
+ 'possible_values' : line_actions ,
419
+ },
420
+
421
+ 'line2' : {
422
+ 'name' : 'Blue line' ,
423
+ 'possible_values' : line_actions ,
424
+ },
425
+
426
+ 'line1 label' : 'Orange line label' ,
427
+ 'line2 label' : 'Blue line label' ,
428
+ 'intersectionLabel' : 'Intersection label' ,
429
+ 'intersectionHorizLineLabel' :
430
+ 'Orange-Blue intersection horizontal' ,
431
+ 'intersectionVertLineLabel' : 'Orange-Blue intersection vertical' ,
432
+ 'x-axis label' : 'X-axis label' ,
433
+ 'y-axis label' : 'Y-axis label' ,
434
+ }
435
+
436
+ # TODO: extend possible rules for the various other graph types
437
+ if self .graph_type == 8 :
438
+ rules .update ({
439
+ 'line3' : {
440
+ 'name' : 'Green line' ,
441
+ 'possible_values' : line_actions ,
442
+ }
443
+ })
444
+
445
+ return rules
446
+
407
447
408
448
class JXGLine (models .Model ):
409
449
class Meta :
You can’t perform that action at this time.
0 commit comments