예제 #1
0
파일: lib.php 프로젝트: nadavkav/MoodleTAO
function hotpot_update_instance(&$hotpot)
{
    if (hotpot_set_form_values($hotpot)) {
        $hotpot->id = $hotpot->instance;
        if ($result = update_record('hotpot', $hotpot)) {
            hotpot_update_events($hotpot);
            //hotpot_grade_item_update(stripslashes_recursive($hotpot));
            hotpot_update_grades(stripslashes_recursive($hotpot));
        }
    } else {
        $result = false;
    }
    return $result;
}
예제 #2
0
파일: lib.php 프로젝트: ajv/Offline-Caching
/**
 * @global object
 * @param object $hotpot
 * @return bool
 */
function hotpot_update_instance($hotpot)
{
    global $DB;
    if (hotpot_set_form_values($hotpot)) {
        $hotpot->id = $hotpot->instance;
        if ($result = $DB->update_record('hotpot', $hotpot)) {
            hotpot_update_events($hotpot);
            hotpot_update_grades($hotpot);
        }
    } else {
        $result = false;
    }
    return $result;
}
예제 #3
0
function hotpot_update_instance(&$hotpot)
{
    if (hotpot_set_form_values($hotpot)) {
        $hotpot->id = $hotpot->instance;
        if ($result = update_record('hotpot', $hotpot)) {
            hotpot_update_events($hotpot);
        }
    } else {
        $result = false;
    }
    return $result;
}
예제 #4
0
/**
 * Update calendar events for a single HotPot activity
 * This function is intended to be called just after
 * a HotPot activity has been created or edited.
 *
 * @param xxx $hotpot
 */
function hotpot_update_events_wrapper($hotpot)
{
    global $DB;
    if ($eventids = $DB->get_records('event', array('modulename' => 'hotpot', 'instance' => $hotpot->id), 'id', 'id')) {
        $eventids = array_keys($eventids);
    } else {
        $eventids = array();
    }
    hotpot_update_events($hotpot, $eventids, true);
}