Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/workshop/db/upgradelib.php
Go to the documentation of this file.
00001 <?php
00002 
00003 // This file is part of Moodle - http://moodle.org/
00004 //
00005 // Moodle is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // Moodle is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00017 
00030 function workshop_upgrade_prepare_20_tables() {
00031     global $CFG, $DB;
00032 
00033     $dbman = $DB->get_manager();
00034 
00035     if (!$dbman->table_exists('workshop')) {
00036         $table = new xmldb_table('workshop');
00037         $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
00038         $table->add_field('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00039         $table->add_field('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);
00040         $table->add_field('intro', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00041         $table->add_field('introformat', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
00042         $table->add_field('instructauthors', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00043         $table->add_field('instructauthorsformat', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
00044         $table->add_field('instructreviewers', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00045         $table->add_field('instructreviewersformat', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
00046         $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00047         $table->add_field('phase', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0');
00048         $table->add_field('useexamples', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, null, null, '0');
00049         $table->add_field('usepeerassessment', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, null, null, '0');
00050         $table->add_field('useselfassessment', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, null, null, '0');
00051         $table->add_field('grade', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, '80');
00052         $table->add_field('gradinggrade', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, '20');
00053         $table->add_field('strategy', XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null);
00054         $table->add_field('gradedecimals', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0');
00055         $table->add_field('nattachments', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0');
00056         $table->add_field('latesubmissions', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, null, null, '0');
00057         $table->add_field('maxbytes', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '100000');
00058         $table->add_field('examplesmode', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0');
00059         $table->add_field('submissionstart', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0');
00060         $table->add_field('submissionend', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0');
00061         $table->add_field('assessmentstart', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0');
00062         $table->add_field('assessmentend', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0');
00063         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
00064         $table->add_key('course_fk', XMLDB_KEY_FOREIGN, array('course'), 'course', array('id'));
00065         $dbman->create_table($table);
00066     }
00067 
00068     if (!$dbman->table_exists('workshop_submissions')) {
00069         $table = new xmldb_table('workshop_submissions');
00070         $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
00071         $table->add_field('workshopid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00072         $table->add_field('example', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, null, null, '0');
00073         $table->add_field('authorid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00074         $table->add_field('timecreated', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00075         $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00076         $table->add_field('title', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);
00077         $table->add_field('content', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00078         $table->add_field('contentformat', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
00079         $table->add_field('contenttrust', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
00080         $table->add_field('attachment', XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, null, null, '0');
00081         $table->add_field('grade', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, null);
00082         $table->add_field('gradeover', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, null);
00083         $table->add_field('gradeoverby', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);
00084         $table->add_field('feedbackauthor', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00085         $table->add_field('feedbackauthorformat', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0');
00086         $table->add_field('timegraded', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);
00087         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
00088         $table->add_key('workshop_fk', XMLDB_KEY_FOREIGN, array('workshopid'), 'workshop', array('id'));
00089         $table->add_key('overriddenby_fk', XMLDB_KEY_FOREIGN, array('gradeoverby'), 'user', array('id'));
00090         $table->add_key('author_fk', XMLDB_KEY_FOREIGN, array('authorid'), 'user', array('id'));
00091         $dbman->create_table($table);
00092     }
00093 
00094     if (!$dbman->table_exists('workshop_assessments')) {
00095         $table = new xmldb_table('workshop_assessments');
00096         $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
00097         $table->add_field('submissionid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00098         $table->add_field('reviewerid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00099         $table->add_field('weight', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '1');
00100         $table->add_field('timecreated', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0');
00101         $table->add_field('timemodified', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0');
00102         $table->add_field('grade', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, null);
00103         $table->add_field('gradinggrade', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, null);
00104         $table->add_field('gradinggradeover', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, null);
00105         $table->add_field('gradinggradeoverby', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);
00106         $table->add_field('feedbackauthor', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00107         $table->add_field('feedbackauthorformat', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0');
00108         $table->add_field('feedbackreviewer', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00109         $table->add_field('feedbackreviewerformat', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0');
00110         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
00111         $table->add_key('submission_fk', XMLDB_KEY_FOREIGN, array('submissionid'), 'workshop_submissions', array('id'));
00112         $table->add_key('overriddenby_fk', XMLDB_KEY_FOREIGN, array('gradinggradeoverby'), 'user', array('id'));
00113         $table->add_key('reviewer_fk', XMLDB_KEY_FOREIGN, array('reviewerid'), 'user', array('id'));
00114         $dbman->create_table($table);
00115     }
00116 
00117     if (!$dbman->table_exists('workshop_grades')) {
00118         $table = new xmldb_table('workshop_grades');
00119         $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
00120         $table->add_field('assessmentid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00121         $table->add_field('strategy', XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null);
00122         $table->add_field('dimensionid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00123         $table->add_field('grade', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00124         $table->add_field('peercomment', XMLDB_TYPE_TEXT, 'big', null, null, null, null);
00125         $table->add_field('peercommentformat', XMLDB_TYPE_INTEGER, '3', null, null, null, '0');
00126         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
00127         $table->add_key('assessment_fk', XMLDB_KEY_FOREIGN, array('assessmentid'), 'workshop_assessments', array('id'));
00128         $table->add_key('formfield_uk', XMLDB_KEY_UNIQUE, array('assessmentid', 'strategy', 'dimensionid'));
00129         $dbman->create_table($table);
00130     }
00131 
00132     if (!$dbman->table_exists('workshop_aggregations')) {
00133         $table = new xmldb_table('workshop_aggregations');
00134         $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
00135         $table->add_field('workshopid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00136         $table->add_field('userid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
00137         $table->add_field('gradinggrade', XMLDB_TYPE_NUMBER, '10, 5', XMLDB_UNSIGNED, null, null, null);
00138         $table->add_field('timegraded', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);
00139         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
00140         $table->add_key('workshop_fk', XMLDB_KEY_FOREIGN, array('workshopid'), 'workshop', array('id'));
00141         $table->add_key('user_fk', XMLDB_KEY_FOREIGN, array('userid'), 'user', array('id'));
00142         $table->add_key('workshopuser', XMLDB_KEY_UNIQUE, array('workshopid', 'userid'));
00143         $dbman->create_table($table);
00144     }
00145 }
00146 
00152 function workshop_upgrade_module_instances() {
00153     global $CFG, $DB;
00154 
00155     upgrade_set_timeout();
00156     $moduleid = $DB->get_field('modules', 'id', array('name' => 'workshop'), MUST_EXIST);
00157     $rs = $DB->get_recordset_select('workshop_old', 'newid IS NULL', null, 'id');
00158     foreach ($rs as $old) {
00159         $new = workshop_upgrade_transform_instance($old);
00160         $new->id = $old->id;
00161         $DB->import_record('workshop', $new);
00162         $DB->set_field('workshop_old', 'newplugin', 'workshop', array('id' => $old->id));
00163         $DB->set_field('workshop_old', 'newid', $new->id, array('id' => $old->id));
00164     }
00165     $rs->close();
00166     $dbman = $DB->get_manager();
00167     $dbman->reset_sequence('workshop');
00168 }
00169 
00176 function workshop_upgrade_transform_instance(stdClass $old) {
00177     global $CFG;
00178     require_once(dirname(dirname(__FILE__)) . '/locallib.php');
00179 
00180     $new                = new stdClass();
00181     $new->course        = $old->course;
00182     $new->name          = $old->name;
00183     $new->intro         = $old->description;
00184     $new->introformat   = $old->format;
00185     $new->nattachments  = $old->nattachments;
00186     $new->maxbytes      = $old->maxbytes;
00187     $new->grade         = $old->grade;
00188     $new->gradinggrade  = $old->gradinggrade;
00189     $new->phase         = workshop::PHASE_CLOSED;
00190     $new->timemodified  = time();
00191     if ($old->ntassessments > 0) {
00192         $new->useexamples = 1;
00193     } else {
00194         $new->useexamples = 0;
00195     }
00196     $new->usepeerassessment = 1;
00197     $new->useselfassessment = $old->includeself;
00198     switch ($old->gradingstrategy) {
00199     case 0: // 'notgraded' - renamed
00200         $new->strategy = 'comments';
00201         break;
00202     case 1: // 'accumulative'
00203         $new->strategy = 'accumulative';
00204         break;
00205     case 2: // 'errorbanded' - renamed
00206         $new->strategy = 'numerrors';
00207         break;
00208     case 3: // 'criterion' - will be migrated into 'rubric'
00209         $new->strategy = 'rubric';
00210         break;
00211     case 4: // 'rubric'
00212         $new->strategy = 'rubric';
00213         break;
00214     }
00215     if ($old->submissionstart < $old->submissionend) {
00216         $new->submissionstart = $old->submissionstart;
00217         $new->submissionend   = $old->submissionend;
00218     }
00219     if ($old->assessmentstart < $old->assessmentend) {
00220         $new->assessmentstart = $old->assessmentstart;
00221         $new->assessmentend   = $old->assessmentend;
00222     }
00223 
00224     return $new;
00225 }
00226 
00233 function workshop_upgrade_submissions() {
00234     global $CFG, $DB;
00235 
00236     upgrade_set_timeout();
00237 
00238     // list of teachers in every workshop: array of (int)workshopid => array of (int)userid => notused
00239     $workshopteachers = array();
00240 
00241     $rs = $DB->get_recordset_select('workshop_submissions_old', 'newid IS NULL');
00242     foreach ($rs as $old) {
00243         if (!isset($workshopteachers[$old->workshopid])) {
00244             $cm = get_coursemodule_from_instance('workshop', $old->workshopid, 0, false, MUST_EXIST);
00245             $context = get_context_instance(CONTEXT_MODULE, $cm->id);
00246             $workshopteachers[$old->workshopid] = get_users_by_capability($context, 'mod/workshop:manage', 'u.id');
00247         }
00248         $new = workshop_upgrade_transform_submission($old, $old->workshopid, $workshopteachers[$old->workshopid]);
00249         $newid = $DB->insert_record('workshop_submissions', $new, true, true);
00250         $DB->set_field('workshop_submissions_old', 'newplugin', 'submissions', array('id' => $old->id));
00251         $DB->set_field('workshop_submissions_old', 'newid', $newid, array('id' => $old->id));
00252     }
00253     $rs->close();
00254 }
00255 
00264 function workshop_upgrade_transform_submission(stdClass $old, $newworkshopid, array $legacyteachers) {
00265 
00266     $new                = new stdclass(); // new submission record to be returned
00267     $new->workshopid    = $newworkshopid;
00268 
00269     if (isset($legacyteachers[$old->userid])) {
00270         // the author of the submission was teacher = had mod/workshop:manage. this is the only way how we can
00271         // recognize the submission should be treated as example submission (ach jo...)
00272         $new->example   = 1;
00273     } else {
00274         $new->example   = 0;
00275     }
00276 
00277     $new->authorid      = $old->userid;
00278     $new->timecreated   = $old->timecreated;
00279     $new->timemodified  = $old->timecreated;
00280     $new->title         = $old->title;
00281     $new->content       = $old->description;
00282     $new->contentformat = FORMAT_HTML;
00283     $new->contenttrust  = 0;
00284     $new->published     = 0;
00285 
00286     return $new;
00287 }
00288 
00294 function workshop_upgrade_submission_id_mappings() {
00295     global $DB;
00296 
00297     $oldrecords = $DB->get_records('workshop_submissions_old', null, 'id', 'id,newid');
00298     $newids = array();
00299     foreach ($oldrecords as $oldid => $oldrecord) {
00300         if ($oldrecord->id and $oldrecord->newid) {
00301             $newids[$oldid] = $oldrecord->newid;
00302         }
00303     }
00304     return $newids;
00305 }
00306 
00312 function workshop_upgrade_legacy_teacher_weights() {
00313     global $DB;
00314 
00315     $oldrecords = $DB->get_records('workshop_old', null, 'id', 'id,teacherweight');
00316     $weights = array();
00317     foreach ($oldrecords as $oldid => $oldrecord) {
00318         if (is_null($oldrecord->teacherweight)) {
00319             $weights[$oldid] = 1;
00320         } else {
00321             $weights[$oldid] = $oldrecord->teacherweight;
00322         }
00323     }
00324     return $weights;
00325 }
00326 
00333 function workshop_upgrade_assessments() {
00334     global $CFG, $DB, $OUTPUT;
00335 
00336     upgrade_set_timeout();
00337 
00338     $newsubmissionids   = workshop_upgrade_submission_id_mappings();
00339     $teacherweights     = workshop_upgrade_legacy_teacher_weights();
00340 
00341     // list of teachers in every workshop: array of (int)workshopid => array of (int)userid => notused
00342     $workshopteachers   = array();
00343 
00344     // get the list of ids of the new example submissions
00345     $examplesubmissions = $DB->get_records('workshop_submissions', array('example' => 1), '', 'id');
00346 
00347     $rs = $DB->get_recordset_select('workshop_assessments_old', 'newid IS NULL');
00348     foreach ($rs as $old) {
00349         if (!isset($workshopteachers[$old->workshopid])) {
00350             $cm = get_coursemodule_from_instance('workshop', $old->workshopid, 0, false, MUST_EXIST);
00351             $context = get_context_instance(CONTEXT_MODULE, $cm->id);
00352             $workshopteachers[$old->workshopid] = get_users_by_capability($context, 'mod/workshop:manage', 'u.id');
00353         }
00354         $ofexample = isset($examplesubmissions[$newsubmissionids[$old->submissionid]]);
00355         $new = workshop_upgrade_transform_assessment($old, $newsubmissionids[$old->submissionid],
00356                                                      $workshopteachers[$old->workshopid], $teacherweights[$old->workshopid], $ofexample);
00357         $newid = $DB->insert_record('workshop_assessments', $new, true, true);
00358         $DB->set_field('workshop_assessments_old', 'newplugin', 'assessments', array('id' => $old->id));
00359         $DB->set_field('workshop_assessments_old', 'newid', $newid, array('id' => $old->id));
00360     }
00361     $rs->close();
00362 }
00363 
00374 function workshop_upgrade_transform_assessment(stdClass $old, $newsubmissionid, array $legacyteachers, $legacyteacherweight, $ofexample) {
00375     global $CFG;
00376     require_once($CFG->libdir . '/gradelib.php');
00377 
00378     $new                            = new stdclass();
00379     $new->submissionid              = $newsubmissionid;
00380     $new->reviewerid                = $old->userid;
00381 
00382     if ($ofexample) {
00383         // this is the assessment of an example submission
00384         if (isset($legacyteachers[$old->userid])) {
00385             // this is probably the reference assessment of the example submission
00386             $new->weight            = 1;
00387         } else {
00388             $new->weight            = 0;
00389         }
00390 
00391     } else {
00392         if (isset($legacyteachers[$old->userid])) {
00393             $new->weight            = $legacyteacherweight;
00394         } else {
00395             $new->weight            = 1;
00396         }
00397     }
00398 
00399     if ($old->grade < 0) {
00400         // in workshop 1.x, this is just allocated assessment that has not been touched yet, having timecreated one year in the future :-/
00401         $new->timecreated           = time();
00402     } else {
00403         $new->grade                 = grade_floatval($old->grade);
00404         if ($old->teachergraded) {
00405             $new->gradinggradeover  = grade_floatval($old->gradinggrade);
00406         } else {
00407             $new->gradinggrade      = grade_floatval($old->gradinggrade);
00408         }
00409         $new->feedbackauthor        = $old->generalcomment;
00410         $new->feedbackauthorformat  = FORMAT_HTML;
00411         $new->feedbackreviewer      = $old->teachercomment;
00412         $new->feedbackreviewerformat = FORMAT_HTML;
00413         $new->timecreated           = $old->timecreated;
00414         $new->timemodified          = $old->timegraded;
00415     }
00416 
00417     return $new;
00418 }
00419 
00425 function workshop_upgrade_assessment_id_mappings() {
00426     global $DB;
00427 
00428     $oldrecords = $DB->get_records('workshop_assessments_old', null, 'id', 'id,newid');
00429     $newids = array();
00430     foreach ($oldrecords as $oldid => $oldrecord) {
00431         if ($oldrecord->id and $oldrecord->newid) {
00432             $newids[$oldid] = $oldrecord->newid;
00433         }
00434     }
00435     return $newids;
00436 }
00437 
00444 function workshop_upgrade_element_id_mappings($strategy) {
00445     global $DB;
00446 
00447     $oldrecords = $DB->get_records('workshop_elements_old', array('newplugin' => $strategy),
00448                                    'workshopid,elementno', 'id,workshopid,elementno,scale,maxscore,newid');
00449     $newids = array();
00450     foreach ($oldrecords as $old) {
00451         if (!isset($newids[$old->workshopid])) {
00452             $newids[$old->workshopid] = array();
00453         }
00454         $info = new stdclass();
00455         $info->newid = $old->newid;
00456         if ($strategy == 'accumulative') {
00457             if ($old->scale >= 0 and $old->scale <= 6) {
00458                 $info->type = 'scale';
00459             } else {
00460                 $info->type = 'value';
00461             }
00462         }
00463         if ($strategy == 'rubric_levels') {
00464             $info->maxscore = $old->maxscore;
00465         }
00466         $newids[$old->workshopid][$old->elementno] = $info;
00467     }
00468     return $newids;
00469 }
 All Data Structures Namespaces Files Functions Variables Enumerations