-
Notifications
You must be signed in to change notification settings - Fork 2
/
config_instance.html
36 lines (35 loc) · 1.22 KB
/
config_instance.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
global $CFG;
$lib = $CFG->dirroot . '/mod/wwassignment/locallib.php';
?>
<table cellpadding="9" cellspacing="0" align="center">
<?php if(!file_exists($lib)) { ?>
<tr valign="top">
<td align="center">
<?php echo '<strong>'.get_string('config_wwassigment_mod_missing','block_wwlink').'</strong>'; ?>
</td>
</tr>
<?php } else { ?>
<tr valign="top">
<td align="right">
<?php print_string('config_select_webwork_course', 'block_wwlink'); ?>
</td>
<td align="center">
<?php
require_once($lib);
$client = new wwassignment_client();
$options = $client->options_course(true);
choose_from_menu($options,'webwork_link_id',empty($this->config->webwork_link_id) ? 0 : $this->config->webwork_link_id);
global $COURSE;
$courseid = $COURSE->id;
?>
<input type="hidden" name="courseid" value="<?php echo $courseid;?>" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="<?php print_string('savechanges') ?>" />
</td>
</tr>
<?php } ?>
</table>