Compare commits

..

50 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 628d7c0f9b Moodle release 1.9.18 2012-05-12 03:19:00 +02:00
Eloy Lafuente (stronk7) e9771fda98 weekly release 1.9.17+ 2012-05-11 12:15:18 +02:00
Dan Poltawski a9375cc95d Merge branch 'MDL-18335b_m19' of git://github.com/rwijaya/moodle into MOODLE_19_STABLE 2012-05-07 15:32:53 +08:00
Eloy Lafuente (stronk7) be0f5bf384 weekly release 1.9.17+ 2012-05-04 13:14:11 +02:00
Rossiani Wijaya 4928e13799 MDL-18335 calendar event: fixed role capability checking to create new event 2012-04-30 17:07:15 +08:00
Eloy Lafuente (stronk7) ad964b8a7b weekly release 1.9.17+ 2012-04-27 12:51:26 +02:00
Dan Poltawski a2624c32c2 weekly release 1.9.17+ 2012-04-19 17:51:51 +08:00
Sam Hemelryk 96d8c696ce Merge branch 'm19_MDL-32388' of git://github.com/danmarsden/moodle into MOODLE_19_STABLE 2012-04-16 12:22:50 +12:00
Dan Poltawski 0bbd045329 weekly release 1.9.17+ 2012-04-12 13:22:59 +08:00
Dan Marsden 6db00e4208 MDL-32388 SCORM: Fix chrome pop-ups 2012-04-11 21:10:35 +12:00
Rajesh Taneja db52f45c68 MDL-31746 calendar: Fixed up validation inconsistencies when creating/editing an event 2012-04-10 17:50:58 +12:00
David Mudrak 516878be1e MDL-24403 Fixing the print_error() calls to use the existing string 2012-04-06 11:22:18 +02:00
Yevhenii Vlasenko cf81547d49 MDL-24403 Adding a missing error string 2012-04-06 11:21:40 +02:00
Aparup Banerjee 58be0534b2 weekly release 1.9.17+ 2012-04-05 16:51:44 +08:00
Eloy Lafuente (stronk7) 09f011a628 weekly release 1.9.17+ 2012-03-29 13:21:26 +02:00
Dan Poltawski a30670f7b1 Revert "MDL-31746 calendar: insufficient parameter cleaning"
This reverts commit b0b228f7b9.
2012-03-29 12:20:37 +08:00
Ciaran Irvine b0b228f7b9 MDL-31746 calendar: insufficient parameter cleaning 2012-03-28 14:48:16 +08:00
Dan Poltawski 2763a7d713 Revert "MDL-31746 calendar: insufficient parameter cleaning"
This reverts commit f253646408.
2012-03-28 14:46:42 +08:00
Ciaran Irvine f253646408 MDL-31746 calendar: insufficient parameter cleaning 2012-03-26 23:23:18 +08:00
Dan Poltawski 7d20a8a05c Revert "MDL-31746 calendar: insufficient parameter cleaning"
Potential SQL injection with this solution

This reverts commit 47013fc0bb.
2012-03-26 23:11:30 +08:00
Ciaran Irvine 47013fc0bb MDL-31746 calendar: insufficient parameter cleaning
Reviewed-by: Alastair Munro <alastair.munro@totaralms.com>
Signed-off-by: Dan Poltawski <dan@moodle.com>
2012-03-26 13:57:11 +08:00
Rajesh Taneja 038131c8b5 MDL-31745 blog: Fixed up encoding issue within blog 2012-03-26 11:54:01 +13:00
Sam Hemelryk 8925a12934 weekly release 1.9.17+ 2012-03-23 12:16:58 +13:00
Eloy Lafuente (stronk7) 83668c6efa weekly release 1.9.17+ 2012-03-15 11:50:41 +01:00
Eloy Lafuente (stronk7) 86e74d3eaf Moodle release 1.9.17 2012-03-11 15:55:59 +01:00
Eloy Lafuente (stronk7) 076b2ce86c weekly release 1.9.16+ 2012-03-09 11:16:53 +01:00
Eloy Lafuente (stronk7) b3391165f1 Merge branch 'wip-MDL-31248-MOODLE_19_STABLE-v3' of git://github.com/abgreeve/moodle into MOODLE_19_STABLE 2012-03-09 09:49:52 +01:00
Eloy Lafuente (stronk7) cf9b51f4f1 Revert "MDL-31248 - lib - Alteration to the rc4encrypt function to allow for old password use."
This reverts commit f8adbd6a02.
2012-03-09 09:40:40 +01:00
Eloy Lafuente (stronk7) f4f2b26ec5 Revert "MDL-31248 - lib - prevent moodle_strtolower() silent discard to lead to false-correct usernames"
This reverts commit c67bc65cbe.
2012-03-09 09:40:38 +01:00
Eloy Lafuente (stronk7) 281afcd067 Revert "MDL-31248 - lib - Gah, erroneus condition fixed."
This reverts commit e85a54d931.
2012-03-09 09:40:32 +01:00
Adrian Greeve b48d546c97 MDL-31248 - lib - Retaining the old password key and creating a new cookie prefix. 2012-03-09 13:35:22 +08:00
Eloy Lafuente (stronk7) e85a54d931 MDL-31248 - lib - Gah, erroneus condition fixed.
For sure that leaded to accept anything as valid username
for cookies in 19_STABLE. That explains why garbled username were
being transformed into "invented" usernames, instead of blank.
2012-03-08 12:27:44 +01:00
Eloy Lafuente (stronk7) c67bc65cbe MDL-31248 - lib - prevent moodle_strtolower() silent discard to lead to false-correct usernames 2012-03-08 11:42:13 +01:00
Adrian Greeve f8adbd6a02 MDL-31248 - lib - Alteration to the rc4encrypt function to allow for old password use. 2012-03-08 08:15:45 +08:00
Eloy Lafuente (stronk7) 2c39e251b4 weekly release 1.9.16+ 2012-03-01 11:34:39 +01:00
Eloy Lafuente (stronk7) cd20b15196 weekly release 1.9.16+ 2012-02-23 11:41:24 +01:00
Eloy Lafuente (stronk7) a364ab036c weekly release 1.9.16+ 2012-02-17 01:53:52 +01:00
Eloy Lafuente (stronk7) 46d0e6fb17 MDL-25185 - data - whitespace fixes 2012-02-13 16:20:20 +01:00
Sam Hemelryk 7eb1327487 Merge branch 'wip-MDL-25185-MOODLE_19_STABLE' of git://github.com/abgreeve/moodle into MOODLE_19_STABLE 2012-02-13 17:34:09 +13:00
Eloy Lafuente (stronk7) f5dc0e4110 weekly release 1.9.16+ 2012-02-13 01:21:39 +01:00
Adrian Greeve 312ada2856 MDL-25185 - data - Allowing data from the database to be exported according to group roles. 2012-02-03 07:49:27 +08:00
Eloy Lafuente (stronk7) 4f87a0dccc weekly release 1.9.16+ 2012-02-02 12:16:03 +01:00
Eloy Lafuente (stronk7) 2726791626 weekly release 1.9.16+ 2012-01-27 02:24:07 +01:00
Eloy Lafuente (stronk7) 8db39dc10a weekly release 1.9.16+ 2012-01-19 13:31:02 +01:00
Eloy Lafuente (stronk7) ebd57374cb Merge branch 'w03_MDL-31213_m19_attributesmess' of git://github.com/skodak/moodle into MOODLE_19_STABLE 2012-01-17 12:38:56 +01:00
Petr Skoda c444939ec7 MDL-31213 fix incorrect modifications of quickforms attributes 2012-01-17 11:17:35 +01:00
Tim Gus bc6e8366a9 MDL-31055 backport disabledIf fix from 2.0. (MDL-27045) 2012-01-16 15:22:21 +08:00
Eloy Lafuente (stronk7) 09249fe5c9 weekly release 1.9.16+ 2012-01-12 11:29:47 +01:00
Eloy Lafuente (stronk7) 863b49bd9c Merge branch 'MDL-29294_19' of git://github.com/timhunt/moodle into MOODLE_19_STABLE 2012-01-08 22:59:52 +01:00
Tim Hunt 4d06e61a53 MDL-29294 qtype match restore problem on Oracle. 2011-12-28 11:44:51 +00:00
14 changed files with 154 additions and 88 deletions
+5 -6
View File
@@ -672,7 +672,7 @@
$querystring = '';
foreach($_GET as $var => $val) {
$var = clean_param($var, PARAM_ALPHANUM); // See MDL-22631
$val = clean_param($val, PARAM_CLEAN);
$val = urlencode(clean_param($val, PARAM_CLEAN));
if(!$first) {
$first = true;
if ($var != 'filterselect' && $var != 'filtertype') {
@@ -683,13 +683,13 @@
}
} else {
if ($var != 'filterselect' && $var != 'filtertype') {
$querystring .= '&amp;'.$var.'='.$val;
$querystring .= '&'.$var.'='.$val;
$hasparam = true;
}
}
}
if (isset($hasparam)) {
$querystring .= '&amp;';
$querystring .= '&';
} else {
$querystring = '?';
}
@@ -697,9 +697,8 @@
$querystring = '?';
}
return strip_querystring(qualified_me()) . $querystring. 'filtertype='.
$filtertype.'&amp;filterselect='.$filterselect.'&amp;';
return s(strip_querystring(qualified_me()) . $querystring. 'filtertype='.
$filtertype.'&filterselect='.$filterselect.'&', true);
}
/**
+73 -44
View File
@@ -103,6 +103,7 @@
}
$form = null;
$err = array();
switch($action) {
case 'delete':
@@ -129,23 +130,7 @@
}
if($form = data_submitted() and confirm_sesskey()) {
$form->name = clean_param(strip_tags($form->name,'<lang><span>'), PARAM_CLEAN);
$form->timestart = make_timestamp($form->startyr, $form->startmon, $form->startday, $form->starthr, $form->startmin);
if($form->duration == 1) {
$form->timeduration = make_timestamp($form->endyr, $form->endmon, $form->endday, $form->endhr, $form->endmin) - $form->timestart;
if($form->timeduration < 0) {
$form->timeduration = 0;
}
}
else if($form->duration == 2) {
$form->timeduration = $form->minutes * MINSECS;
}
else {
$form->timeduration = 0;
}
// validate form and set error if any.
validate_form($form, $err);
if (count($err) == 0) {
@@ -194,27 +179,13 @@
$title = get_string('newevent', 'calendar');
$form = data_submitted();
if(!empty($form) && !empty($form->name) && confirm_sesskey()) {
$form->name = clean_text(strip_tags($form->name, '<lang><span>'));
$form->timestart = make_timestamp($form->startyr, $form->startmon, $form->startday, $form->starthr, $form->startmin);
if($form->duration == 1) {
$form->timeduration = make_timestamp($form->endyr, $form->endmon, $form->endday, $form->endhr, $form->endmin) - $form->timestart;
if($form->timeduration < 0) {
$form->timeduration = 0;
}
}
else if ($form->duration == 2) {
$form->timeduration = $form->minutes * MINSECS;
}
else {
$form->timeduration = 0;
}
if(!calendar_add_event_allowed($form)) {
error('You are not authorized to do this');
}
// validate form and set error if any.
validate_form($form, $err);
if (count($err) == 0) {
if (!calendar_add_event_allowed($form)) {
error('You are not authorized to do this');
}
$form->timemodified = time();
/// Get the event id for the log record.
@@ -568,11 +539,44 @@
function validate_form(&$form, &$err) {
$cleanform = new stdClass();
//first clean the form values
$cleanform->name = clean_param(strip_tags(trim($form->name), '<lang><span>'),PARAM_CLEAN);
$cleanform->description = addslashes(clean_param($form->description, PARAM_CLEANHTML));
$cleanform->duration = clean_param($form->duration, PARAM_INT);
$cleanform->startmon = clean_param($form->startmon, PARAM_INT);
$cleanform->startday = clean_param($form->startday, PARAM_INT);
$cleanform->startyr = clean_param($form->startyr, PARAM_INT);
$cleanform->starthr = clean_param($form->starthr, PARAM_INT);
$cleanform->startmin = clean_param($form->startmin, PARAM_INT);
$cleanform->endmon = clean_param($form->endmon, PARAM_INT);
$cleanform->endday = clean_param($form->endday, PARAM_INT);
$cleanform->endyr = clean_param($form->endyr, PARAM_INT);
$cleanform->endhr = clean_param($form->endhr, PARAM_INT);
$cleanform->endmin = clean_param($form->endmin, PARAM_INT);
$cleanform->minutes = clean_param($form->minutes, PARAM_INT);
$cleanform->courseid = clean_param($form->courseid, PARAM_INT);
$cleanform->format = clean_param($form->format, PARAM_INT);
$cleanform->course = clean_param($form->course, PARAM_INT);
$cleanform->action = clean_param($form->action, PARAM_ALPHA);
$form->name = trim($form->name);
$form->description = trim($form->description);
// These values are only required for new event.
if ($cleanform->action === 'new') {
$cleanform->repeat = clean_param($form->repeat, PARAM_INT);
$cleanform->repeats = clean_param($form->repeats, PARAM_INT);
$cleanform->groupid = clean_param($form->groupid, PARAM_INT);
$cleanform->userid = clean_param($form->userid, PARAM_INT);
$cleanform->modulename = clean_param($form->modulename, PARAM_SAFEDIR);
$cleanform->eventtype = clean_param($form->eventtype, PARAM_ALPHA);
$cleanform->instance = clean_param($form->instance, PARAM_INT);
$cleanform->type = clean_param($form->type, PARAM_ALPHA);
} else {
$cleanform->id = clean_param($form->id, PARAM_INT);
}
// set form with clean and valid values only.
$form = $cleanform;
if(empty($form->name)) {
if (empty($form->name)) {
$err['name'] = get_string('errornoeventname', 'calendar');
}
/* Allow events without a description
@@ -580,28 +584,53 @@ function validate_form(&$form, &$err) {
$err['description'] = get_string('errornodescription', 'calendar');
}
*/
if(!checkdate($form->startmon, $form->startday, $form->startyr)) {
if (!checkdate($form->startmon, $form->startday, $form->startyr)) {
$err['timestart'] = get_string('errorinvaliddate', 'calendar');
}
if($form->duration == 2 and !checkdate($form->endmon, $form->endday, $form->endyr)) {
if ($form->duration == 1 and !checkdate($form->endmon, $form->endday, $form->endyr)) {
$err['timeduration'] = get_string('errorinvaliddate', 'calendar');
}
if($form->duration == 2 and !($form->minutes > 0 and $form->minutes < 1000)) {
if ($form->duration == 2 and !($form->minutes > 0 and $form->minutes < 1000)) {
$err['minutes'] = get_string('errorinvalidminutes', 'calendar');
}
if (!empty($form->repeat) and !($form->repeats > 1 and $form->repeats < 100)) {
$err['repeats'] = get_string('errorinvalidrepeats', 'calendar');
}
if(!empty($form->courseid)) {
// set start time and duration
$form->timestart = make_timestamp($form->startyr, $form->startmon, $form->startday, $form->starthr, $form->startmin);
if ($form->duration == 1) {
$form->timeduration = make_timestamp($form->endyr, $form->endmon, $form->endday, $form->endhr, $form->endmin) - $form->timestart;
// Duration should be set for time in future.
if ($form->timeduration <= 0) {
$err['timeduration'] = get_string('errorinvaliddate', 'calendar');
$form->timeduration = 0;
}
}
else if ($form->duration == 2) {
$form->timeduration = $form->minutes * MINSECS;
}
else {
$form->timeduration = 0;
}
if (!empty($form->courseid)) {
// Timestamps must be >= course startdate
$course = get_record('course', 'id', $form->courseid);
if($course === false) {
if ($course === false) {
error('Event belongs to invalid course');
}
else if($form->timestart < $course->startdate) {
$err['timestart'] = get_string('errorbeforecoursestart', 'calendar');
}
}
if (!empty($form->modulename)) {
// Check that passed modulename actually exists (possible SQL Injection route)
$module = get_record('modules', 'name', $form->modulename);
if ($module === false) {
error('Invalid module name');
}
}
}
function calendar_add_event_allowed($event) {
+1
View File
@@ -1582,6 +1582,7 @@ function calendar_get_allowed_types(&$allowed) {
if(!empty($SESSION->cal_course_referer) && $SESSION->cal_course_referer != SITEID) {
$course = get_record('course', 'id', $SESSION->cal_course_referer);
$coursecontext = get_context_instance(CONTEXT_COURSE, $SESSION->cal_course_referer);
$allowed->user = has_capability('moodle/calendar:manageownentries', $coursecontext);
if(has_capability('moodle/calendar:manageentries', $coursecontext)) {
$allowed->courses = array($course->id => 1);
+1 -1
View File
@@ -539,7 +539,7 @@
$file = basename($file);
if (!unzip_file("$basedir$wdir/$file")) {
print_error("unzipfileserror","error");
print_error("cannotunzipfile", "error");
}
echo "<div style=\"text-align:center\"><form action=\"index.php\" method=\"get\">";
+1
View File
@@ -139,5 +139,6 @@ $string['wrongdestpath'] = 'Wrong destination path';
$string['wrongsourcebase'] = 'Wrong source URL base';
$string['wrongzipfilename'] = 'Wrong ZIP file name';
$string['youcannotdeletecategory'] = 'You cannot delete category \'$a\' because you can neither delete the contents, nor move them elsewhere.';
$string['zipfileserror'] = 'Cannot create zip file';
?>
+1 -1
View File
@@ -495,7 +495,7 @@
$file = basename($file);
if (!unzip_file("$basedir/$wdir/$file")) {
print_error("unzipfileserror","error");
print_error("cannotunzipfile", "error");
}
echo "<center><form action=\"coursefiles.php\" method=\"get\">\n";
+7 -2
View File
@@ -19,9 +19,14 @@ class MoodleQuickForm_password extends HTML_QuickForm_password{
if (empty($CFG->xmlstrictheaders)) {
// no standard mform in moodle should allow autocomplete of passwords
// this is valid attribute in html5, sorry, we have to ignore validation errors in legacy xhtml 1.0
$attributes = (array)$attributes;
if (!isset($attributes['autocomplete'])) {
if (empty($attributes)) {
$attributes = array('autocomplete'=>'off');
} else if (is_array($attributes)) {
$attributes['autocomplete'] = 'off';
} else {
if (strpos($attributes, 'autocomplete') === false) {
$attributes .= ' autocomplete="off" ';
}
}
}
+7 -2
View File
@@ -19,9 +19,14 @@ class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password {
if (empty($CFG->xmlstrictheaders)) {
// no standard mform in moodle should allow autocomplete of passwords
// this is valid attribute in html5, sorry, we have to ignore validation errors in legacy xhtml 1.0
$attributes = (array)$attributes;
if (!isset($attributes['autocomplete'])) {
if (empty($attributes)) {
$attributes = array('autocomplete'=>'off');
} else if (is_array($attributes)) {
$attributes['autocomplete'] = 'off';
} else {
if (strpos($attributes, 'autocomplete') === false) {
$attributes .= ' autocomplete="off" ';
}
}
}
+8 -3
View File
@@ -110,9 +110,14 @@ class moodleform {
if (empty($CFG->xmlstrictheaders)) {
// no standard mform in moodle should allow autocomplete with the exception of user signup
// this is valid attribute in html5, sorry, we have to ignore validation errors in legacy xhtml 1.0
$attributes = (array)$attributes;
if (!isset($attributes['autocomplete'])) {
if (empty($attributes)) {
$attributes = array('autocomplete'=>'off');
} else if (is_array($attributes)) {
$attributes['autocomplete'] = 'off';
} else {
if (strpos($attributes, 'autocomplete') === false) {
$attributes .= ' autocomplete="off" ';
}
}
}
@@ -1496,7 +1501,7 @@ function validate_' . $this->_formName . '(frm) {
} else if (is_a($element, 'HTML_QuickForm_hidden')) {
return array();
} else if (method_exists($element, 'getPrivateName')) {
} else if (method_exists($element, 'getPrivateName') && !($element instanceof HTML_QuickForm_advcheckbox)) {
return array($element->getPrivateName());
} else {
+24 -16
View File
@@ -2741,13 +2741,13 @@ function set_moodle_cookie($thing) {
return;
}
$cookiename = 'MOODLEID_'.$CFG->sessioncookie;
$cookiename = 'MOODLEID1_'.$CFG->sessioncookie;
$days = 60;
$seconds = DAYSECS*$days;
setCookie($cookiename, '', time() - HOURSECS, $CFG->sessioncookiepath, $CFG->sessioncookiedomain, $CFG->cookiesecure);
setCookie($cookiename, rc4encrypt($thing), time()+$seconds, $CFG->sessioncookiepath, $CFG->sessioncookiedomain, $CFG->cookiesecure);
setCookie($cookiename, rc4encrypt($thing, true), time()+$seconds, $CFG->sessioncookiepath, $CFG->sessioncookiedomain, $CFG->cookiesecure);
}
/**
@@ -2759,12 +2759,12 @@ function set_moodle_cookie($thing) {
function get_moodle_cookie() {
global $CFG;
$cookiename = 'MOODLEID_'.$CFG->sessioncookie;
$cookiename = 'MOODLEID1_'.$CFG->sessioncookie;
if (empty($_COOKIE[$cookiename])) {
return '';
} else {
$thing = rc4decrypt($_COOKIE[$cookiename]);
$thing = rc4decrypt($_COOKIE[$cookiename], true);
return ($thing == 'guest') ? '': $thing; // Ignore guest account
}
}
@@ -6024,25 +6024,33 @@ function get_list_of_currencies() {
/**
* rc4encrypt
*
* @param string $data ?
* @return string
* @todo Finish documenting this function
* @param string $data Data to encrypt.
* @param bool $usesecurekey Lets us know if we are using the old or new password.
* @return string The now encrypted data.
*/
function rc4encrypt($data) {
$password = get_site_identifier();
return endecrypt($password, $data, '');
function rc4encrypt($data, $usesecurekey = false) {
if (!$usesecurekey) {
$passwordkey = 'nfgjeingjk';
} else {
$passwordkey = get_site_identifier();
}
return endecrypt($passwordkey, $data, '');
}
/**
* rc4decrypt
*
* @param string $data ?
* @return string
* @todo Finish documenting this function
* @param string $data Data to decrypt.
* @param bool $usesecurekey Lets us know if we are using the old or new password.
* @return string The now decrypted data.
*/
function rc4decrypt($data) {
$password = get_site_identifier();
return endecrypt($password, $data, 'de');
function rc4decrypt($data, $usesecurekey = false) {
if (!$usesecurekey) {
$passwordkey = 'nfgjeingjk';
} else {
$passwordkey = get_site_identifier();
}
return endecrypt($passwordkey, $data, 'de');
}
/**
+14 -1
View File
@@ -60,6 +60,7 @@ if($mform->is_cancelled()) {
print_header_simple($data->name, '', $nav,
'', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')),
navmenu($course, $cm), '', '');
groups_print_activity_menu($cm, "$CFG->wwwroot/mod/data/export.php?d=$d");
print_heading(format_string($data->name));
// these are for the tab display
@@ -83,13 +84,25 @@ foreach($fields as $key => $field) {
$exportdata[0][] = $field->field->name;
}
}
$groupid = groups_get_activity_group($cm);
$datarecords = get_records('data_records', 'dataid', $data->id);
ksort($datarecords);
$line = 1;
foreach($datarecords as $record) {
// get content indexed by fieldid
if( $content = get_records('data_content', 'recordid', $record->id, 'fieldid', 'fieldid, content, content1, content2, content3, content4') ) {
if($groupid) {
$select = "SELECT c.fieldid, c.content, c.content1, c.content2, c.content3, c.content4
FROM {$CFG->prefix}data_content c, {$CFG->prefix}data_records r
WHERE c.recordid = $record->id
AND r.id = c.recordid
AND r.groupid = $groupid";
} else {
$select = "SELECT fieldid, content, content1, content2, content3, content4
FROM {$CFG->prefix}data_content
WHERE recordid = $record->id";
}
if( $content = get_records_sql($select) ) {
foreach($fields as $field) {
$contents = '';
if(isset($content[$field->field->id])) {
+7 -7
View File
@@ -297,19 +297,19 @@
//<![CDATA[
scorm_resize(<?php echo $scorm->width.", ". $scorm->height; ?>);
function openpopup(url,name,options,width,height) {
fullurl = "<?php echo $CFG->wwwroot.'/mod/scorm/' ?>" + url;
windowobj = window.open(fullurl,name,options);
if ((width==100) && (height==100)) {
// Fullscreen
windowobj.moveTo(0,0);
}
if (width<=100) {
width = Math.round(screen.availWidth * width / 100);
}
if (height<=100) {
height = Math.round(screen.availHeight * height / 100);
}
windowobj.resizeTo(width,height);
options += ",width="+width+",height="+height;
fullurl = "<?php echo $CFG->wwwroot.'/mod/scorm/' ?>" + url;
windowobj = window.open(fullurl,name,options);
if ((width==100) && (height==100)) {
// Fullscreen
windowobj.moveTo(0,0);
}
windowobj.focus();
return windowobj;
}
+3 -3
View File
@@ -571,9 +571,9 @@ class question_match_qtype extends default_questiontype {
//mappings in backup_ids to use them later where restoring states (user level).
//Get the match_sub from DB (by question, questiontext and answertext)
$db_match_sub = get_record ("question_match_sub","question",$new_question_id,
"questiontext",$match_sub->questiontext,
"answertext",$match_sub->answertext);
$db_match_sub = get_record('question_match_sub', 'question', $new_question_id,
sql_compare_text('questiontext', 255), $match_sub->questiontext,
'answertext', $match_sub->answertext);
//Do some output
if (($i+1) % 50 == 0) {
if (!defined('RESTORE_SILENTLY')) {
+2 -2
View File
@@ -6,10 +6,10 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
$version = 2007101591.10; // YYYYMMDD = date of the 1.9 branch (don't change)
$version = 2007101591.16; // YYYYMMDD = date of the 1.9 branch (don't change)
// X = release number 1.9.[0,1,2,3,4,5...]
// Y.YY = micro-increments between releases
$release = '1.9.16 (Build: 20120109)'; // Human-friendly version name
$release = '1.9.18 (Build: 20120514)'; // Human-friendly version name
?>