[moodle] / contrib / plugins / grade / report / visual / lib.php Repository:

Diff of /contrib/plugins/grade/report/visual/lib.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Thu Jul 24 15:31:44 2008 WST revision 1.4, Sat Aug 2 12:19:15 2008 WST

By dservos:

CONTRIB-497 *Added more visualizations *Added selector UI Widget for flex/flare visualization *Refactored some of flex actionscript code. *Added defaults for selected group and items in visualizations. *Improved removal of nodes and edges when an item or group is deselected in a legend. *Fixed a memory leak realting to the removal and addtion of nodes. *Added more options for and control of the flex/flare based visualization from the Moodle back end.

# Line 87  Line 87 
87          /// Build grade tree          /// Build grade tree
88          $this->gtree = new grade_tree($this->courseid, false);          $this->gtree = new grade_tree($this->courseid, false);
89    
90            $this->load_visualizations();
91            $this->set_up_flashvars();
92    
93          /// Set up Groups          /// Set up Groups
94          /*if ($this->get_pref('stats', 'showgroups') || is_null($this->get_pref('stats', 'showgroups'))) {          if($visid && grade_report_visual::get_visualization($visid)->usegroups) {
             if(is_callable(array($this, 'setup_groups'))) {  
95                  $this->setup_groups();                  $this->setup_groups();
             } else {  
                 $this->local_setup_groups();  
96              }              }
         }*/  
   
         $this->load_visualizations();  
         $this->set_up_flashvars();  
97      }      }
98    
99      /// Added to keep grade_report happy      /// Added to keep grade_report happy
# Line 386  Line 382 
382          }          }
383      }      }
384    
385        public static function truncate($string, $max = 25, $end = '...') {
386            if(strlen($string) <= $max) {
387                return $string;
388            }
389    
390            return substr_replace($string, $end, $max - strlen($end));
391        }
392    
393      /**      /**
394       * Returns the data for a visulazation in json format.       * Returns the data for a visulazation in json format.
395       * TODO: Use moodle's json encoding functions rather then phps.       * TODO: Use moodle's json encoding functions rather then phps.
# Line 400  Line 404 
404          }          }
405      }      }
406    
   
407      /**      /**
408       * Returns the data for a visulasation in tab format.       * Returns the data for a visulasation in tab format.
409       * @param boolean $return if true return a string, other wise echo the data.       * @param boolean $return if true return a string, other wise echo the data.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7