Example #1
0
File: Course.php Project: jne21/WBT
 static function delete($courseId)
 {
     if ($id = intval($courseId)) {
         CourseL10n::deleteAll($courseId);
         parent::delete($id);
     }
 }
Example #2
0
 static function createLocale()
 {
     $locales = LocaleManager::getLocales();
     $locale = new CourseL10n();
     foreach (array_keys($locales) as $localeId) {
         $l10n[$localeId] = (object) ['brief' => 'brief_' . rand() . '_' . $localeId, 'description' => 'unitTest_description_' . rand() . '_' . $localeId, 'meta' => 'meta_' . rand() . '_' . $localeId, 'name' => 'name_' . rand() . '_' . $localeId, 'state' => rand(0, 255), 'title' => 'title_' . rand() . '_' . $localeId, 'url' => 'url_' . rand() . ' ' . $localeId];
         $locale->load($localeId, $l10n[$localeId]);
     }
     return $locale;
 }