mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-20636 Convert the overview report.
This commit is contained in:
parent
2a3bdbf98e
commit
e24ee794b2
14 changed files with 959 additions and 845 deletions
|
@ -476,13 +476,14 @@ $sqlorderby
|
|||
*/
|
||||
public function load_average_marks(qubaid_condition $qubaids, $slots = null) {
|
||||
if (!empty($slots)) {
|
||||
list($slottest, $params) = get_in_or_equal($slots, SQL_PARAMS_NAMED, 'slot0000');
|
||||
list($slottest, $slotsparams) = $this->db->get_in_or_equal($slots, SQL_PARAMS_NAMED, 'slot0000');
|
||||
$slotwhere = " AND qa.slot $slottest";
|
||||
} else {
|
||||
$slotwhere = '';
|
||||
$params = array();
|
||||
}
|
||||
|
||||
list($statetest) = get_in_or_equal(array(
|
||||
list($statetest, $stateparams) = $this->db->get_in_or_equal(array(
|
||||
question_state::$gaveup,
|
||||
question_state::$gradedwrong,
|
||||
question_state::$gradedpartial,
|
||||
|
@ -490,9 +491,9 @@ $sqlorderby
|
|||
question_state::$mangaveup,
|
||||
question_state::$mangrwrong,
|
||||
question_state::$mangrpartial,
|
||||
question_state::$mangrright));
|
||||
question_state::$mangrright), SQL_PARAMS_NAMED, 'st00');
|
||||
|
||||
$records = get_records_sql("
|
||||
return $this->db->get_records_sql("
|
||||
SELECT
|
||||
qa.slot,
|
||||
AVG(COALESCE(qas.fraction, 0)) AS averagefraction,
|
||||
|
@ -510,9 +511,7 @@ WHERE
|
|||
GROUP BY qa.slot
|
||||
|
||||
ORDER BY qa.slot
|
||||
");
|
||||
|
||||
return $records;
|
||||
", $slotsparams + $stateparams + $qubaids->from_where_params());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -659,7 +658,7 @@ ORDER BY
|
|||
if (empty($qaids)) {
|
||||
return;
|
||||
}
|
||||
list($test, $params) = get_in_or_equal($qaids);
|
||||
list($test, $params) = $this->db->get_in_or_equal($qaids);
|
||||
$this->db->delete_records_select('question_attempt_step_data', "attemptstepid IN (
|
||||
SELECT qas.id
|
||||
FROM {question_attempt_steps} qas
|
||||
|
@ -1060,6 +1059,7 @@ class qubaid_join extends qubaid_condition {
|
|||
* @param string $usageidcolumn the column in $from that should be
|
||||
* made equal to the usageid column in the JOIN clause.
|
||||
* @param string $where SQL fragment to go in the where clause.
|
||||
* @param array $params required by the SQL. You must use named parameters.
|
||||
*/
|
||||
public function __construct($from, $usageidcolumn, $where = '', $params = array()) {
|
||||
$this->from = $from;
|
||||
|
|
|
@ -27,7 +27,7 @@ DONE lib/simpletest/testsimpletestlib.php | 116 + Already in 2.0
|
|||
DONE lib/simpletest/testweblib.php | 4 + Useful new test. See MDL-24060.
|
||||
DONE lib/simpletestlib.php | 290 ++ Useful new assertions.
|
||||
DONE lib/simpletestlib/dumper.php | 3 + Not needed. KILL
|
||||
lib/tablelib.php | 1224 +++++++-- TODO. See MDL-25716
|
||||
DONE lib/tablelib.php | 1224 +++++++-- TODO. See MDL-25716
|
||||
DONE lib/weblib.php | 10 +- Improve html_to_text. See MDL-24060.
|
||||
DONE lib/xmlize.php | 74 +- In 2.0
|
||||
DONE mod/assignment/lib.php | 2 +- TODO MDL-25716
|
||||
|
@ -129,15 +129,15 @@ DONE mod/quiz/report/grading/report.php | 842 ++++---
|
|||
DONE mod/quiz/report/grading/version.php | 26 +
|
||||
DONE lang/en_utf8/quiz_grading.php | 18 -
|
||||
|
||||
mod/quiz/report/overview/db/install.xml | 22 +
|
||||
mod/quiz/report/overview/db/upgrade.php | 152 +
|
||||
mod/quiz/report/overview/lang/en_utf8/quiz_overview.php | 54 +
|
||||
mod/quiz/report/overview/overview_table.php | 321 +++
|
||||
mod/quiz/report/overview/overviewgraph.php | 168 +-
|
||||
mod/quiz/report/overview/overviewsettings_form.php | 69 +-
|
||||
mod/quiz/report/overview/report.php | 999 +++----
|
||||
mod/quiz/report/overview/version.php | 26 +
|
||||
lang/en_utf8/quiz_overview.php | 30 -
|
||||
DONE mod/quiz/report/overview/db/install.xml | 22 +
|
||||
DONE mod/quiz/report/overview/db/upgrade.php | 152 +
|
||||
DONE mod/quiz/report/overview/lang/en_utf8/quiz_overview.php | 54 +
|
||||
DONE mod/quiz/report/overview/overview_table.php | 321 +++
|
||||
DONE mod/quiz/report/overview/overviewgraph.php | 168 +-
|
||||
DONE mod/quiz/report/overview/overviewsettings_form.php | 69 +-
|
||||
DONE mod/quiz/report/overview/report.php | 999 +++----
|
||||
DONE mod/quiz/report/overview/version.php | 26 +
|
||||
DONE lang/en_utf8/quiz_overview.php | 30 -
|
||||
|
||||
DONE mod/quiz/report/responses/lang/en_utf8/quiz_responses.php | 19 +
|
||||
DONE mod/quiz/report/responses/report.php | 242 ++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue