mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Half the work done for bug 1330:
Now when creating events you don't select a course, the current course is selected implicitly.
This commit is contained in:
parent
8c54cec650
commit
e4bbaab3c3
2 changed files with 7 additions and 14 deletions
|
@ -381,7 +381,7 @@
|
||||||
print_side_block_start(get_string('newevent', 'calendar').$header, '', 'mycalendar');
|
print_side_block_start(get_string('newevent', 'calendar').$header, '', 'mycalendar');
|
||||||
if($_REQUEST['type'] == 'select') {
|
if($_REQUEST['type'] == 'select') {
|
||||||
optional_variable($_REQUEST['groupid']);
|
optional_variable($_REQUEST['groupid']);
|
||||||
optional_variable($_REQUEST['courseid']);
|
optional_variable($_REQUEST['courseid'], $SESSION->cal_course_referer);
|
||||||
$groupid = $_REQUEST['groupid'];
|
$groupid = $_REQUEST['groupid'];
|
||||||
$courseid = $_REQUEST['courseid'];
|
$courseid = $_REQUEST['courseid'];
|
||||||
include('event_select.html');
|
include('event_select.html');
|
||||||
|
|
|
@ -20,18 +20,11 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if(!empty($allowed->courses)) { ?><p><input type='radio' name='type' value='course' id='type_course' /><label for='type_course'><?php print_string('typecourse', 'calendar') ?></label></p>
|
<?php if(!empty($allowed->courses)) { ?>
|
||||||
<div style="padding-left: 1.5em;">
|
<p><input type='radio' name='type' value='course' id='type_course' /><input type="hidden" name="courseid" value="<?php echo($courseid) ?>" /><label for='type_course'><?php print_string('typecourse', 'calendar') ?></label></p>
|
||||||
<?php print_string('course'); ?>:
|
|
||||||
<select name='courseid'>
|
|
||||||
<option value=''></option>
|
|
||||||
<?php foreach($allowed->courses as $course) {?>
|
|
||||||
<option value='<?php echo $course->id?>' <?php if($course->id == $courseid) echo 'selected="selected"';?>><?php echo $course->shortname.' - '.$course->fullname?></option>
|
|
||||||
<?php }?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if(!empty($allowed->site)) { ?><p><input type='radio' name='type' value='site' id='type_site' /><label for='type_site'><?php print_string('typesite', 'calendar') ?></label></p>
|
<?php if(!empty($allowed->site)) { ?>
|
||||||
|
<p><input type='radio' name='type' value='site' id='type_site' /><label for='type_site'><?php print_string('typesite', 'calendar') ?></label></p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue