Changeset 5790ff5 in iPeer


Ignore:
Timestamp:
2013-01-04T13:37:55-08:00 (6 years ago)
Author:
Compass <pan.luo@…>
Branches:
3.1.x, dev, master, ticket463
Children:
23d46ea
Parents:
80cda51 (diff), baf8708 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'hotfix' into dev

Conflicts:

app/views/groups/edit.ctp
app/views/users/add.ctp

Location:
app
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • app/controllers/components/evaluation.php

    r80cda51 r5790ff5  
    683683     * @param mixed $event        event
    684684     * @param mixed $groupMembers group members
    685      *
    686      * @access public
    687      * @return void
    688      */
    689     function getRubricResultDetail($event, $groupMembers)
     685     * @param mixed $rubric       rubric with criteria
     686     *
     687     * @access public
     688     * @return void
     689     */
     690    function getRubricResultDetail($event, $groupMembers, $rubric)
    690691    {
    691692        $pos = 0;
     
    766767            }
    767768        }
    768         $rubricResultDetail['scoreRecords'] =  $this->formatRubricEvaluationResultsMatrix($groupMembers, $evalResult);
     769        $rubricResultDetail['scoreRecords'] =  $this->formatRubricEvaluationResultsMatrix($groupMembers, $evalResult, $rubric);
    769770        $rubricResultDetail['allMembersCompleted'] = $allMembersCompleted;
    770771        $rubricResultDetail['inCompletedMembers'] = $inCompletedMembers;
     
    821822     * @param mixed $groupMembers group members
    822823     * @param mixed $evalResult   evel result
    823      *
    824      * @access public
    825      * @return void
    826      */
    827     function formatRubricEvaluationResultsMatrix($groupMembers, $evalResult)
     824     * @param mixed $rubric       rubric with critieria
     825     *
     826     * @access public
     827     * @return void
     828     */
     829    function formatRubricEvaluationResultsMatrix($groupMembers, $evalResult, $rubric)
    828830    {
    829831        //
     
    868870                    }
    869871                }
     872                //Get Ave Criteria Grade
     873                foreach ($rubricCriteria as $criIndex => $criGrade) {
     874                    if (!isset($groupCriteriaAve[$criIndex])) {
     875                        $groupCriteriaAve[$criIndex] = 0;
     876                    }
     877                    $ave = $criGrade / $detailPOS;
     878                    $rubricCriteria[$criIndex] = $ave;
     879                    $groupCriteriaAve[$criIndex]+= $ave;
     880                }
    870881            } else {
    871                 foreach ($groupMembers as $user) {
    872                     if (isset($user['User'])) {
    873                         $user = $user['User'];
    874                     }
    875                     $matrix[$index][$user['id']] = 'n/a';
    876                 }
    877             }
    878             //Get Ave Criteria Grade
    879             foreach ($rubricCriteria as $criIndex => $criGrade) {
    880                 if (!isset($groupCriteriaAve[$criIndex])) {
    881                     $groupCriteriaAve[$criIndex] = 0;
    882                 }
    883                 $ave = $criGrade / $detailPOS;
    884                 $rubricCriteria[$criIndex] = $ave;
    885                 $groupCriteriaAve[$criIndex]+= $ave;
     882                // no result for this person
     883                $matrix[$index]['grade_released'] = 0;
     884                $matrix[$index]['comment_released'] = 0;
     885                foreach ($rubric['RubricsCriteria'] as $criteria) {
     886                    $rubricCriteria[$criteria['criteria_num']] = 'N/A';
     887                }
    886888            }
    887889            $matrix[$index]['rubric_criteria_ave'] = $rubricCriteria;
     
    10081010            $this->User->recursive = -1;
    10091011            $user = $this->User->read();
    1010             $rubricResultDetail = $this->getRubricResultDetail($event, $user);
    10111012            $groupMembers = $this->GroupsMembers->getEventGroupMembers(
    10121013                $event['Group']['id'], $event['Event']['self_eval'], $userId);
    10131014            $groupMembersNoTutors = $this->GroupsMembers->getEventGroupMembersNoTutors(
    10141015                $event['Group']['id'], $event['Event']['self_eval'], $userId);
    1015             $rubricResultDetail = $this->getRubricResultDetail($event, $user);
     1016            $rubricResultDetail = $this->getRubricResultDetail($event, $user, $rubric);
    10161017            $membersAry = array();
    10171018            $membersAryNoTutors = array();
     
    10681069            );
    10691070            $groupMembersNoTutors = $this->GroupsMembers->getEventGroupMembersNoTutors($event['Group']['id'], $event['Event']['self_eval'], $userId);
    1070             $rubricResultDetail = $this->getRubricResultDetail($event, $groupMembersNoTutors);
     1071            $rubricResultDetail = $this->getRubricResultDetail($event, $groupMembersNoTutors, $rubric);
    10711072            $result['groupMembers'] = $groupMembers;
    10721073            $result['groupMembersNoTutors'] = $groupMembersNoTutors;
    10731074        }
    10741075
    1075         //Get Detail information on Rubric score
    1076         if ($displayFormat == 'Detail') {
    1077             $rubricCriteria = $this->RubricsCriteria->getCriteria($rubric['Rubric']['id']);
    1078             $result['rubricCriteria'] = $rubricCriteria;
    1079         }
    10801076        $gradeReleaseStatus = $this->EvaluationRubric->getTeamReleaseStatus($event['GroupEvent']['id']);
    10811077        $result['allMembersCompleted'] = $rubricResultDetail['allMembersCompleted'];
     
    16951691            $evaluationSubmission['EvaluationSubmission']['date_submitted'] = date('Y-m-d H:i:s');
    16961692        }
    1697         $surveyInput=array();
     1693        $surveyInput = array();
    16981694        $surveyInput['SurveyInput']['user_id'] = $userId;
    16991695        $surveyInput['SurveyInput']['event_id'] = $eventId;
    17001696        $successfullySaved = true;
    1701         $j = 0;
    17021697        $surveyQuestion = new SurveyQuestion();
    17031698        $questions = $surveyQuestion->getQuestionsByEventId($eventId);
    17041699
    1705         //for ($i=1; $i<=$params['form']['question_count']; $i++) {
    17061700        foreach ($questions as $i => $question) {
    17071701            $this->SurveyInput = new SurveyInput;
    1708             //Set survey and user id
    1709             $surveyInput[$i+$j]['SurveyInput']['user_id'] = $userId;
    1710             $surveyInput[$i+$j]['SurveyInput']['event_id'] = $eventId;
    1711             //Set question Id
    17121702            $questionId = $question['SurveyQuestion']['question_id'];
    1713             $questionType = $this->Question->getTypeById($questionId);
    1714             $surveyInput[$i+$j]['SurveyInput']['question_id'] = $questionId;
    1715 
    1716             // not answers entered
    1717             if (!isset($params['form']['answer_'.$questionId])) {
    1718                 continue;
    1719             }
    1720             //Set answers
     1703            $questionType = $this->Question->field('type',
     1704                array('id' => $questionId));
     1705            // First, remove all prior responses, this deals with the edge
     1706            // case where the user decides to change a previously answered
     1707            // question to blank
     1708            $this->SurveyInput->deleteAll(
     1709                array(
     1710                    'user_id' => $userId,
     1711                    'question_id' => $questionId
     1712                )
     1713            );
     1714            //Set answer
    17211715            $answer = $params['form']['answer_'.$questionId];
    17221716            if ('C' == $questionType) {
    1723                 foreach ($answer as $data) {
    1724                     $modAnswer = $this->Response->find('first', array('conditions' => array('Response.id' => $data)));
    1725                     $surveyInput[$i+$j]['SurveyInput']['response_text']=$modAnswer['Response']['response'];
    1726                     $responseId = $data;
    1727                     $surveyInput[$i+$j]['SurveyInput']['response_id']=$responseId;
    1728                     $surveyInput[$i+$j]['SurveyInput']['chkbx_id']=$j;
    1729                     $this->SurveyInput->recursive = 0;
    1730                     $surveyInputId = $this->SurveyInput->find('first', array(
    1731                         'conditions' => array('SurveyInput.event_id' => $eventId,
    1732                             'SurveyInput.user_id' => $userId,
    1733                             'SurveyInput.question_id' => $questionId,
    1734                             'SurveyInput.chkbx_id' => $j),
    1735                         'fields' => array('SurveyInput.id')
    1736                     ));
    1737                     if ($surveyInputId) {
    1738                         $surveyInput[$i+$j]['SurveyInput']['id'] = $surveyInputId['SurveyInput']['id'];
    1739                     }
    1740                     // Save data
    1741                     if (!$this->SurveyInput->save($surveyInput[$i+$j]['SurveyInput'])) {
    1742                         $successfullySaved=false;
    1743                     }
    1744                     $j++;
    1745                     /*if ($j == count($answer)) {
    1746                         $i++;
    1747                     }*/
    1748                     $this->SurveyInput = new SurveyInput;
    1749                     //Set survey and user id
    1750                     $surveyInput[$i+$j]['SurveyInput']['user_id'] = $userId;
    1751                     $surveyInput[$i+$j]['SurveyInput']['event_id'] = $eventId;
    1752                     //Set question Id
    1753                     $questionId = $params['form']['question_id'.$question['SurveyQuestion']['number']];
    1754                     $surveyInput[$i+$j]['SurveyInput']['question_id'] = $questionId;
    1755                     //Set answers
    1756                     $answer = $params['form']['answer_'.$questionId];
    1757                 }
    1758             }
    1759 
    1760             if ('M' == $questionType) {
    1761                 $modAnswer = $this->Response->find('first', array('conditions' => array('Response.id' => $answer)));
     1717                // We are saving a "Choose any of", which means multiple answers
     1718                // Save the new responses
     1719                $surveyInputs = array();
     1720                foreach ($answer as $respId) {
     1721                    $tmp = array();
     1722                    // First get data on the choice the user picked
     1723                    $choice = $this->Response->find('first',
     1724                        array('conditions' => array('Response.id' => $respId)));
     1725                    // Tailor a data entry for SurveyInput's saveAll function
     1726                    $tmp['response_text'] = $choice['Response']['response'];
     1727                    $tmp['response_id'] = $respId;
     1728                    $tmp['question_id'] = $questionId;
     1729                    $tmp['user_id'] = $userId;
     1730                    $tmp['event_id'] = $eventId;
     1731                    $surveyInputs[]['SurveyInput'] = $tmp;
     1732                }
     1733                if (!$this->SurveyInput->saveAll($surveyInputs)) {
     1734                    $successfullySaved = false;
     1735                }
     1736            }
     1737            else if ('M' == $questionType) {
     1738                // We are saving a multiple choice question, only 1 answer
     1739                $choice = $this->Response->find('first',
     1740                    array('conditions' => array('Response.id' => $answer)));
     1741                $tmp = array();
     1742                $tmp['response_text'] = $choice['Response']['response'];
     1743                $tmp['response_id'] = $answer;
     1744                $tmp['question_id'] = $questionId;
     1745                $tmp['user_id'] = $userId;
     1746                $tmp['event_id'] = $eventId;
     1747                $surveyInputs = array('SurveyInput' => $tmp);
     1748                if (!$this->SurveyInput->save($surveyInputs)) {
     1749                    $successfullySaved = false;
     1750                }
    17621751            } else {
    1763                 $modAnswer['Response']['response'] = $answer;
    1764             }
    1765             $surveyInput[$i+$j]['SurveyInput']['response_text']=$modAnswer['Response']['response'];
    1766             //Set response_id
    1767             $responseId = $params['form']['answer_'.$questionId];
    1768             $surveyInput[$i+$j]['SurveyInput']['response_id']=$responseId;
    1769             //Check SurveyInput existed
    1770             $this->SurveyInput->recursive = 0;
    1771             $surveyInputId = $this->SurveyInput->find('first', array(
    1772                     'conditions' => array('SurveyInput.event_id' => $eventId,
    1773                     'SurveyInput.user_id' => $userId,
    1774                     'SurveyInput.question_id' => $questionId),
    1775                 'fields' => array('SurveyInput.id')
    1776             ));
    1777             if ($surveyInputId) {
    1778                 $surveyInput[$i+$j]['SurveyInput']['id'] = $surveyInputId['SurveyInput']['id'];
    1779             }
    1780             //Save data
    1781             if (!$this->SurveyInput->save($surveyInput[$i+$j]['SurveyInput'])) {
    1782                 $successfullySaved=false;
     1752                // Saving a short or long answer question.
     1753                $tmp = array();
     1754                $tmp['response_text'] = $answer;
     1755                $tmp['question_id'] = $questionId;
     1756                $tmp['user_id'] = $userId;
     1757                $tmp['event_id'] = $eventId;
     1758                $surveyInputs = array('SurveyInput' => $tmp);
     1759                if (!$this->SurveyInput->save($surveyInputs)) {
     1760                    $successfullySaved = false;
     1761                }
    17831762            }
    17841763        }
  • app/controllers/evaluations_controller.php

    r80cda51 r5790ff5  
    13301330        }
    13311331
    1332         $tok = strtok($param, ';');
    1333         $eventId = $tok;
    1334         $groupId =  strtok(';');
    1335         $evaluateeId =  strtok(';');
    1336         $groupEventId = strtok(';');
    1337         $releaseStatus = strtok(';');
    1338 
    1339         $courseId = $this->Event->getCourseByEventId($eventId);
    1340 
    1341         $course = $this->Course->getAccessibleCourseById($courseId, User::get('id'), User::getCourseFilterPermission());
    1342         if (!$course) {
    1343             $this->Session->setFlash(__('Error: Course does not exist or you do not have permission to view this course.', true));
    1344             $this->redirect('index');
    1345         }
    1346 
    13471332        $this->autoRender = false;
    13481333        if ($param !=null) {
     
    13531338        }
    13541339
    1355         $this->Event->id = $eventId;
    1356         $event = $this->Event->read();
    1357 
     1340        // Check whether the event exists or user has permission to access it
     1341        if (!($event = $this->Event->getAccessibleEventById($eventId, User::get('id'), User::getCourseFilterPermission(), array()))) {
     1342            $this->Session->setFlash(__('Error: That event does not exist or you dont have access to it', true));
     1343            $this->redirect('index');
     1344            return;
     1345        }
    13581346
    13591347        switch ($event['Event']['event_template_type_id']) {
  • app/controllers/surveys_controller.php

    r80cda51 r5790ff5  
    473473  function removeQuestion($survey_id, $question_id)
    474474  {
    475       $this->autoRender = false;
    476 
    477475      // move question to bottom of survey list so deletion can be done
    478476      // without affecting the number order
     
    482480      // references to the question in the responses and questions tables
    483481      $this->Survey->habtmDelete('Question', $survey_id, $question_id);
    484       //$this->Question->editCleanUp($question_id);
     482      // for some reason, habtmDelete does not remove the question's entry
     483      // in the Question model, so doing it here as a quick fix
     484      $this->Question->delete($question_id);
    485485
    486486      $this->Session->setFlash(__('The question was removed successfully.', true), 'good');
     
    506506          $this->set('responses', $this->data['Response']);
    507507      } elseif (!empty($this->params['data']['Question'])) {
    508           //$maxQuestionNum = $this->SurveyQuestion->getMaxSurveyQuestionNumber($this->data['Survey']['id']);
    509           //$this->data['number'] = $maxQuestionNum+1;
     508          // Strip ID from responses or the original master question will
     509          // lose its responses. We want a copy, not the original.
     510          if (isset($this->data['Response'])) {
     511              foreach($this->data['Response'] as &$response) {
     512                  unset($response['id']);
     513              }
     514          }
     515
    510516          if ($this->Question->saveAll($this->data)) {
    511517              $this->Session->setFlash(__('The question was added successfully.', true), 'good');
     
    517523          } else {
    518524              $this->set('responses', $this->data['Response']);
    519               $this->render('editQuestion');
     525              $this->Session->setFlash(_('Failed to save question.'));
    520526          }
    521527      } else {
     
    523529      }
    524530
    525       $this->autorender = false;
    526531      $this->set('templates', $this->Question->find('list', array('conditions' => array('master' => 'yes'))));
    527532      $this->set('survey_id', $survey_id);
  • app/views/evaluations/view_rubric_evaluation_results_detail.ctp

    r80cda51 r5790ff5  
    1818    <input type="hidden" name="display_format" value="Detail" />
    1919<table class="standardtable">
    20     <?php echo $html->tableHeaders($this->Evaluation->getRubricSummaryTableHeader($rubric['Rubric']['total_marks'],$rubricCriteria));?>
     20    <?php echo $html->tableHeaders($this->Evaluation->getRubricSummaryTableHeader($rubric['Rubric']['total_marks'], $rubricCriteria));?>
    2121    <?php echo $html->tableCells($this->Evaluation->getRubricSummaryTable($summaryMembers, $scoreRecords, $memberScoreSummary, $penalties, $rubric['Rubric']['total_marks'])); ?>
    2222    <tr align="center"><td colspan="<?php echo $rubric['Rubric']['criteria']+2; ?>">
  • app/views/evaluations/view_simple_evaluation_results.ctp

    r80cda51 r5790ff5  
    291291    $user = $row['User'];
    292292    echo '<h3>Evaluator: '.$user['full_name'].'</h3>';
    293     $headers = array(__('Evaluatee', true), __('Comment', true),
    294         __('Released', true));
     293    $headers = array(
     294        __('Evaluatee', true),
     295        __('Comment', true),
     296        __('Released', true)
     297    );
    295298    echo "<table class='standardtable'>";
    296299    echo $html->tableHeaders($headers);
    297300    $comments = array();
    298301    $i = 0;
    299     foreach($evalResult[$user['id']] AS $row ) {
     302    foreach ($evalResult[$user['id']] as $row) {
    300303        // We need to skip self-evaluation results
    301304        if (($groupMembersNoTutors[$i]['User']['id']==$user['id']) && (!$event['Event']['self_eval'])) {
     
    307310        echo '<tr>';
    308311        if (isset($evalMark)) {
    309             echo '<td>'.$evaluatee['full_name'].'</td>';
     312            echo '<td width="15%">'.$evaluatee['full_name'].'</td>';
    310313            echo '<td>';
    311314            echo (isset($evalMark['comment']))? $evalMark['comment'] : __('No Comments', true);
    312315            echo '</td>' ;
    313             if ($evalMark['release_status'] == 1) { // made explicit comparison with 1
    314                 echo '<td>' . '<input type="checkbox" name="release' .  $evalMark['evaluator']  . '[]" value="' . $evalMark['evaluatee'] . '" checked />';
    315             } else {
    316                 echo '<td>' . '<input type="checkbox" name="release' .  $evalMark['evaluator']  . '[]" value="' . $evalMark['evaluatee'] . '" />';
    317             }
     316            $checked = $evalMark['release_status'] == 1 ? 'checked' : '';
     317            // made explicit comparison with 1
     318            echo '<td width="5%">' . '<input type="checkbox" name="release' .  $evalMark['evaluator']  . '[]" value="' . $evalMark['evaluatee'] . '" '.$checked.'/>';
    318319            echo '<input type="hidden" name="evaluator_ids[]" value="' .  $evalMark['evaluator']  . '" /></td>';
    319320        } else {
     
    328329<input type="hidden" name="event_id" value="<?php echo $event['Event']['id']?>" />
    329330<input type="hidden" name="group_id" value="<?php echo $event['Group']['id']?>" />
    330 <input type="hidden" name="course_id" value="<?php echo $event['Event']['course_id']?>" />
    331331<input type="hidden" name="group_event_id" value="<?php echo $event['GroupEvent']['id']?>" />
    332332<input type="submit" name="submit" value="<?php __('Save Changes')?>" />
  • app/views/groups/edit.ctp

    r80cda51 r5790ff5  
    22<?php $readonly = isset($readonly) ? $readonly : false;?>
    33<?php $status = (isset($submissions) && $submissions > 0 && !User::hasPermission('functions/superadmin')) ? 'disabled' : '';?>
     4<?php $id = $this->action == 'add' ? $course_id : $group_id; ?>
    45
    56<div class="content-container">
     
    78echo $this->Form->create('Group',
    89    array('id' => 'frm',
    9     'url' => array('action' => $this->action.'/'.$group_id),
     10    'url' => array('action' => $this->action.'/'.$id),
    1011));
    1112echo isset($group_id) ? $this->Form->hidden('Group.id', array('value' => $group_id)):'';
  • app/views/helpers/evaluation.php

    r80cda51 r5790ff5  
    11<?php
    2 function array_avg($arr) {
     2/**
     3 * array_avg calculate the average of the numbers in an array
     4 *
     5 * @param mixed $arr
     6 *
     7 * @access public
     8 * @return the average of the array
     9 */
     10function array_avg($arr)
     11{
    312    if (empty($arr)) {
    413        return 0;
     
    1221}
    1322
    14 class EvaluationHelper extends AppHelper {
     23class EvaluationHelper extends AppHelper
     24{
    1525    public $helpers = array('Html');
    1626    public $color = array("#FF3366","#ff66ff","#66ccff","#66ff66","#ff3333","#00ccff","#ffff33");
     
    7282            }
    7383        }
    74         $tr[] = $totalCounter ? number_format($totalScore/$totalCounter,2) : __('N/A', true);
     84        $tr[] = $totalCounter ? number_format($totalScore/$totalCounter, 2) : __('N/A', true);
    7585        $table[] = $tr;
    7686
     
    8898    }
    8999
    90     function getRubricSummaryTable($memberList, $scores, $scoreSummary, $penalties, $total) {
     100    /**
     101     * getRubricSummaryTable
     102     *
     103     * @param mixed $memberList   list of members as id => name
     104     * @param mixed $scores       scores
     105     * @param mixed $scoreSummary score summary
     106     * @param mixed $penalties    penalties
     107     * @param mixed $total        total
     108     *
     109     * @access public
     110     * @return array for generate summary table
     111     */
     112    function getRubricSummaryTable($memberList, $scores, $scoreSummary, $penalties, $total)
     113    {
    91114        $average = array_pop($scores);
    92115        $totalAve = 0;
    93116        $numMembers = 0;
    94117        $table = array();
    95         foreach($scores as $userId => $score) {
     118        foreach ($scores as $userId => $score) {
    96119            $user = array();
    97120            $user[] = $memberList[$userId];
    98             foreach($score['rubric_criteria_ave'] as $key => $criterion) {
    99                 $user[] = isset($criterion) ? number_format($criterion,2) : 'N/A';
     121            foreach ($score['rubric_criteria_ave'] as $criterion) {
     122                $user[] = is_numeric($criterion) ? number_format($criterion, 2) : 'N/A';
    100123            }
    101124
     
    104127                $totalAve += 0;
    105128            } else if ($penalties[$userId] > 0) {
    106                 $penalty = number_format($penalties[$userId]/100 * $scoreSummary[$userId]['received_ave_score'],2);
    107                 $diff = number_format($scoreSummary[$userId]['received_ave_score'] - $penalty,2);
     129                $penalty = number_format($penalties[$userId]/100 * $scoreSummary[$userId]['received_ave_score'], 2);
     130                $diff = number_format($scoreSummary[$userId]['received_ave_score'] - $penalty, 2);
    108131                $user[] = sprintf('%.2f - <font color="red">%.2f</font> = %.2f (%.2f%%)',
    109                     number_format($scoreSummary[$userId]['received_ave_score'],2), $penalty, $diff, number_format($diff/$total*100,2));
     132                    number_format($scoreSummary[$userId]['received_ave_score'], 2), $penalty, $diff, number_format($diff/$total*100, 2));
    110133                $totalAve += $diff;
    111134            } else {
    112                 $user[] = sprintf('%.2f (%.2f%%)',$scoreSummary[$userId]['received_ave_score'],$scoreSummary[$userId]['received_ave_score']/$total*100);
     135                $user[] = sprintf('%.2f (%.2f%%)', $scoreSummary[$userId]['received_ave_score'], $scoreSummary[$userId]['received_ave_score']/$total*100);
    113136                $totalAve += $scoreSummary[$userId]['received_ave_score'];
    114137            }
     
    118141        $user = array();
    119142        $user[] = __('Group Average', true);
    120         foreach($average as $ave) {
     143        foreach ($average as $ave) {
    121144            $user[] = number_format($ave, 2);
    122145        }
    123         $user[] = number_format($totalAve/$numMembers,2);
     146        $user[] = number_format($totalAve/$numMembers, 2);
    124147        $table[] = $user;
     148
    125149        return $table;
    126150    }
     
    129153    {
    130154        $header = array(__('Evaluator', true));
    131         foreach($questions as $key => $question) {
     155        foreach ($questions as $key => $question) {
    132156            $header[] = sprintf('%d.%s', $key+1, $question['MixevalsQuestion']['title']);
    133157        }
     
    140164     * Returning the data array for mixeval result table
    141165     *
    142      * @param mixed $memberResult
    143      * @param mixed $memberList
    144      * @param mixed $questions
    145      * @param mixed $penalties
     166     * @param mixed $memberResult member result
     167     * @param mixed $memberList   member list
     168     * @param mixed $questions    questions
    146169     *
    147170     * @access public
  • app/views/users/add.ctp

    r80cda51 r5790ff5  
    2525if (User::hasPermission('functions/user/admin', 'create')) {
    2626    echo $this->Form->input('Faculty',
    27         array('label' => 'Faculty<br>(instructor/admin only)'));
     27        array('label' => 'Faculty (admins & instructors)'));
    2828}
    2929echo $this->Form->input('title');
  • app/views/users/edit.ctp

    r80cda51 r5790ff5  
    6464jQuery('#RoleRolesUserRoleId').change(function() {
    6565    var str = jQuery('#RoleRolesUserRoleId option:selected').text();
    66     if (str == 'admin') {
     66    if (str == 'admin' || str == 'instructor') {
    6767        jQuery('#FacultyFaculty').removeAttr('disabled');
    6868    }
Note: See TracChangeset for help on using the changeset viewer.