Changeset d2317ba in iPeer


Ignore:
Timestamp:
2012-12-24T22:16:52-08:00 (5 years ago)
Author:
Compass <pan.luo@…>
Branches:
3.1.x, dev, hotfix, master, pagodabox, ticket463
Children:
a269d57
Parents:
742d257
git-author:
Compass <pan.luo@…> (12/24/2012 10:13:24 PM)
git-committer:
Compass <pan.luo@…> (12/24/2012 10:16:52 PM)
Message:

Show all departments when instructor has no association

This will allow the instructors without faculty association to select
correct departments

Location:
app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • app/controllers/courses_controller.php

    r742d257 rd2317ba  
    206206                    $department['Department']['name'];
    207207            }
     208            // a hack for transition from 2.x
     209            // exisintg instructors may not get assigned to any department,
     210            // they have no way to assign course to department. So showing all
     211            // deparments for those who don't get any deparment
     212            if (empty($departments)) {
     213                $departments = $this->Course->Department->find('list');
     214            }
    208215            $this->set('departments', $departments);
    209216        }
  • app/views/courses/add.ctp

    r742d257 rd2317ba  
    11<?php
    22echo $this->Form->create('Course');
    3 echo $this->Form->input('course', array('after' => 'eg. APSC 201 001'));
    4 echo $this->Form->input('title', array('after' => 'eg. Technical Communication'));
    5 echo $this->Form->input('Instructor', array('selected' => $instructorSelected));
     3echo $this->Form->input('course', array('after' => ''));?>
     4<div class="help-text"><?php __('Course subjects and course numbers, e.g. APSC 201 001')?></div>
    65
    7 echo $this->Form->input(
     6<?php echo $this->Form->input('title');?>
     7<div class="help-text"><?php __('Course title, e.g. Technical Communication')?></div>
     8<?php echo $this->Form->input('Instructor', array('selected' => $instructorSelected));?>
     9<div class="help-text"><?php __('Holding "ctrl" or "command" key to select multiple instructors.')?></div>
     10
     11<?php echo $this->Form->input(
    812    'record_status',
    913    array(
     
    1317        'options' => $statusOptions,
    1418    )
    15 );
    16 echo $this->Form->input('Department', array('label' => __($this->Vocabulary->translate('Department'), true)));
    17 echo $this->Form->input('homepage', array('after' => 'eg. http://mycoursehome.com'));
    18 echo $this->Form->submit('Save');
     19);?>
     20
     21<?php echo $this->Form->input('Department', array(
     22    'label' => __($this->Vocabulary->translate('Department'), true),
     23));
     24?>
     25<div class="help-text"><?php __('Selecting correct assoication will allow admin to help troubleshooting.')?></div>
     26<?php echo $this->Form->input('homepage');?>
     27<div class="help-text"><?php __('e.g. http://mycoursehome.com')?></div>
     28
     29<?php echo $this->Form->submit('Save');
    1930echo $this->Form->end();
Note: See TracChangeset for help on using the changeset viewer.