當前位置: 首頁>>代碼示例>>PHP>>正文


PHP grade_report::grade_report方法代碼示例

本文整理匯總了PHP中grade_report::grade_report方法的典型用法代碼示例。如果您正苦於以下問題:PHP grade_report::grade_report方法的具體用法?PHP grade_report::grade_report怎麽用?PHP grade_report::grade_report使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在grade_report的用法示例。


在下文中一共展示了grade_report::grade_report方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

 /**
  * Constructor. Sets local copies of user preferences and initialises grade_tree.
  * @param int $courseid
  * @param object $gpr grade plugin return tracking object
  * @param string $context
  * @param int $userid The id of the user
  */
 function grade_report_user($courseid, $gpr, $context, $userid)
 {
     global $CFG;
     parent::grade_report($courseid, $gpr, $context);
     $this->showrank = grade_get_setting($this->courseid, 'report_user_showrank', $CFG->grade_report_user_showrank);
     $this->showpercentage = grade_get_setting($this->courseid, 'report_user_showpercentage', $CFG->grade_report_user_showpercentage);
     $this->showhiddenitems = grade_get_setting($this->courseid, 'report_user_showhiddenitems', $CFG->grade_report_user_showhiddenitems);
     $this->showrange = true;
     $this->switch = grade_get_setting($this->courseid, 'aggregationposition', $CFG->grade_aggregationposition);
     // Grab the grade_tree for this course
     $this->gtree = new grade_tree($this->courseid, false, $this->switch, false, !$CFG->enableoutcomes);
     // Determine the number of rows and indentation
     $this->maxdepth = 1;
     $this->inject_rowspans($this->gtree->top_element);
     $this->maxdepth++;
     // Need to account for the lead column that spans all children
     for ($i = 1; $i <= $this->maxdepth; $i++) {
         $this->evenodd[$i] = 0;
     }
     $this->tabledata = array();
     $this->canviewhidden = has_capability('moodle/grade:viewhidden', get_context_instance(CONTEXT_COURSE, $this->courseid));
     // get the user (for full name)
     $this->user = get_record('user', 'id', $userid);
     // base url for sorting by first/last name
     $this->baseurl = $CFG->wwwroot . '/grade/report?id=' . $courseid . '&amp;userid=' . $userid;
     $this->pbarurl = $this->baseurl;
     // no groups on this report - rank is from all course users
     $this->setup_table();
 }
開發者ID:kai707,項目名稱:ITSA-backup,代碼行數:36,代碼來源:lib.php

示例2: unserialize

 /**
  * Constructor. Sets local copies of user preferences and initialises grade_tree.
  * @param int $courseid
  * @param object $gpr grade plugin return tracking object
  * @param string $context
  * @param int $page The current page being viewed (when report is paged)
  * @param int $sortitemid The id of the grade_item by which to sort the table
  */
 function grade_report_grader($courseid, $gpr, $context, $page = null, $sortitemid = null)
 {
     global $CFG;
     parent::grade_report($courseid, $gpr, $context, $page);
     // load collapsed settings for this report
     if ($collapsed = get_user_preferences('grade_report_grader_collapsed_categories')) {
         $this->collapsed = unserialize($collapsed);
     } else {
         $this->collapsed = array('aggregatesonly' => array(), 'gradesonly' => array());
     }
     if (empty($CFG->enableoutcomes)) {
         $nooutcomes = false;
     } else {
         $nooutcomes = get_user_preferences('grade_report_shownooutcomes');
     }
     // Grab the grade_tree for this course
     $this->gtree = new grade_tree($this->courseid, true, $this->get_pref('aggregationposition'), $this->collapsed, $nooutcomes);
     $this->sortitemid = $sortitemid;
     // base url for sorting by first/last name
     $studentsperpage = $this->get_pref('studentsperpage');
     $perpage = '';
     $curpage = '';
     if (!empty($studentsperpage)) {
         $perpage = '&amp;perpage=' . $studentsperpage;
         $curpage = '&amp;page=' . $this->page;
     }
     $this->baseurl = 'index.php?id=' . $this->courseid . $perpage . $curpage . '&amp;';
     $this->pbarurl = 'index.php?id=' . $this->courseid . $perpage . '&amp;';
     // Setup groups if requested
     if ($this->get_pref('showgroups')) {
         $this->setup_groups();
     }
     $this->setup_sortitemid();
 }
開發者ID:BackupTheBerlios,項目名稱:samouk-svn,代碼行數:42,代碼來源:lib.php

示例3:

 /**
  * Constructor. Sets local copies of user preferences and initialises grade_tree.
  * @param int $userid
  * @param object $gpr grade plugin return tracking object
  * @param string $context
  */
 function grade_report_overview($userid, $gpr, $context)
 {
     global $CFG, $COURSE;
     parent::grade_report($COURSE->id, $gpr, $context);
     // get the user (for full name)
     $this->user = get_record('user', 'id', $userid);
     // base url for sorting by first/last name
     $this->baseurl = $CFG->wwwroot . '/grade/overview/index.php?id=' . $userid;
     $this->pbarurl = $this->baseurl;
     $this->setup_table();
 }
開發者ID:BackupTheBerlios,項目名稱:samouk-svn,代碼行數:17,代碼來源:lib.php

示例4:

 /**
  * Constructor. Sets local copies of user preferences and initialises grade_tree.
  * @param int $userid
  * @param object $gpr grade plugin return tracking object
  * @param string $context
  */
 function grade_report_overview($userid, $gpr, $context)
 {
     global $CFG, $COURSE;
     parent::grade_report($COURSE->id, $gpr, $context);
     $this->showrank = grade_get_setting($this->courseid, 'report_overview_showrank', !empty($CFG->grade_report_overview_showrank));
     $this->showtotalsifcontainhidden = grade_get_setting($this->courseid, 'report_overview_showtotalsifcontainhidden', $CFG->grade_report_overview_showtotalsifcontainhidden);
     // get the user (for full name)
     $this->user = get_record('user', 'id', $userid);
     // base url for sorting by first/last name
     $this->baseurl = $CFG->wwwroot . '/grade/overview/index.php?id=' . $userid;
     $this->pbarurl = $this->baseurl;
     $this->setup_table();
 }
開發者ID:nagyistoce,項目名稱:moodle-Teach-Pilot,代碼行數:19,代碼來源:lib.php

示例5:

 /**
  * Constructor. Sets local copies of user preferences and initialises grade_tree.
  * @param int $courseid
  * @param object $gpr grade plugin return tracking object
  * @param string $context
  * @param int $userid The id of the user
  */
 function grade_report_user($courseid, $gpr, $context, $userid)
 {
     global $CFG;
     parent::grade_report($courseid, $gpr, $context);
     $this->showrank = grade_get_setting($this->courseid, 'report_user_showrank', $CFG->grade_report_user_showrank);
     $this->showhiddenitems = grade_get_setting($this->courseid, 'report_user_showhiddenitems', $CFG->grade_report_user_showhiddenitems);
     $switch = grade_get_setting($this->courseid, 'aggregationposition', $CFG->grade_aggregationposition);
     // Grab the grade_seq for this course
     $this->gseq = new grade_seq($this->courseid, $switch);
     // get the user (for full name)
     $this->user = get_record('user', 'id', $userid);
     // base url for sorting by first/last name
     $this->baseurl = $CFG->wwwroot . '/grade/report?id=' . $courseid . '&amp;userid=' . $userid;
     $this->pbarurl = $this->baseurl;
     // no groups on this report - rank is from all course users
     $this->setup_table();
 }
開發者ID:r007,項目名稱:PMoodle,代碼行數:24,代碼來源:lib.php

示例6: unserialize

 /**
  * Constructor. Sets local copies of user preferences and initialises grade_tree.
  * @param int $courseid
  * @param object $gpr grade plugin return tracking object
  * @param string $context
  * @param int $page The current page being viewed (when report is paged)
  * @param int $sortitemid The id of the grade_item by which to sort the table
  */
 function grade_report_grader($courseid, $gpr, $context, $page = null, $sortitemid = null)
 {
     global $CFG;
     parent::grade_report($courseid, $gpr, $context, $page);
     $this->canviewhidden = has_capability('moodle/grade:viewhidden', get_context_instance(CONTEXT_COURSE, $this->course->id));
     $this->canviewuserreport = has_capability('gradereport/' . $CFG->grade_profilereport . ':view', $this->context);
     // load collapsed settings for this report
     if ($collapsed = get_user_preferences('grade_report_grader_collapsed_categories')) {
         $this->collapsed = unserialize($collapsed);
     } else {
         $this->collapsed = array('aggregatesonly' => array(), 'gradesonly' => array());
     }
     if (empty($CFG->enableoutcomes)) {
         $nooutcomes = false;
     } else {
         $nooutcomes = get_user_preferences('grade_report_shownooutcomes');
     }
     // if user report preference set or site report setting set use it, otherwise use course or site setting
     $switch = $this->get_pref('aggregationposition');
     if ($switch == '') {
         $switch = grade_get_setting($this->courseid, 'aggregationposition', $CFG->grade_aggregationposition);
     }
     // Grab the grade_tree for this course
     $this->gtree = new grade_tree($this->courseid, true, $switch, $this->collapsed, $nooutcomes);
     $this->sortitemid = $sortitemid;
     // base url for sorting by first/last name
     $studentsperpage = $this->get_pref('studentsperpage');
     $perpage = '';
     $curpage = '';
     if (!empty($studentsperpage)) {
         $perpage = '&amp;perpage=' . $studentsperpage;
         $curpage = '&amp;page=' . $this->page;
     }
     $this->baseurl = 'index.php?id=' . $this->courseid . $perpage . $curpage . '&amp;';
     $this->pbarurl = 'index.php?id=' . $this->courseid . $perpage . '&amp;';
     $this->setup_groups();
     $this->setup_sortitemid();
 }
開發者ID:edwinphillips,項目名稱:moodle-485cb39,代碼行數:46,代碼來源:lib.php


注:本文中的grade_report::grade_report方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。