###############
Known issues in this release
--missing labels for radio buttons in the admin's table listing tools that have been created. Better, in addition to the Label, make the table row toggle the radio.
-missing error message when a button is clicked in the admin table listing tools, when a tool radio has not been selected
- should the view button in the admin's tool listing table display the actual tool instead of the tool settings. Would be more useful I think, given clicking the edit button displays the same information. Or maybe display settings above, and open the tool below in a frame.
- when "allow frame height to change" setting is enabled, the frame hieght gets set to 0, effectively hiding the tool when added to a page
} else if (isset($_GET['delete'], $_GET['id'])) {
header('Location: tool/admin_delete.php?id='.$_GET['id']);
exit;
+} else if ($_GET['delete'] ||$_GET['edit'] || $_GET['view'] && !isset($_GET['id'])){
+ $msg->addError("NO_ITEM_SELECTED");
+
}
require (AT_INCLUDE_PATH.'header.inc.php');
<tbody>
<?php while($row = mysql_fetch_array($result)) { ?><tr>
<td><input type="radio" name="id" value="<?php echo $row['id']; ?>" id="m<?php echo $row['id']; ?>" /></td>
- <td><?php echo $row['title']; ?></td>
+ <td><label for="m<?php echo $row['id']; ?>"><?php echo $row['title']; ?></a></td>
<td><?php echo $row['toolid']; ?></td>
<td><?php echo $row['description']; ?></td>
<td><?php echo $row['cnt']; ?></td>
INSERT INTO `language_text` VALUES ('en', '_module','about_content_tools','Select from the available external tools, one that can be associated with this content page as a learning activity. Or, though Manage>IMS Basic LTI add your own external tools to make them available here.',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_BASICLTI_SAVED','External tool added as a Learning Activity for this content page.',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_BASICLTI_DELETED','External tool removed as a Learning Activity from this content page.',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_msgs','AT_CONFIRM_DELETE_TOOL_1','Are you sure you want to delete the tool <strong> %s</strong>.',NOW(),'');
\ No newline at end of file
require_once('forms.php');
+$_POST['form_basiclti'] = $addslashes($_POST['form_basiclti']);
+$_POST['title'] = $addslashes($_POST['title']);
+$_POST['toolid'] = $addslashes($_POST['toolid']);
+$_POST['description'] = $addslashes($_POST['description']);
+$_POST['toolurl'] = $addslashes($_POST['toolurl']);
+$_POST['resourcekey'] = $addslashes($_POST['resourcekey']);
+$_POST['password'] = $addslashes($_POST['password']);
+$_POST['preferheight'] = intval($_POST['preferheight']);
+$_POST['allowpreferheight'] = intval($_POST['allowpreferheight']);
+$_POST['launchinpopup'] = intval($_POST['launchinpopup']);
+$_POST['debuglaunch'] = intval($_POST['debuglaunch']);
+$_POST['sendname'] = intval($_POST['sendname']);
+$_POST['sendemailaddr'] = intval($_POST['sendemailaddr']);
+$_POST['acceptgrades'] = intval($_POST['acceptgrades']);
+$_POST['allowroster'] = intval($_POST['allowroster']);
+$_POST['allowsetting'] = intval($_POST['allowsetting']);
+$_POST['allowcustomparameters'] = intval($_POST['allowcustomparameters']);
+$_POST['customparameters'] = $addslashes($_POST['customparameters']);
+$_POST['organizationid'] = $addslashes($_POST['organizationid']);
+$_POST['organizationurl'] = $addslashes($_POST['organizationurl']);
+$_POST['organizationdescr'] = $addslashes($_POST['organizationdescr']);
+$_POST['submit'] = $addslashes($_POST['submit']);
+
+
if (isset($_POST['cancel'])) {
$msg->addFeedback('CANCELLED');
header('Location: '.AT_BASE_HREF.'mods/basiclti/index_admin.php');
$result = mysql_query($sql, $db) or die(mysql_error());
write_to_log(AT_ADMIN_LOG_INSERT, 'basiclti_create', mysql_affected_rows($db), $sql);
$msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+
+
header('Location: '.AT_BASE_HREF.'mods/basiclti/index_admin.php');
exit;
}
$msg->addFeedback('CANCELLED');
header('Location: ../index_admin.php');
exit;
-} else if (isset($_POST['step']) && ($_POST['step'] == 2) && isset($_POST['submit_yes'])) {
+} else if (isset($_POST['submit_yes'])) {
$sql = "DELETE FROM ".TABLE_PREFIX."basiclti_tools WHERE id = ".$tool.";";
$result = mysql_query($sql, $db) or die(mysql_error());
write_to_log(AT_ADMIN_LOG_DELETE, 'basiclti_delete', mysql_affected_rows($db), $sql);
require(AT_INCLUDE_PATH.'header.inc.php');
if (!isset($_POST['step'])) {
- $hidden_vars['step'] = 1;
+ $hidden_vars['step'] = 2;
$hidden_vars['id'] = $tool;
$msg->addConfirm(array('DELETE_TOOL_1', $row['title']), $hidden_vars);
$msg->printConfirm();
-} else if ($_POST['step'] == 1) {
+}
+/*
+
+else if ($_POST['step'] == 1) {
$hidden_vars['step'] = 2;
$hidden_vars['id'] = $tool;
$msg->addConfirm(array('DELETE_TOOL_2', $row['title']), $hidden_vars);
$msg->printConfirm();
-}
+}*/
require(AT_INCLUDE_PATH.'footer.inc.php');
$blti_instructor_form = array(
'title:text:label=bl_title:required=true:size=25',
- 'toolid:id:label=bl_toolid:required=true:size=16',
+ 'toolid:id:label=bl_toolid:required=true:size=16',
'description:textarea:label=bl_description:required=true:rows=2:cols=25',
'toolurl:url:label=bl_toolurl:required=true:size=80',
'resourcekey:text:label=bl_resourcekey:required=true:size=80',
'password:text:required=true:label=bl_password:size=80',
'preferheight:integer:label=bl_preferheight:size=80',
- 'preferheight:radio:label=bl_allowpreferheight:choices=off,on',
+ 'allowpreferheight:radio:label=bl_allowpreferheight:choices=off,on',
'launchinpopup:radio:label=bl_launchinpopup:choices=off,on,content',
'debuglaunch:radio:label=bl_debuglaunch:choices=off,on,content',
'sendname:radio:label=bl_sendname:choices=off,on,content',
'acceptgrades:radio:label=bl_acceptgrades:choices=off,on',
'allowroster:radio:label=bl_allowroster:choices=off,on,content',
'allowsetting:radio:label=bl_allowsetting:choices=off,on,content',
- 'allowcustomparameters:radio:label=bl_allowcustomparameters:choices=off,on',
+ 'allowcustomparameters:radio:label=bl_allowcustomparameters:choices=off,on',
'customparameters:textarea:label=bl_customparameters:rows=5:cols=25',
);