Preparing alpha 3 - When selected the type of component doesn't stay selected - CT#968

skala
Guillaume Viguier 15 years ago
parent 5671ee6248
commit e67fae6fd3
  1. 3
      main/gradebook/gradebook_add_link.php
  2. 5
      main/gradebook/lib/fe/linkaddeditform.class.php

@ -24,7 +24,8 @@ $typeform = new LinkForm(LinkForm :: TYPE_CREATE,
null,
api_get_self() . '?selectcat=' . Security::remove_XSS($_GET['selectcat'])
. '&newtypeselected=' . (isset($_GET['typeselected']) ? Security::remove_XSS($_GET['typeselected']) : '')
. '&course_code=' . (empty($_GET['course_code'])?'':Security::remove_XSS($_GET['course_code'])))
. '&course_code=' . (empty($_GET['course_code'])?'':Security::remove_XSS($_GET['course_code'])),
$_GET['typeselected'])
;
// if user selected a link type

@ -59,8 +59,9 @@ class LinkAddEditForm extends FormValidator
$select = $this->addElement('select',
'select_link',
get_lang('ChooseItem'));
foreach ($link->get_all_links() as $newlink)
foreach ($link->get_all_links() as $newlink) {
$select->addoption($newlink[1],$newlink[0]);
}
}
} else {
$this->addElement('static',
@ -126,4 +127,4 @@ class LinkAddEditForm extends FormValidator
$this->setDefaults($defaults);
}
}
}

Loading…
Cancel
Save