Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2cf4503
Compare submission first implementation
xus Nov 29, 2018
697fe02
missing parenthesis
xus Nov 29, 2018
c93a2e5
Fix filter feedback
xus Nov 29, 2018
a2ee6b5
changes in Feedback filter constants
xus Nov 29, 2018
72aab7b
Refactor: avoid duplicate code when gathering data from reviews
xus Nov 29, 2018
bcd6772
tpl for group of panels with the proper title. (members and compare l…
xus Nov 29, 2018
8e6cd45
Fixed and customized the mail notification for comments on wikis.
xus Nov 30, 2018
5a4eef6
language variables
xus Dec 3, 2018
e1d3423
Firsts steps for LM comments notifications
xus Dec 3, 2018
a8d339b
Implement notifications for learning modules when new comment
xus Dec 5, 2018
1791ca8
Merge branch 'trunk_compare_text_submissions' into 6_0_uhannover_A18T348
xus Dec 5, 2018
7ed0f02
Merge branch '6_0_notifications_wikis_lm' into 6_0_uhannover_A18T348
xus Dec 5, 2018
c8d3d8b
missing german lang vars
xus Dec 5, 2018
9def6fe
set send method public
xus Dec 5, 2018
23e0190
typos
xus Dec 5, 2018
78d73ee
Fix wiki comment action
xus Dec 5, 2018
48d23fa
Fix LM comment on page notification
xus Dec 5, 2018
cdebf4d
Add ilLearningModuleNotification to autoload.
xus Dec 5, 2018
ce7eb22
method descriptions and remove comments
xus Dec 5, 2018
6c09eff
Exc global setting to accept versioning for submissions
xus Dec 5, 2018
887d3a2
Versioning table column to exc assignments type text if enabled
xus Dec 6, 2018
dcca5e2
submission versionables. GUI table + db + lang
xus Dec 6, 2018
1398582
submission isVersioned + show action buttons depending if submit version
xus Dec 6, 2018
8cdc921
do not show version 0 in the gui table
xus Dec 6, 2018
0bc1cf1
ilSubmission canSubmit returns true also when the submission has bee…
xus Dec 7, 2018
cba445a
btns+lang User can send more than one submission
xus Dec 7, 2018
8ffb9c5
Edit the last revision
xus Dec 7, 2018
b9867ed
isVersionable if no versioned before or last version is 0
xus Dec 7, 2018
6c2520a
DB update + reload structure
xus Dec 10, 2018
5a6a28e
remove DB update
xus Dec 11, 2018
d2e217e
Refactor to get versions in one DB table.
xus Dec 11, 2018
ce34a77
msg when successfully freeze a submission
xus Dec 11, 2018
fa6115a
get member assignment data can return an empty array
xus Dec 11, 2018
06dc877
showSubmissionPanel to display all panel lists
xus Dec 11, 2018
4ec4783
small fix for filter in panels list
xus Dec 11, 2018
21fd01e
Add Status time info for the versioned cards + lang vars
xus Dec 12, 2018
1b9605f
Customize panels to get revision or submission information
xus Dec 12, 2018
8c268ad
List versions DESC
xus Dec 12, 2018
b7ee49a
Confirmation form before freeze submission
xus Dec 12, 2018
d405fd0
Notification when submission has been frozen
xus Dec 12, 2018
b6ef8f2
missing english lang var
xus Dec 12, 2018
e09edff
Refactoring: Everything related with the panels list moved to a handl…
xus Dec 14, 2018
304c13f
executeCommand new panelshandler with user id + set return + remove u…
xus Jan 15, 2019
53fc759
Fix ilctrl navigation and set current user if in assignment view.
xus Jan 30, 2019
2b99075
Toolbar on members: remove second formAction
xus Jan 30, 2019
3dbe094
Fixing the back to previous view
xus Jan 30, 2019
d40f277
just add the custom db update file
xus Jan 30, 2019
4ea360d
remove changes in main db file
xus Jan 30, 2019
91723b5
LM notifications when edit
xus Feb 5, 2019
7b92bdf
[Fix 24825] Wiki notification- No content when comment
xus Feb 5, 2019
6e84a14
Fix indentation
xus Feb 5, 2019
09a6ccc
Fix notification for lm page
xus Feb 5, 2019
28c4150
remove todo
xus Feb 5, 2019
bbf8b32
LM notification with content when edit.
xus Feb 5, 2019
11736d7
add changes to german lang file
xus Feb 6, 2019
7dac9d3
Fix comment action + lang files
xus Feb 6, 2019
8dcc54d
lm constants to define the actions
xus Feb 7, 2019
55d6c4a
Fix participant view tab
xus Feb 18, 2019
aa97d60
[Fix 24850 part 1] Implement grade/evaluate revisions
xus Feb 19, 2019
30ef0a0
[Fix 24850 Part2] Grade and evaluate revisions
xus Feb 19, 2019
a77223c
[Fix 24850 end] new db field for feedback date + db fixes
xus Feb 19, 2019
c5b157c
Missing lang var
xus Feb 19, 2019
42b5a7d
Remove return types when null allowed.
xus Feb 19, 2019
e2503e2
Remove more Return type declarations
xus Feb 19, 2019
daa64dd
lm and wiki comments via modalbox send notification
xus Feb 26, 2019
fd68663
Refactoring - versionable: Use of ilExAssignmentTypes
xus Feb 26, 2019
44395f8
Revert "Refactoring - versionable: Use of ilExAssignmentTypes"
xus Mar 11, 2019
b0f1579
[Fix 25050] No freeze submission option if there is no submission
xus Mar 11, 2019
ecf139f
[Fix 25049] column version just before status
xus Mar 11, 2019
9e016c0
[Fix 25051] Freeze/d submissions as second position in the dropdown
xus Mar 11, 2019
b519d71
[Fix 25049-2part] move version in members row html
xus Mar 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Modules/Exercise/classes/class.ilExAssignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2566,6 +2566,18 @@ public function getCalculatedDeadlines()
}
return $calculated_deadlines;
}

public function isVersionable()
{
if($this->getType() == ilExAssignment::TYPE_TEXT)
{
$exc_settings = new ilSetting("excs");
if($exc_settings->get("enable_versioning")) {
return true;
}
}
return false;
}
}

?>
48 changes: 43 additions & 5 deletions Modules/Exercise/classes/class.ilExSubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class ilExSubmission
const TYPE_TEXT = "Text";
const TYPE_REPO_OBJECT = "RepoObject"; // Wikis



/**
* @var ilObjUser
*/
Expand Down Expand Up @@ -201,7 +199,8 @@ public function getSelectedObject()
public function canSubmit()
{
return ($this->isOwner() &&
$this->state->isSubmissionAllowed());
$this->state->isSubmissionAllowed() ||
$this->isVersioned());
}

public function canView()
Expand Down Expand Up @@ -523,8 +522,13 @@ function getFiles(array $a_file_ids = null, $a_only_valid = false, $a_min_timest
if($a_min_timestamp)
{
$sql .= " AND ts > ".$ilDB->quote($a_min_timestamp, "timestamp");
}

}

if($this->isVersioned())
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

{
$sql .= " ORDER BY returned_id DESC LIMIT 1";
}

$result = $ilDB->query($sql);

$delivered_files = array();
Expand Down Expand Up @@ -654,6 +658,30 @@ public static function findUserFiles($a_user_id, $a_filetitle)
}
return $res;
}

/**
* Return the submission ids related to the specific user and assignment
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only IDS

* @param $a_user_id
* @param $a_filetitle
* @return array
*/
public function getSubmissionsByUser() : array
{
$sql = "SELECT *".
" FROM exc_returned".
" WHERE user_id = ".$this->db->quote($this->user_id, "integer").
" AND ass_id = ".$this->db->quote($this->assignment->getId(), "integer");

$set = $this->db->query($sql);

$res = array();
while($row = $this->db->fetchAssoc($set))
{
$res[] = $row;
}

return $res;
}

function deleteAllFiles()
{
Expand Down Expand Up @@ -1666,5 +1694,15 @@ static function getDirectoryNameFromUserData($a_user_id)

return $targetdir;
}

/**
* Check if the submission has been versioned by tutor/admin
* @return bool
*/
public function isVersioned() : bool
{
$revision = new ilExSubmissionRevision($this);
return $revision->isVersioned();
}
}

Loading