| @@ 136-148 (lines=13) @@ | ||
| 133 | * @param undefined $optional_data optional constructor arguments |
|
| 134 | * @return object class instance object |
|
| 135 | */ |
|
| 136 | public function load_data_object( $name = '', $data = 0, $optional_data = null ) { |
|
| 137 | // Load Analysis data |
|
| 138 | $object_name = 'WooThemes_Sensei_Learners_' . $name; |
|
| 139 | if ( is_null($optional_data) ) { |
|
| 140 | $sensei_learners_object = new $object_name( $data ); |
|
| 141 | } else { |
|
| 142 | $sensei_learners_object = new $object_name( $data, $optional_data ); |
|
| 143 | } // End If Statement |
|
| 144 | if ( 'Main' == $name ) { |
|
| 145 | $sensei_learners_object->prepare_items(); |
|
| 146 | } // End If Statement |
|
| 147 | return $sensei_learners_object; |
|
| 148 | } // End load_data_object() |
|
| 149 | ||
| 150 | /** |
|
| 151 | * learners_page function. |
|
| @@ 126-139 (lines=14) @@ | ||
| 123 | * @param undefined $optional_data optional constructor arguments |
|
| 124 | * @return object class instance object |
|
| 125 | */ |
|
| 126 | public function load_data_object( $name = '', $data = 0, $optional_data = null ) { |
|
| 127 | // Load Analysis data |
|
| 128 | $object_name = 'WooThemes_Sensei_Grading_' . $name; |
|
| 129 | if ( is_null($optional_data) ) { |
|
| 130 | $sensei_grading_object = new $object_name( $data ); |
|
| 131 | } |
|
| 132 | else { |
|
| 133 | $sensei_grading_object = new $object_name( $data, $optional_data ); |
|
| 134 | } // End If Statement |
|
| 135 | if ( 'Main' == $name ) { |
|
| 136 | $sensei_grading_object->prepare_items(); |
|
| 137 | } // End If Statement |
|
| 138 | return $sensei_grading_object; |
|
| 139 | } // End load_data_object() |
|
| 140 | ||
| 141 | /** |
|
| 142 | * grading_page function. |
|